From 7d029d3d7afe17934fa0103f03ec50aafd46d851 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 17 Jan 2024 23:36:08 +0000 Subject: [PATCH] Remove the appstore app. apps does most of what it used to do, now. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4778 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/appstore.json | 4 ---- apps/appstore/app.js | 55 -------------------------------------------- 2 files changed, 59 deletions(-) delete mode 100644 apps/appstore.json delete mode 100644 apps/appstore/app.js diff --git a/apps/appstore.json b/apps/appstore.json deleted file mode 100644 index ab95c5a0..00000000 --- a/apps/appstore.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "tildefriends-app", - "emoji": "🛍" -} \ No newline at end of file diff --git a/apps/appstore/app.js b/apps/appstore/app.js deleted file mode 100644 index ecc537e4..00000000 --- a/apps/appstore/app.js +++ /dev/null @@ -1,55 +0,0 @@ -async function get_apps() { - let results = {}; - await ssb.sqlAsync(` - SELECT messages.* - FROM messages_fts('"application/tildefriends"') - JOIN messages ON messages.rowid = messages_fts.rowid - ORDER BY timestamp - `, - [], - function(row) { - let content = JSON.parse(row.content); - for (let mention of content.mentions) { - if (mention?.type === 'application/tildefriends') { - results[JSON.stringify([row.author, mention.name])] = { - message: row, - blob: mention.link, - name: mention.name, - }; - } - } - }); - return Object.values(results).sort((x, y) => y.message.timestamp - x.message.timestamp); -} - -function render_app(app) { - return ` -
- @ - % - ${app.name} -
- `; -} - -async function main() { - let apps = await get_apps(); - app.setDocument(` - - - - - - -

${apps.length} apps

- ${apps.map(render_app).join('\n')} - - - `); -} - -main();