From bdeafdd61162ed416d2cd3d9ae306ea23fd87df7 Mon Sep 17 00:00:00 2001 From: Owais Jamil Date: Tue, 9 Jun 2026 13:20:02 -0500 Subject: [PATCH] feat: add atmologos --- CHANGELOG.md | 1 + README.md | 6 +++++ src/lib/atproto/collection-icons.ts | 28 +++++++++++++++++++++ src/lib/atproto/repo.svelte.ts | 21 +++++++++------- src/lib/atproto/types.ts | 4 ++- src/lib/components/AboutComputer.svelte | 2 ++ src/lib/components/CollectionBrowser.svelte | 17 +++++++++++-- src/lib/components/Gedit.svelte | 7 ++++-- src/routes/+layout.svelte | 8 ++---- static/atmologos/color/anisota.svg | 10 ++++++++ static/atmologos/color/blacksky.svg | 3 +++ static/atmologos/color/blento.svg | 6 +++++ static/atmologos/color/blueat.svg | 3 +++ static/atmologos/color/bluesky.svg | 3 +++ static/atmologos/color/bookhive.svg | 9 +++++++ static/atmologos/color/cartridge.svg | 12 +++++++++ static/atmologos/color/colibri.svg | 12 +++++++++ static/atmologos/color/eurosky.svg | 3 +++ static/atmologos/color/grain.svg | 3 +++ static/atmologos/color/graze.svg | 3 +++ static/atmologos/color/kipclip.svg | 9 +++++++ static/atmologos/color/leaflet.svg | 4 +++ static/atmologos/color/margin.svg | 3 +++ static/atmologos/color/northsky.svg | 17 +++++++++++++ static/atmologos/color/npmx.svg | 4 +++ static/atmologos/color/offprint.svg | 3 +++ static/atmologos/color/pckt.svg | 5 ++++ static/atmologos/color/pdsls.svg | 3 +++ static/atmologos/color/plyr.fm.svg | 4 +++ static/atmologos/color/popfeed.svg | 3 +++ static/atmologos/color/roomy.svg | 4 +++ static/atmologos/color/semble.svg | 3 +++ static/atmologos/color/sifa id.svg | 5 ++++ static/atmologos/color/sill.svg | 3 +++ static/atmologos/color/spark.svg | 3 +++ static/atmologos/color/standard site.svg | 3 +++ static/atmologos/color/surf.svg | 3 +++ static/atmologos/color/tangled.svg | 3 +++ static/atmologos/color/witchsky.svg | 9 +++++++ 39 files changed, 232 insertions(+), 20 deletions(-) create mode 100644 src/lib/atproto/collection-icons.ts create mode 100644 static/atmologos/color/anisota.svg create mode 100644 static/atmologos/color/blacksky.svg create mode 100644 static/atmologos/color/blento.svg create mode 100644 static/atmologos/color/blueat.svg create mode 100644 static/atmologos/color/bluesky.svg create mode 100644 static/atmologos/color/bookhive.svg create mode 100644 static/atmologos/color/cartridge.svg create mode 100644 static/atmologos/color/colibri.svg create mode 100644 static/atmologos/color/eurosky.svg create mode 100644 static/atmologos/color/grain.svg create mode 100644 static/atmologos/color/graze.svg create mode 100644 static/atmologos/color/kipclip.svg create mode 100644 static/atmologos/color/leaflet.svg create mode 100644 static/atmologos/color/margin.svg create mode 100644 static/atmologos/color/northsky.svg create mode 100644 static/atmologos/color/npmx.svg create mode 100644 static/atmologos/color/offprint.svg create mode 100644 static/atmologos/color/pckt.svg create mode 100644 static/atmologos/color/pdsls.svg create mode 100644 static/atmologos/color/plyr.fm.svg create mode 100644 static/atmologos/color/popfeed.svg create mode 100644 static/atmologos/color/roomy.svg create mode 100644 static/atmologos/color/semble.svg create mode 100644 static/atmologos/color/sifa id.svg create mode 100644 static/atmologos/color/sill.svg create mode 100644 static/atmologos/color/spark.svg create mode 100644 static/atmologos/color/standard site.svg create mode 100644 static/atmologos/color/surf.svg create mode 100644 static/atmologos/color/tangled.svg create mode 100644 static/atmologos/color/witchsky.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f47b7..99a6d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Target release: `v1.0.0`. - Cache-aware AT Protocol browsing: live record fetches populate PGlite and offline failures can fall back to cached collections/records. - Full-text cache search in the Nautilus-style collection browser. +- Atmosphere app logo mapping for known AT Protocol collection namespaces. ### 2026-06-08 diff --git a/README.md b/README.md index 8422cf2..42bc173 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,9 @@ brown panels, tan window chrome, desktop shortcuts, and draggable/resizable wind Syntax highlighting uses a JSON-only Shiki bundle with an Ubuntu terminal palette based on the Base 16 spec. + +## Credits + +- Ubuntu 11 ([duh](https://archive.org/details/ubuntu-11.10-desktop-i386-20110812)) +- Atmosphere app logos are adapted from + [atmologos](https://tangled.org/cozylittle.house/atmologos). diff --git a/src/lib/atproto/collection-icons.ts b/src/lib/atproto/collection-icons.ts new file mode 100644 index 0000000..d816618 --- /dev/null +++ b/src/lib/atproto/collection-icons.ts @@ -0,0 +1,28 @@ +export type CollectionIconMatch = { prefix: string; label: string; icon: string }; + +const atmologoBasePath = '/atmologos/color'; + +export const collectionIconMatches: readonly CollectionIconMatch[] = [ + { prefix: 'app.blento.', label: 'Blento', icon: `${atmologoBasePath}/blento.svg` }, + { prefix: 'app.bsky.', label: 'Bluesky', icon: `${atmologoBasePath}/bluesky.svg` }, + { prefix: 'at.margin.', label: 'Margin', icon: `${atmologoBasePath}/margin.svg` }, + { prefix: 'blog.pckt.', label: 'Pckt', icon: `${atmologoBasePath}/pckt.svg` }, + { prefix: 'dev.npmx.', label: 'npmx', icon: `${atmologoBasePath}/npmx.svg` }, + { prefix: 'fm.plyr.', label: 'plyr.fm', icon: `${atmologoBasePath}/plyr.fm.svg` }, + { prefix: 'id.sifa.', label: 'Sifa', icon: `${atmologoBasePath}/sifa%20id.svg` }, + { prefix: 'net.anisota.', label: 'Anisota', icon: `${atmologoBasePath}/anisota.svg` }, + { prefix: 'pub.leaflet.', label: 'Leaflet', icon: `${atmologoBasePath}/leaflet.svg` }, + { prefix: 'sh.tangled.', label: 'Tangled', icon: `${atmologoBasePath}/tangled.svg` }, + { prefix: 'site.standard.', label: 'Standard Site', icon: `${atmologoBasePath}/standard%20site.svg` }, + { prefix: 'so.sprk.', label: 'Spark', icon: `${atmologoBasePath}/spark.svg` }, + { prefix: 'social.grain.', label: 'Grain', icon: `${atmologoBasePath}/grain.svg` }, + { prefix: 'social.popfeed.', label: 'Popfeed', icon: `${atmologoBasePath}/popfeed.svg` } +]; + +export function collectionIconMatch(collection: string): CollectionIconMatch | null { + return collectionIconMatches.find((match) => collection.startsWith(match.prefix)) ?? null; +} + +export function appLabelForCollection(collection: string): string | null { + return collectionIconMatch(collection)?.label ?? null; +} diff --git a/src/lib/atproto/repo.svelte.ts b/src/lib/atproto/repo.svelte.ts index 625e281..b18a319 100644 --- a/src/lib/atproto/repo.svelte.ts +++ b/src/lib/atproto/repo.svelte.ts @@ -12,6 +12,7 @@ import { type CachedRecordInput } from '$lib/db'; import { errorMessage } from '$lib/utils/errors'; +import { appLabelForCollection, collectionIconMatch } from './collection-icons'; import { isRecordValue, type AccountIdentity, @@ -54,9 +55,7 @@ class RepoBrowserState { rpc.get('com.atproto.repo.describeRepo', { params: { repo: identity.did as ActorIdentifier } }) ); - this.collections = repo.collections - .sort() - .map((name) => ({ name, icon: iconForCollection(name), loadedCount: null })); + this.collections = repo.collections.sort().map((name) => collectionSummaryForName(name, null)); this.selectedCollection = preferredCollection(this.collections.map((collection) => collection.name)); if (this.selectedCollection) { @@ -113,11 +112,7 @@ class RepoBrowserState { if (collections.length === 0) return false; - this.collections = collections.map((collection) => ({ - name: collection.name, - icon: iconForCollection(collection.name), - loadedCount: collection.loadedCount - })); + this.collections = collections.map((collection) => collectionSummaryForName(collection.name, collection.loadedCount)); this.selectedCollection = preferredCollection(this.collections.map((collection) => collection.name)); if (this.selectedCollection) { @@ -203,6 +198,8 @@ function preferredCollection(collections: string[]) { } export function iconForCollection(name: string) { + const appIcon = collectionIconMatch(name)?.icon; + if (appIcon) return appIcon; if (name.includes('profile') || name.includes('actor')) return '/icons/humanity/places/user-home.svg'; if (name.includes('chat') || name.includes('convo')) return '/icons/humanity/apps/evolution-mail.svg'; if (name.includes('feed') || name.includes('post')) return '/icons/humanity/apps/internet-feed-reader.svg'; @@ -210,6 +207,10 @@ export function iconForCollection(name: string) { return '/icons/humanity/mimes/text-x-generic.svg'; } +function collectionSummaryForName(name: string, loadedCount: number | null): CollectionSummary { + return { name, icon: iconForCollection(name), appLabel: appLabelForCollection(name), loadedCount }; +} + function summarizeRecord(record: UnknownRecord, handle: string): RepoRecordSummary { const value = isRecordValue(record.value) ? record.value : {}; const text = stringifyField(value.text) ?? stringifyField(value.name) ?? stringifyField(value.displayName); @@ -227,7 +228,9 @@ function summarizeRecord(record: UnknownRecord, handle: string): RepoRecordSumma modified: formatRecordTime(createdAt), collection: collectionFromUri(record.uri), rkey: recordKeyFromUri(record.uri), - json: JSON.stringify(record.value, null, 2) + json: JSON.stringify(record.value, null, 2), + icon: iconForCollection(collectionFromUri(record.uri)), + appLabel: appLabelForCollection(collectionFromUri(record.uri)) }; } diff --git a/src/lib/atproto/types.ts b/src/lib/atproto/types.ts index 71cdf88..01f9da1 100644 --- a/src/lib/atproto/types.ts +++ b/src/lib/atproto/types.ts @@ -11,7 +11,7 @@ export type DidDocument = { service?: Array<{ id?: string; type?: string; serviceEndpoint?: string | string[] | Record }>; }; -export type CollectionSummary = { name: string; icon: string; loadedCount: number | null }; +export type CollectionSummary = { name: string; icon: string; appLabel: string | null; loadedCount: number | null }; export type RepoRecordSummary = { uri: string; @@ -23,6 +23,8 @@ export type RepoRecordSummary = { collection: string; rkey: string; json: string; + icon: string; + appLabel: string | null; }; export type UnknownRecord = { uri: string; cid: string; value: unknown }; diff --git a/src/lib/components/AboutComputer.svelte b/src/lib/components/AboutComputer.svelte index bc41745..7590195 100644 --- a/src/lib/components/AboutComputer.svelte +++ b/src/lib/components/AboutComputer.svelte @@ -44,6 +44,8 @@

View the project on Tangled. + Atmosphere logos courtesy of + atmologos.

diff --git a/src/lib/components/CollectionBrowser.svelte b/src/lib/components/CollectionBrowser.svelte index 5b7bc50..2ed41f8 100644 --- a/src/lib/components/CollectionBrowser.svelte +++ b/src/lib/components/CollectionBrowser.svelte @@ -39,7 +39,7 @@ function openRecord(record: RepoRecordSummary) { repoBrowser.selectedRecord = record; - windowManager.setTitle('gedit', `${record.rkey}.json - gedit`, '/icons/humanity/apps/accessories-text-editor.svg'); + windowManager.setTitle('gedit', `${record.rkey}.json - gedit`, record.icon); windowManager.open('gedit'); } @@ -81,6 +81,9 @@

Selected collection

{repoBrowser.selectedCollection ?? 'No collection selected'}

+ {#if repoBrowser.selectedSummary?.appLabel} +

{repoBrowser.selectedSummary.appLabel}

+ {/if}

{#if repoBrowser.isLoadingRecords} Fetching public records from {accountSetup.identity?.pds ?? 'the public API'}… @@ -125,7 +128,7 @@ {:else} {#each repoBrowser.records as record (record.uri)}