add settings fields for pocket and cdn endpoints
36 unmodified lines3738394041424344454626 unmodified lines36 unmodified lines {@render _input('slingshot', 'slingshot url (for fetching records & resolving identity)')} {@render _input('spacedust', 'spacedust url (for notifications)')} {@render _input('constellation', 'constellation url (for backlinks)')} {@render _input('jetstream', 'jetstream url (for real-time updates)')} {@render _input('pocket', 'pocket url (for preferences)')} {@render _input('cdn', 'cdn url (for media)')} </div> </div>
<div class="settings-box">26 unmodified lines1233456785 unmodified linesimport type { Did } from '@atcute/lexicons';import { cdnUrl } from '$lib/at';
export const cdn = `https://cdn.bsky.app`;export const cdn = cdnUrl.origin;
export type ImageKind = 'avatar_thumbnail' | 'avatar' | 'feed_thumbnail' | 'feed_fullsize';export type ImageFormat = 'webp' | 'png' | 'jpg';
5 unmodified lines5 unmodified lines678910111213141516179 unmodified lines27282930283132333435363757 unmodified lines9596979894991001011021031045 unmodified lines slingshot: string; spacedust: string; constellation: string; jetstream: string; pocket: string; cdn: string;};
export type SavedFeed = { feed: FeedGenerator, pinned: boolean,};9 unmodified lines endpoints: { slingshot: 'https://slingshot.microcosm.blue', spacedust: 'https://spacedust.microcosm.blue', constellation: 'https://constellation.microcosm.blue', jetstream: 'wss://jetstream2.fr.hose.cam' jetstream: 'wss://jetstream2.fr.hose.cam', pocket: 'https://pocket.at-app.net', cdn: 'https://cdn.bsky.app' }, theme: defaultTheme, socialAppUrl: 'https://bsky.app', feeds: []57 unmodified lines return ( current.endpoints.slingshot !== other.endpoints.slingshot || current.endpoints.spacedust !== other.endpoints.spacedust || current.endpoints.constellation !== other.endpoints.constellation || current.endpoints.jetstream !== other.endpoints.jetstream current.endpoints.jetstream !== other.endpoints.jetstream || current.endpoints.pocket !== other.endpoints.pocket || current.endpoints.cdn !== other.endpoints.cdn );};
3 unmodified lines45678910113 unmodified lines
export const slingshotUrl: URL = new URL(get(settings).endpoints.slingshot);export const spacedustUrl: URL = new URL(get(settings).endpoints.spacedust);export const constellationUrl: URL = new URL(get(settings).endpoints.constellation);export const pocketUrl: URL = new URL(get(settings).endpoints.pocket);export const cdnUrl: URL = new URL(get(settings).endpoints.cdn);
export const httpToDidWeb = (url: string): Did => `did:web:${new URL(url).hostname}`;12345567891064 unmodified linesimport { httpToDidWeb, pocketUrl } from './index';import type { Did } from '@atcute/lexicons/syntax';import type { AtpClient } from './client.svelte';import { err, ok, type Result } from '$lib/result';
const POCKET_PROXY = 'did:web:pocket.at-app.net#pocket_prefs';const POCKET_PROXY = `${httpToDidWeb(pocketUrl.toString())}#pocket_prefs`;
export type Preferences = { mutes?: Did[]; updatedAt: string;64 unmodified lines