fix: PC版設定ページでスマホ用UIが表示されるのを防ぐリダイレクトを追加 (#10326)

* (Fix misskey-dev#10324)設定画面:PC版UIへのリダイレクトをルート遷移時にも実行

* Update changelog

* (fix) missing semicolon

* (fix) strict equals
This commit is contained in:
kakkokari-gtyih
2023-03-19 20:28:19 +09:00
committed by GitHub
parent e542a030e4
commit 866aded6bc
3 changed files with 15 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<div class="baaadecd">
<MkInfo v-if="emailNotConfigured" warn class="info">{{ i18n.ts.emailNotConfiguredWarning }} <MkA to="/settings/email" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
<MkSuperMenu :def="menuDef" :grid="currentPage?.route.name == null"></MkSuperMenu>
<MkSuperMenu :def="menuDef" :grid="narrow"></MkSuperMenu>
</div>
</div>
<div v-if="!(narrow && currentPage?.route.name == null)" class="main">
@@ -230,6 +230,12 @@ onUnmounted(() => {
ro.disconnect();
});
watch(router.currentRef, (to) => {
if (to.route.name === "settings" && to.child?.route.name == null && !narrow) {
router.replace('/settings/profile');
}
});
const emailNotConfigured = computed(() => instance.enableEmail && ($i.email == null || !$i.emailVerified));
provideMetadataReceiver((info) => {