From f5676f5b7aa97564e66d1056beb1bf05c4b5224e Mon Sep 17 00:00:00 2001 From: ari melody Date: Tue, 2 Jul 2024 20:54:41 +0100 Subject: [PATCH] hotfix: fixed thread focus booting back to timeline while logged in, width in chromium browsers --- src/lib/app.css | 1 - src/lib/client/client.js | 21 --------------------- src/lib/ui/Notification.svelte | 1 + src/routes/post/[id]/+page.svelte | 5 ++--- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/lib/app.css b/src/lib/app.css index b2fcd4c..d010639 100644 --- a/src/lib/app.css +++ b/src/lib/app.css @@ -36,7 +36,6 @@ } body { - width: 100vw; margin: 0; padding: 0; diff --git a/src/lib/client/client.js b/src/lib/client/client.js index e6d79ac..b1beb6e 100644 --- a/src/lib/client/client.js +++ b/src/lib/client/client.js @@ -11,13 +11,11 @@ const save_name = "campfire"; export class Client { instance; app; - user; #cache; constructor() { this.instance = null; this.app = null; - this.user = null; this.cache = { users: {}, emojis: {}, @@ -76,25 +74,6 @@ export class Client { return await api.revokeToken(); } - async getClientUser() { - // already known - if (this.user) return this.user; - - // cannot provide- not logged in - if (!this.app || !this.app.token) { - return false; - } - - // logged in- attempt to retrieve using token - const data = await api.verifyCredentials(); - if (!data) { - return false; - } - const user = await api.parseUser(data); - console.log(`Logged in as @${user.username}@${user.host}`); - return user; - } - async getNotifications(since_id, limit, types) { return await api.getNotifications(since_id, limit, types); } diff --git a/src/lib/ui/Notification.svelte b/src/lib/ui/Notification.svelte index 58427c6..2349e08 100644 --- a/src/lib/ui/Notification.svelte +++ b/src/lib/ui/Notification.svelte @@ -75,6 +75,7 @@ {/if} {@html activity_text.replace("%1", mention(data.accounts))} + {#if data.status}
diff --git a/src/routes/post/[id]/+page.svelte b/src/routes/post/[id]/+page.svelte index d9160ee..e2e27aa 100644 --- a/src/routes/post/[id]/+page.svelte +++ b/src/routes/post/[id]/+page.svelte @@ -1,6 +1,7 @@