Compare commits

..

2 Commits

Author SHA1 Message Date
abde709e54 prettier.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m7s
2025-04-16 19:27:24 -04:00
27f2d319ab storage: Faster. 2025-04-16 19:21:57 -04:00
4 changed files with 14 additions and 20 deletions

View File

@ -318,10 +318,9 @@ 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,
@ -342,8 +341,8 @@ class TfMessageElement extends LitElement {
style="box-sizing: border-box"
@click=${() => self.set_expanded(false)}
>
Collapse</button
>`;
Collapse
</button>`;
}
} else {
return undefined;
@ -553,12 +552,8 @@ 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>
`;
}

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "💾",
"previous": "&mvGTlWKFR5QM/3nb4fJ2WQq0n/gNKvBmhGDkAvb8ki8=.sha256"
"previous": "&tzZFIe7Y54O4sx1QtAPdemkXh+p5qHXSG/dlS7NP6OQ=.sha256"
}

View File

@ -8,7 +8,7 @@ async function query(sql, args) {
async function get_biggest() {
return query(`
select author, sum(length(content)) as size from messages group by author order by size desc limit 10;
select author, size from messages_stats group by author order by size desc limit 10;
`);
}
@ -62,15 +62,14 @@ function nice_size(bytes) {
}
async function main() {
await app.setDocument(
'<p style="color: #fff">Finding the top 10 largest feeds...</p>'
);
let most_follows = await get_most_follows();
await app.setDocument('<p style="color: #fff">Analyzing feeds...</p>');
let most_follows = 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),
@ -94,7 +93,7 @@ async function main() {
}
let html = `<body style="color: #000; background-color: #ddd">\n
<h1>Storage Summary</h1>
<h2>Top 10 Accounts by Size</h2>
<h2>Top Accounts by Size</h2>
<ol>`;
for (let item of biggest) {
html += `<li>
@ -105,7 +104,7 @@ async function main() {
}
html += `
</ol>
<h2>Top 10 Accounts by Follows</h2>
<h2>Top Accounts by Follows</h2>
<ol>`;
for (let item of most_follows) {
html += `<li>

View File

@ -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.", sqlite3_errmsg(db));
tf_printf("Blob store failed: %s.\n", sqlite3_errmsg(db));
}
rows = sqlite3_changes(db);
}