Compare commits
No commits in common. "abde709e540321cf19bf438f1bacb8939b53b1e1" and "66234b14bcb4c040d08944eceb17620749fc957e" have entirely different histories.
abde709e54
...
66234b14bc
@ -318,9 +318,10 @@ class TfMessageElement extends LitElement {
|
||||
>
|
||||
+ ${this.total_child_messages(this.message) + ' More'}
|
||||
</button>
|
||||
`;
|
||||
`;
|
||||
} else {
|
||||
return html` <div class="w3-container w3-margin-bottom">
|
||||
return html`
|
||||
<div class="w3-container w3-margin-bottom">
|
||||
${repeat(
|
||||
this.message.child_messages || [],
|
||||
(x) => x.id,
|
||||
@ -341,8 +342,8 @@ class TfMessageElement extends LitElement {
|
||||
style="box-sizing: border-box"
|
||||
@click=${() => self.set_expanded(false)}
|
||||
>
|
||||
Collapse
|
||||
</button>`;
|
||||
Collapse</button
|
||||
>`;
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
@ -552,8 +553,12 @@ class TfMessageElement extends LitElement {
|
||||
`
|
||||
: undefined;
|
||||
return html`
|
||||
<div class="w3-section w3-container">${reply}</div>
|
||||
<footer>${this.render_children()}</footer>
|
||||
<div class="w3-section w3-container">
|
||||
${reply}
|
||||
</div>
|
||||
<footer>
|
||||
${this.render_children()}
|
||||
</footer>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "💾",
|
||||
"previous": "&tzZFIe7Y54O4sx1QtAPdemkXh+p5qHXSG/dlS7NP6OQ=.sha256"
|
||||
"previous": "&mvGTlWKFR5QM/3nb4fJ2WQq0n/gNKvBmhGDkAvb8ki8=.sha256"
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ async function query(sql, args) {
|
||||
|
||||
async function get_biggest() {
|
||||
return query(`
|
||||
select author, size from messages_stats group by author order by size desc limit 10;
|
||||
select author, sum(length(content)) as size from messages group by author order by size desc limit 10;
|
||||
`);
|
||||
}
|
||||
|
||||
@ -62,14 +62,15 @@ function nice_size(bytes) {
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await app.setDocument('<p style="color: #fff">Analyzing feeds...</p>');
|
||||
let most_follows = get_most_follows();
|
||||
await app.setDocument(
|
||||
'<p style="color: #fff">Finding the top 10 largest feeds...</p>'
|
||||
);
|
||||
let most_follows = await get_most_follows();
|
||||
let total = await get_total();
|
||||
let identities = await ssb.getAllIdentities();
|
||||
let following1 = await ssb.following(identities, 1);
|
||||
let following2 = await ssb.following(identities, 2);
|
||||
let biggest = await get_biggest();
|
||||
most_follows = await most_follows;
|
||||
let names = await get_names(
|
||||
[].concat(
|
||||
biggest.map((x) => x.author),
|
||||
@ -93,7 +94,7 @@ async function main() {
|
||||
}
|
||||
let html = `<body style="color: #000; background-color: #ddd">\n
|
||||
<h1>Storage Summary</h1>
|
||||
<h2>Top Accounts by Size</h2>
|
||||
<h2>Top 10 Accounts by Size</h2>
|
||||
<ol>`;
|
||||
for (let item of biggest) {
|
||||
html += `<li>
|
||||
@ -104,7 +105,7 @@ async function main() {
|
||||
}
|
||||
html += `
|
||||
</ol>
|
||||
<h2>Top Accounts by Follows</h2>
|
||||
<h2>Top 10 Accounts by Follows</h2>
|
||||
<ol>`;
|
||||
for (let item of most_follows) {
|
||||
html += `<li>
|
||||
|
@ -950,7 +950,7 @@ bool tf_ssb_db_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char*
|
||||
result = r == SQLITE_DONE;
|
||||
if (!result)
|
||||
{
|
||||
tf_printf("Blob store failed: %s.\n", sqlite3_errmsg(db));
|
||||
tf_printf("Blob store failed: %s.", sqlite3_errmsg(db));
|
||||
}
|
||||
rows = sqlite3_changes(db);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user