diff --git a/packages/client/src/components/global/avatar.vue b/packages/client/src/components/global/avatar.vue
index 9e8979fe5..27cfb6e4d 100644
--- a/packages/client/src/components/global/avatar.vue
+++ b/packages/client/src/components/global/avatar.vue
@@ -35,9 +35,9 @@ const emit = defineEmits<{
(e: 'click', ev: MouseEvent): void;
}>();
-const url = defaultStore.state.disableShowingAnimatedImages
+const url = $computed(() => defaultStore.state.disableShowingAnimatedImages
? getStaticImageUrl(props.user.avatarUrl)
- : props.user.avatarUrl;
+ : props.user.avatarUrl);
function onClick(ev: MouseEvent) {
emit('click', ev);
diff --git a/packages/client/src/pages/settings/profile.vue b/packages/client/src/pages/settings/profile.vue
index 9a2395872..f875146a2 100644
--- a/packages/client/src/pages/settings/profile.vue
+++ b/packages/client/src/pages/settings/profile.vue
@@ -3,50 +3,50 @@
- {{ $ts._profile.changeAvatar }}
+ {{ i18n.locale._profile.changeAvatar }}
-
{{ $ts._profile.changeBanner }}
+
{{ i18n.locale._profile.changeBanner }}
-
- {{ $ts._profile.name }}
+
+ {{ i18n.locale._profile.name }}
-
- {{ $ts._profile.description }}
- {{ $ts._profile.youCanIncludeHashtags }}
+
+ {{ i18n.locale._profile.description }}
+ {{ i18n.locale._profile.youCanIncludeHashtags }}
-
- {{ $ts.location }}
+
+ {{ i18n.locale.location }}
-
- {{ $ts.birthday }}
+
+ {{ i18n.locale.birthday }}
-
- {{ $ts.language }}
+
+ {{ i18n.locale.language }}
- {{ $ts._profile.metadataEdit }}
- {{ $ts._profile.metadataDescription }}
+ {{ i18n.locale._profile.metadataEdit }}
+ {{ i18n.locale._profile.metadataDescription }}
- {{ $ts.flagAsCat }}{{ $ts.flagAsCatDescription }}
+ {{ i18n.locale.flagAsCat }}{{ i18n.locale.flagAsCatDescription }}
- {{ $ts.flagAsBot }}{{ $ts.flagAsBotDescription }}
+ {{ i18n.locale.flagAsBot }}{{ i18n.locale.flagAsBotDescription }}
- {{ $ts.alwaysMarkSensitive }}
+ {{ i18n.locale.alwaysMarkSensitive }}
-
diff --git a/packages/client/src/scripts/use-leave-guard.ts b/packages/client/src/scripts/use-leave-guard.ts
index 21899af59..398425625 100644
--- a/packages/client/src/scripts/use-leave-guard.ts
+++ b/packages/client/src/scripts/use-leave-guard.ts
@@ -1,4 +1,5 @@
import { inject, onUnmounted, Ref } from 'vue';
+import { onBeforeRouteLeave } from 'vue-router';
import { i18n } from '@/i18n';
import * as os from '@/os';
@@ -16,6 +17,17 @@ export function useLeaveGuard(enabled: Ref) {
return canceled;
});
+ } else {
+ onBeforeRouteLeave(async (to, from) => {
+ if (!enabled.value) return true;
+
+ const { canceled } = await os.confirm({
+ type: 'warning',
+ text: i18n.locale.leaveConfirm,
+ });
+
+ return !canceled;
+ });
}
/*