diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-08 08:18:48 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-08 08:18:48 +0900 |
| commit | f765b374c7b2681ba198f609401dbd9c44bb738c (patch) | |
| tree | d7892e8ec4bdc37d561da66fa48d302171e0b738 /packages/frontend/src/ui/deck.vue | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-f765b374c7b2681ba198f609401dbd9c44bb738c.tar.gz misskey-f765b374c7b2681ba198f609401dbd9c44bb738c.tar.bz2 misskey-f765b374c7b2681ba198f609401dbd9c44bb738c.zip | |
refactor
Diffstat (limited to 'packages/frontend/src/ui/deck.vue')
| -rw-r--r-- | packages/frontend/src/ui/deck.vue | 152 |
1 files changed, 4 insertions, 148 deletions
diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue index 91da178a44..96961d951f 100644 --- a/packages/frontend/src/ui/deck.vue +++ b/packages/frontend/src/ui/deck.vue @@ -71,60 +71,7 @@ SPDX-License-Identifier: AGPL-3.0-only <XMobileFooterMenu v-if="isMobile" v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/> </div> - <Transition - :enterActiveClass="prefer.s.animation ? $style.transition_menuDrawerBg_enterActive : ''" - :leaveActiveClass="prefer.s.animation ? $style.transition_menuDrawerBg_leaveActive : ''" - :enterFromClass="prefer.s.animation ? $style.transition_menuDrawerBg_enterFrom : ''" - :leaveToClass="prefer.s.animation ? $style.transition_menuDrawerBg_leaveTo : ''" - > - <div - v-if="drawerMenuShowing" - :class="$style.menuBg" - class="_modalBg" - @click="drawerMenuShowing = false" - @touchstart.passive="drawerMenuShowing = false" - ></div> - </Transition> - - <Transition - :enterActiveClass="prefer.s.animation ? $style.transition_menuDrawer_enterActive : ''" - :leaveActiveClass="prefer.s.animation ? $style.transition_menuDrawer_leaveActive : ''" - :enterFromClass="prefer.s.animation ? $style.transition_menuDrawer_enterFrom : ''" - :leaveToClass="prefer.s.animation ? $style.transition_menuDrawer_leaveTo : ''" - > - <div v-if="drawerMenuShowing" :class="$style.menu"> - <XDrawerMenu/> - </div> - </Transition> - - <Transition - :enterActiveClass="prefer.s.animation ? $style.transition_widgetsDrawerBg_enterActive : ''" - :leaveActiveClass="prefer.s.animation ? $style.transition_widgetsDrawerBg_leaveActive : ''" - :enterFromClass="prefer.s.animation ? $style.transition_widgetsDrawerBg_enterFrom : ''" - :leaveToClass="prefer.s.animation ? $style.transition_widgetsDrawerBg_leaveTo : ''" - > - <div - v-if="widgetsShowing" - :class="$style.widgetsDrawerBg" - class="_modalBg" - @click="widgetsShowing = false" - @touchstart.passive="widgetsShowing = false" - ></div> - </Transition> - - <Transition - :enterActiveClass="prefer.s.animation ? $style.transition_widgetsDrawer_enterActive : ''" - :leaveActiveClass="prefer.s.animation ? $style.transition_widgetsDrawer_leaveActive : ''" - :enterFromClass="prefer.s.animation ? $style.transition_widgetsDrawer_enterFrom : ''" - :leaveToClass="prefer.s.animation ? $style.transition_widgetsDrawer_leaveTo : ''" - > - <div v-if="widgetsShowing" :class="$style.widgetsDrawer"> - <button class="_button" :class="$style.widgetsCloseButton" @click="widgetsShowing = false"><i class="ti ti-x"></i></button> - <XWidgets/> - </div> - </Transition> - - <XCommon/> + <XCommon v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/> </div> </template> @@ -134,7 +81,6 @@ import { v4 as uuid } from 'uuid'; import XCommon from './_common_/common.vue'; import XSidebar from '@/ui/_common_/navbar.vue'; import XNavbarH from '@/ui/_common_/navbar-h.vue'; -import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue'; import XMobileFooterMenu from '@/ui/_common_/mobile-footer-menu.vue'; import * as os from '@/os.js'; import { $i } from '@/i.js'; @@ -156,7 +102,6 @@ import { columns, layout, columnTypes, switchProfileMenu, addColumn as addColumn const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue')); -const XWidgets = defineAsyncComponent(() => import('./_common_/widgets.vue')); const columnComponents = { main: XMainColumn, @@ -269,50 +214,6 @@ if (prefer.s['deck.wallpaper'] != null) { </script> <style lang="scss" module> -.transition_menuDrawerBg_enterActive, -.transition_menuDrawerBg_leaveActive { - opacity: 1; - transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1); -} -.transition_menuDrawerBg_enterFrom, -.transition_menuDrawerBg_leaveTo { - opacity: 0; -} - -.transition_menuDrawer_enterActive, -.transition_menuDrawer_leaveActive { - opacity: 1; - transform: translateX(0); - transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1); -} -.transition_menuDrawer_enterFrom, -.transition_menuDrawer_leaveTo { - opacity: 0; - transform: translateX(-240px); -} - -.transition_widgetsDrawerBg_enterActive, -.transition_widgetsDrawerBg_leaveActive { - opacity: 1; - transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1); -} -.transition_widgetsDrawerBg_enterFrom, -.transition_widgetsDrawerBg_leaveTo { - opacity: 0; -} - -.transition_widgetsDrawer_enterActive, -.transition_widgetsDrawer_leaveActive { - opacity: 1; - transform: translateX(0); - transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1); -} -.transition_widgetsDrawer_enterFrom, -.transition_widgetsDrawer_leaveTo { - opacity: 0; - transform: translateX(-240px); -} - .root { $nav-hide-threshold: 650px; // TODO: どこかに集約したい @@ -344,6 +245,9 @@ if (prefer.s['deck.wallpaper'] != null) { flex: 1; display: flex; flex-direction: row; + + // これがないと狭い画面でマージンが広いデッキを表示したときにナビゲーションフッターが画面の外に追いやられて操作不能になる場合がある + min-height: 0; } .columns { @@ -441,52 +345,4 @@ if (prefer.s['deck.wallpaper'] != null) { .bottomMenuRight { margin-left: auto; } - -.menuBg { - z-index: 1001; -} - -.menu { - position: fixed; - top: 0; - left: 0; - z-index: 1001; - height: 100dvh; - width: 240px; - box-sizing: border-box; - contain: strict; - overflow: auto; - overscroll-behavior: contain; - background: var(--MI_THEME-navBg); -} - -.widgetsDrawerBg { - z-index: 1001; -} - -.widgetsDrawer { - position: fixed; - top: 0; - left: 0; - z-index: 1001; - width: 310px; - height: 100dvh; - padding: var(--MI-margin) var(--MI-margin) calc(var(--MI-margin) + env(safe-area-inset-bottom, 0px)) !important; - box-sizing: border-box; - overflow: auto; - overscroll-behavior: contain; - background: var(--MI_THEME-bg); -} - -.widgetsCloseButton { - padding: 8px; - display: block; - margin: 0 auto; -} - -@media (min-width: 370px) { - .widgetsCloseButton { - display: none; - } -} </style> |