appview-less bluesky client
27
fork

Configure Feed

Select the types of activity you want to include in your feed.

add settings fields for pocket and cdn endpoints

dawn 46800617 527024a1

+18 -4
+2
src/components/SettingsAdvancedTab.svelte
··· 38 38 {@render _input('spacedust', 'spacedust url (for notifications)')} 39 39 {@render _input('constellation', 'constellation url (for backlinks)')} 40 40 {@render _input('jetstream', 'jetstream url (for real-time updates)')} 41 + {@render _input('pocket', 'pocket url (for preferences)')} 42 + {@render _input('cdn', 'cdn url (for media)')} 41 43 </div> 42 44 </div> 43 45
+2
src/lib/at/index.ts
··· 5 5 export const slingshotUrl: URL = new URL(get(settings).endpoints.slingshot); 6 6 export const spacedustUrl: URL = new URL(get(settings).endpoints.spacedust); 7 7 export const constellationUrl: URL = new URL(get(settings).endpoints.constellation); 8 + export const pocketUrl: URL = new URL(get(settings).endpoints.pocket); 9 + export const cdnUrl: URL = new URL(get(settings).endpoints.cdn); 8 10 9 11 export const httpToDidWeb = (url: string): Did => `did:web:${new URL(url).hostname}`;
+2 -1
src/lib/at/pocket.ts
··· 1 + import { httpToDidWeb, pocketUrl } from './index'; 1 2 import type { Did } from '@atcute/lexicons/syntax'; 2 3 import type { AtpClient } from './client.svelte'; 3 4 import { err, ok, type Result } from '$lib/result'; 4 5 5 - const POCKET_PROXY = 'did:web:pocket.at-app.net#pocket_prefs'; 6 + const POCKET_PROXY = `${httpToDidWeb(pocketUrl.toString())}#pocket_prefs`; 6 7 7 8 export type Preferences = { 8 9 mutes?: Did[];
+2 -1
src/lib/cdn.ts
··· 1 1 import type { Did } from '@atcute/lexicons'; 2 + import { cdnUrl } from '$lib/at'; 2 3 3 - export const cdn = `https://cdn.bsky.app`; 4 + export const cdn = cdnUrl.origin; 4 5 5 6 export type ImageKind = 'avatar_thumbnail' | 'avatar' | 'feed_thumbnail' | 'feed_fullsize'; 6 7 export type ImageFormat = 'webp' | 'png' | 'jpg';
+10 -2
src/lib/settings.ts
··· 7 7 spacedust: string; 8 8 constellation: string; 9 9 jetstream: string; 10 + pocket: string; 11 + cdn: string; 10 12 }; 13 + 11 14 export type SavedFeed = { 12 15 feed: FeedGenerator, 13 16 pinned: boolean, ··· 25 28 slingshot: 'https://slingshot.microcosm.blue', 26 29 spacedust: 'https://spacedust.microcosm.blue', 27 30 constellation: 'https://constellation.microcosm.blue', 28 - jetstream: 'wss://jetstream2.fr.hose.cam' 31 + jetstream: 'wss://jetstream2.fr.hose.cam', 32 + pocket: 'https://pocket.at-app.net', 33 + cdn: 'https://cdn.bsky.app' 29 34 }, 30 35 theme: defaultTheme, 31 36 socialAppUrl: 'https://bsky.app', ··· 91 96 current.endpoints.slingshot !== other.endpoints.slingshot || 92 97 current.endpoints.spacedust !== other.endpoints.spacedust || 93 98 current.endpoints.constellation !== other.endpoints.constellation || 94 - current.endpoints.jetstream !== other.endpoints.jetstream 99 + current.endpoints.jetstream !== other.endpoints.jetstream || 100 + current.endpoints.pocket !== other.endpoints.pocket || 101 + current.endpoints.cdn !== other.endpoints.cdn 95 102 ); 96 103 }; 104 +