···11+import { settings } from '$lib/settings';
22+import { get } from 'svelte/store';
33+44+export const slingshotUrl: URL = new URL(get(settings).endpoints.slingshot);
55+export const spacedustUrl: URL = new URL(get(settings).endpoints.spacedust);
66+export const constellationUrl: URL = new URL(get(settings).endpoints.constellation);
+1-1
src/lib/at/oauth.ts
···1414 WebDidDocumentResolver,
1515 XrpcHandleResolver
1616} from '@atcute/identity-resolver';
1717-import { slingshotUrl } from './client';
1817import type { ActorIdentifier } from '@atcute/lexicons';
1918import { err, ok, type Result } from '$lib/result';
2019import type { AtprotoDid } from '@atcute/lexicons/syntax';
2120import { clientId, oauthMetadata, redirectUri } from '$lib/oauth';
2121+import { slingshotUrl } from '.';
22222323configureOAuth({
2424 metadata: {
···1212 return { ok: true, value };
1313};
1414export const err = <E>(error: E): Err<E> => {
1515+ console.error(error);
1516 return { ok: false, error };
1617};
1718export const expect = <T, E>(v: Result<T, E>, msg: string = 'expected result to not be error:') => {
+6-1
src/routes/[...catchall]/+page.svelte
···3232 import { JetstreamSubscription } from '@atcute/jetstream';
3333 import { settings } from '$lib/settings';
3434 import type { Sort } from '$lib/following';
3535+ import { SvelteMap } from 'svelte/reactivity';
35363637 const { data: loadData }: PageProps = $props();
3738···8384 else animClass = 'animate-fade-in-scale';
8485 });
85868686- let postComposerState = $state<PostComposerState>({ focus: 'null', text: '' });
8787+ let postComposerState = $state<PostComposerState>({
8888+ focus: 'null',
8989+ text: '',
9090+ blobsState: new SvelteMap()
9191+ });
8792 let showScrollToTop = $state(false);
8893 const handleScroll = () => {
8994 if (currentRoute.path === '/' || currentRoute.path === '/profile/:actor')
+1-2
src/routes/[...catchall]/+page.ts
···11-import { replaceState } from '$app/navigation';
21import { addAccount, loggingIn } from '$lib/accounts';
32import { AtpClient } from '$lib/at/client';
43import { flow, sessions } from '$lib/at/oauth';
···2423 const currentUrl = new URL(window.location.href);
2524 // scrub history so auth state cant be replayed
2625 try {
2727- replaceState('', '/');
2626+ history.replaceState(null, '', '/');
2827 } catch {
2928 // if router was unitialized then we probably dont need to scrub anyway
3029 // so its fine