diff --git a/locales/index.d.ts b/locales/index.d.ts index 4341828481..494caf49cc 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5390,6 +5390,10 @@ export interface Locale extends ILocale { * 読み取り専用 */ "readonly": string; + /** + * デッキへ戻る + */ + "goToDeck": string; "_chat": { /** * まだメッセージはありません diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0d34bbc1ca..21b2b457b1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1343,6 +1343,7 @@ top: "上" embed: "埋め込み" settingsMigrating: "設定を移行しています。しばらくお待ちください... (後ほど、設定→その他→旧設定情報を移行 で手動で移行することもできます)" readonly: "読み取り専用" +goToDeck: "デッキへ戻る" _chat: noMessagesYet: "まだメッセージはありません" diff --git a/packages/frontend/src/ui/zen.vue b/packages/frontend/src/ui/zen.vue index 3e4d452281..800aef8696 100644 --- a/packages/frontend/src/ui/zen.vue +++ b/packages/frontend/src/ui/zen.vue @@ -6,16 +6,14 @@ SPDX-License-Identifier: AGPL-3.0-only <template> <div :class="$style.root"> <div :class="$style.contents"> - <div style="flex: 1; min-height: 0;"> - <RouterView/> - </div> - <!-- デッキUIが設定されている場合はデッキUIに戻れるようにする (ただし?zenが明示された場合は表示しない) See https://github.com/misskey-dev/misskey/issues/10905 --> - <div v-if="showBottom" :class="$style.bottom"> - <button v-tooltip="i18n.ts.goToMisskey" :class="['_button', '_shadow', $style.button]" @click="goToMisskey"><i class="ti ti-home"></i></button> + <button v-if="showDeckNav" class="_buttonPrimary" :class="$style.deckNav" @click="goToDeck">{{ i18n.ts.goToDeck }}</button> + + <div style="flex: 1; min-height: 0;"> + <RouterView/> </div> </div> @@ -37,7 +35,7 @@ const isRoot = computed(() => mainRouter.currentRoute.value.name === 'index'); 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); provideMetadataReceiver((metadataGetter) => { @@ -53,7 +51,7 @@ provideMetadataReceiver((metadataGetter) => { }); provideReactiveMetadata(pageMetadata); -function goToMisskey() { +function goToDeck() { window.location.href = '/'; } </script> @@ -68,10 +66,8 @@ function goToMisskey() { height: 100dvh; } -.bottom { - height: calc(60px + (var(--MI-margin) * 2) + env(safe-area-inset-bottom, 0px)); - width: 100%; - margin-top: auto; +.deckNav { + padding: 4px; } .button {