From bbc1580010aa50fc9beb1b391f752019a44dada3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sat, 7 Jan 2023 21:53:09 +0800 Subject: [PATCH 01/45] refactor: add bot indicator icon --- components/account/AccountBotIndicator.vue | 19 +++++++++++++++++-- components/account/AccountHeader.vue | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/components/account/AccountBotIndicator.vue b/components/account/AccountBotIndicator.vue index 86a0e729..1a4cfa68 100644 --- a/components/account/AccountBotIndicator.vue +++ b/components/account/AccountBotIndicator.vue @@ -1,5 +1,20 @@ + + diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 870da89d..33870e7b 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -76,7 +76,7 @@ const isSelf = $computed(() => currentUser.value?.account.id === account.id)
- +
From 30e4ef57df7f56be5f7225e5a9f42845f24047e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sat, 7 Jan 2023 22:03:20 +0800 Subject: [PATCH 02/45] perf: don't destroy elements when zen mode closes #834 --- components/status/StatusCard.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index 8a364aa1..ee45fc8f 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -138,7 +138,7 @@ const isDM = $computed(() => status.visibility === 'direct')
-
+
@@ -154,9 +154,7 @@ const isDM = $computed(() => status.visibility === 'direct')
-
- -
+
From d386a2dbbe531c59aa7c7e16508a1bab4d5a2b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sat, 7 Jan 2023 22:21:48 +0800 Subject: [PATCH 03/45] fix: hashtag id --- components/command/CommandPanel.vue | 2 +- components/search/SearchHashtagInfo.vue | 4 +++- components/search/SearchWidget.vue | 2 +- components/search/types.ts | 4 ++-- composables/masto/search.ts | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/command/CommandPanel.vue b/components/command/CommandPanel.vue index ed60ff4f..b5c927a2 100644 --- a/components/command/CommandPanel.vue +++ b/components/command/CommandPanel.vue @@ -42,7 +42,7 @@ const searchResult = $computed(() => { const hashtagList = hashtags.value.slice(0, 3) .map(hashtag => ({ type: 'hashtag', - id: hashtag.id, + id: `hashtag-${hashtag.name}`, hashtag, to: getTagRoute(hashtag.name), })) diff --git a/components/search/SearchHashtagInfo.vue b/components/search/SearchHashtagInfo.vue index 0fe2d1fd..f41350c7 100644 --- a/components/search/SearchHashtagInfo.vue +++ b/components/search/SearchHashtagInfo.vue @@ -1,7 +1,9 @@ From 2b5badf2352648b19f4b7476c8b1657f54988313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sat, 7 Jan 2023 22:56:23 +0800 Subject: [PATCH 06/45] refactor: cleanup unused props --- components/status/StatusCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index ee45fc8f..9229bfd2 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -19,7 +19,7 @@ const props = withDefaults( // to the main expanded post main?: Status }>(), - { actions: true, showReplyTo: true }, + { actions: true }, ) const status = $computed(() => { From 0bf76fdf8673968b66b725e8f70f9342cd7dc329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sat, 7 Jan 2023 22:59:57 +0800 Subject: [PATCH 07/45] refactor: improve search UX --- composables/masto/search.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composables/masto/search.ts b/composables/masto/search.ts index 6b0f8722..21f4f723 100644 --- a/composables/masto/search.ts +++ b/composables/masto/search.ts @@ -56,6 +56,12 @@ export function useSearch(query: MaybeRef, options?: UseSearchOptions) { }))] } + watch(() => unref(query), () => { + if (!unref(query) || !isMastoInitialised.value) + return + loading.value = true + }) + debouncedWatch(() => unref(query), async () => { if (!unref(query) || !isMastoInitialised.value) return @@ -78,7 +84,7 @@ export function useSearch(query: MaybeRef, options?: UseSearchOptions) { appendResults(nextResults.value, true) loading.value = false - }, { debounce: 500 }) + }, { debounce: 300 }) const next = async () => { if (!unref(query) || !isMastoInitialised.value || !paginator) From 31ae413da4e78ae0f93e13475e4d503a662fd606 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 7 Jan 2023 10:36:21 -0800 Subject: [PATCH 08/45] fix: allow logout without push notifications (#856) --- composables/users.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composables/users.ts b/composables/users.ts index e4dce99c..0cdf110a 100644 --- a/composables/users.ts +++ b/composables/users.ts @@ -183,6 +183,9 @@ export function getUsersIndexByUserId(userId: string) { } export async function removePushNotificationData(user: UserLogin, fromSWPushManager = true) { + if (!user.pushSubscription) + return + // clear push subscription user.pushSubscription = undefined const { acct } = user.account From b5e14810afab4326572b55cb07afeaa7acb73a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sat, 7 Jan 2023 21:27:28 +0100 Subject: [PATCH 09/45] feat(i18n): add i18n to `StatusReplyingTo` (#857) Co-authored-by: Michel Edighoffer --- components/status/StatusReplyingTo.vue | 2 +- locales/en-GB.json | 3 ++- locales/en-US.json | 3 ++- locales/es-ES.json | 3 ++- locales/fr-FR.json | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/status/StatusReplyingTo.vue b/components/status/StatusReplyingTo.vue index 67a5e822..fd05fdac 100644 --- a/components/status/StatusReplyingTo.vue +++ b/components/status/StatusReplyingTo.vue @@ -17,7 +17,7 @@ const account = isSelf ? computed(() => status.account) : useAccountById(status. v-if="status.inReplyToId" flex="~" items-center h-auto font-bold text-sm text-secondary gap-1 :to="getStatusInReplyToRoute(status)" - :title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'" + :title="$t('status.replying_to', [account ? getDisplayName(account) : $t('status.someone')])" >