fix(frontend): Fix #15764

This commit is contained in:
syuilo 2025-04-08 10:38:04 +09:00
parent 40097d4aac
commit baf04a1e25
3 changed files with 13 additions and 12 deletions

4
locales/index.d.ts vendored
View File

@ -5390,6 +5390,10 @@ export interface Locale extends ILocale {
* *
*/ */
"readonly": string; "readonly": string;
/**
*
*/
"goToDeck": string;
"_chat": { "_chat": {
/** /**
* *

View File

@ -1343,6 +1343,7 @@ top: "上"
embed: "埋め込み" embed: "埋め込み"
settingsMigrating: "設定を移行しています。しばらくお待ちください... (後ほど、設定→その他→旧設定情報を移行 で手動で移行することもできます)" settingsMigrating: "設定を移行しています。しばらくお待ちください... (後ほど、設定→その他→旧設定情報を移行 で手動で移行することもできます)"
readonly: "読み取り専用" readonly: "読み取り専用"
goToDeck: "デッキへ戻る"
_chat: _chat:
noMessagesYet: "まだメッセージはありません" noMessagesYet: "まだメッセージはありません"

View File

@ -6,16 +6,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div :class="$style.root"> <div :class="$style.root">
<div :class="$style.contents"> <div :class="$style.contents">
<div style="flex: 1; min-height: 0;">
<RouterView/>
</div>
<!-- <!--
デッキUIが設定されている場合はデッキUIに戻れるようにする (ただし?zenが明示された場合は表示しない) デッキUIが設定されている場合はデッキUIに戻れるようにする (ただし?zenが明示された場合は表示しない)
See https://github.com/misskey-dev/misskey/issues/10905 See https://github.com/misskey-dev/misskey/issues/10905
--> -->
<div v-if="showBottom" :class="$style.bottom"> <button v-if="showDeckNav" class="_buttonPrimary" :class="$style.deckNav" @click="goToDeck">{{ i18n.ts.goToDeck }}</button>
<button v-tooltip="i18n.ts.goToMisskey" :class="['_button', '_shadow', $style.button]" @click="goToMisskey"><i class="ti ti-home"></i></button>
<div style="flex: 1; min-height: 0;">
<RouterView/>
</div> </div>
</div> </div>
@ -37,7 +35,7 @@ const isRoot = computed(() => mainRouter.currentRoute.value.name === 'index');
const pageMetadata = ref<null | PageMetadata>(null); const pageMetadata = ref<null | PageMetadata>(null);
const showBottom = !(new URLSearchParams(window.location.search)).has('zen') && ui === 'deck'; const showDeckNav = !(new URLSearchParams(window.location.search)).has('zen') && ui === 'deck';
provide(DI.router, mainRouter); provide(DI.router, mainRouter);
provideMetadataReceiver((metadataGetter) => { provideMetadataReceiver((metadataGetter) => {
@ -53,7 +51,7 @@ provideMetadataReceiver((metadataGetter) => {
}); });
provideReactiveMetadata(pageMetadata); provideReactiveMetadata(pageMetadata);
function goToMisskey() { function goToDeck() {
window.location.href = '/'; window.location.href = '/';
} }
</script> </script>
@ -68,10 +66,8 @@ function goToMisskey() {
height: 100dvh; height: 100dvh;
} }
.bottom { .deckNav {
height: calc(60px + (var(--MI-margin) * 2) + env(safe-area-inset-bottom, 0px)); padding: 4px;
width: 100%;
margin-top: auto;
} }
.button { .button {