'repo:' + collection).join(' ');
@@ -14,9 +14,9 @@ function constructScope() {
}
let blobScope: string | undefined = undefined;
- if (Array.isArray(permissions.blobs)) {
+ if (Array.isArray(permissions.blobs) && permissions.blobs.length > 0) {
blobScope = 'blob?' + permissions.blobs.map((b) => 'accept=' + b).join('&');
- } else if (permissions.blobs) {
+ } else if (permissions.blobs && permissions.blobs.length > 0) {
blobScope = 'blob:' + permissions.blobs;
}
@@ -26,7 +26,7 @@ function constructScope() {
export const metadata = {
client_id: SITE + resolve('/oauth-client-metadata.json'),
- redirect_uris: [SITE + resolve('/oauth/callback')],
+ redirect_uris: [SITE + resolve(REDIRECT_PATH)],
scope: constructScope(),
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code'],
diff --git a/src/lib/atproto/settings.ts b/src/lib/atproto/settings.ts
index 1f67ca4..64795fe 100644
--- a/src/lib/atproto/settings.ts
+++ b/src/lib/atproto/settings.ts
@@ -46,4 +46,11 @@ export type AllowedCollection = ExtractCollectionBase<(typeof permissions.collec
// which PDS to use for signup
// ATTENTION: pds.rip is only for development, all accounts get deleted automatically after a week
-export const signUpPDS = dev ? 'https://pds.rip/' : 'https://selfhosted.social';
+const devPDS = 'https://pds.rip/';
+const prodPDS = 'https://selfhosted.social/';
+export const signUpPDS = dev ? devPDS : prodPDS;
+
+// where to redirect after oauth login/signup, e.g. /oauth/callback
+export const REDIRECT_PATH = '/oauth/callback';
+
+export const DOH_RESOLVER = 'https://mozilla.cloudflare-dns.com/dns-query';
diff --git a/src/lib/cards/FluidTextCard/EditingFluidTextCard.svelte b/src/lib/cards/FluidTextCard/EditingFluidTextCard.svelte
index a51f595..12b0d86 100644
--- a/src/lib/cards/FluidTextCard/EditingFluidTextCard.svelte
+++ b/src/lib/cards/FluidTextCard/EditingFluidTextCard.svelte
@@ -1,5 +1,6 @@
@@ -36,7 +46,7 @@
: ''}"
onclick={handleClick}
>
- {#key item.color}
+ {#key item.color + '-' + rerender.toString()}
{/key}
diff --git a/src/lib/website/Controls.svelte b/src/lib/website/Controls.svelte
new file mode 100644
index 0000000..131f5fb
--- /dev/null
+++ b/src/lib/website/Controls.svelte
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+ {#if !isMobile() && !getHideProfileSection(data)}
+
+ {/if}
+
+
+
updateTheme(newAccent, newBase)}
+ />
+
diff --git a/src/lib/website/EditableProfile.svelte b/src/lib/website/EditableProfile.svelte
index 94bf558..7465016 100644
--- a/src/lib/website/EditableProfile.svelte
+++ b/src/lib/website/EditableProfile.svelte
@@ -11,24 +11,6 @@
let { data = $bindable(), hideBlento = false }: { data: WebsiteData; hideBlento?: boolean } =
$props();
- let accentColor = $derived(data.publication?.preferences?.accentColor ?? 'pink');
- let baseColor = $derived(data.publication?.preferences?.baseColor ?? 'stone');
-
- function updateTheme(newAccent: string, newBase: string) {
- data.publication.preferences ??= {};
- data.publication.preferences.accentColor = newAccent;
- data.publication.preferences.baseColor = newBase;
- data = { ...data };
- }
-
- let profilePosition = $derived(getProfilePosition(data));
-
- function toggleProfilePosition() {
- data.publication.preferences ??= {};
- data.publication.preferences.profilePosition = profilePosition === 'side' ? 'top' : 'side';
- data = { ...data };
- }
-
let fileInput: HTMLInputElement;
let isHoveringAvatar = $state(false);
@@ -62,7 +44,7 @@
fileInput.click();
}
- let isMobile = getIsMobile();
+ let profilePosition = $derived(getProfilePosition(data));
-
-
-
-
- {#if !isMobile()}
-
- {/if}
-
-
-
updateTheme(newAccent, newBase)}
- />
-
-
{/if}
+
+
{#if showingMobileView}
- {#if getHideProfileSection(data)}
-
-
-
updateTheme(newAccent, newBase)}
- />
-
- {/if}