refactor
This commit is contained in:
parent
7f1cd614db
commit
f765b374c7
|
@ -4,6 +4,59 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<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.menuDrawerBg"
|
||||||
|
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.menuDrawer">
|
||||||
|
<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>
|
||||||
|
|
||||||
<component
|
<component
|
||||||
:is="popup.component"
|
:is="popup.component"
|
||||||
v-for="popup in popups"
|
v-for="popup in popups"
|
||||||
|
@ -59,9 +112,14 @@ import { useStream } from '@/stream.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
|
import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue';
|
||||||
|
|
||||||
const XStreamIndicator = defineAsyncComponent(() => import('./stream-indicator.vue'));
|
const XStreamIndicator = defineAsyncComponent(() => import('./stream-indicator.vue'));
|
||||||
const XUpload = defineAsyncComponent(() => import('./upload.vue'));
|
const XUpload = defineAsyncComponent(() => import('./upload.vue'));
|
||||||
|
const XWidgets = defineAsyncComponent(() => import('./widgets.vue'));
|
||||||
|
|
||||||
|
const drawerMenuShowing = defineModel<boolean>('drawerMenuShowing');
|
||||||
|
const widgetsShowing = defineModel<boolean>('widgetsShowing');
|
||||||
|
|
||||||
const dev = _DEV_;
|
const dev = _DEV_;
|
||||||
|
|
||||||
|
@ -100,6 +158,50 @@ if ($i) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<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);
|
||||||
|
}
|
||||||
|
|
||||||
.transition_notification_move,
|
.transition_notification_move,
|
||||||
.transition_notification_enterActive,
|
.transition_notification_enterActive,
|
||||||
.transition_notification_leaveActive {
|
.transition_notification_leaveActive {
|
||||||
|
@ -114,6 +216,54 @@ if ($i) {
|
||||||
transform: translateX(-250px);
|
transform: translateX(-250px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menuDrawerBg {
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuDrawer {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.notifications {
|
.notifications {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 3900000;
|
z-index: 3900000;
|
||||||
|
|
|
@ -71,60 +71,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<XMobileFooterMenu v-if="isMobile" v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/>
|
<XMobileFooterMenu v-if="isMobile" v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Transition
|
<XCommon v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/>
|
||||||
: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/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -134,7 +81,6 @@ import { v4 as uuid } from 'uuid';
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import XSidebar from '@/ui/_common_/navbar.vue';
|
import XSidebar from '@/ui/_common_/navbar.vue';
|
||||||
import XNavbarH from '@/ui/_common_/navbar-h.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 XMobileFooterMenu from '@/ui/_common_/mobile-footer-menu.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { $i } from '@/i.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 XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
|
||||||
const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue'));
|
const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue'));
|
||||||
const XWidgets = defineAsyncComponent(() => import('./_common_/widgets.vue'));
|
|
||||||
|
|
||||||
const columnComponents = {
|
const columnComponents = {
|
||||||
main: XMainColumn,
|
main: XMainColumn,
|
||||||
|
@ -269,50 +214,6 @@ if (prefer.s['deck.wallpaper'] != null) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<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 {
|
.root {
|
||||||
$nav-hide-threshold: 650px; // TODO: どこかに集約したい
|
$nav-hide-threshold: 650px; // TODO: どこかに集約したい
|
||||||
|
|
||||||
|
@ -344,6 +245,9 @@ if (prefer.s['deck.wallpaper'] != null) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
|
// これがないと狭い画面でマージンが広いデッキを表示したときにナビゲーションフッターが画面の外に追いやられて操作不能になる場合がある
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.columns {
|
.columns {
|
||||||
|
@ -441,52 +345,4 @@ if (prefer.s['deck.wallpaper'] != null) {
|
||||||
.bottomMenuRight {
|
.bottomMenuRight {
|
||||||
margin-left: auto;
|
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>
|
</style>
|
||||||
|
|
|
@ -22,60 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<XWidgets/>
|
<XWidgets/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Transition
|
<XCommon v-model:drawerMenuShowing="drawerMenuShowing" v-model:widgetsShowing="widgetsShowing"/>
|
||||||
: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.menuDrawerBg"
|
|
||||||
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.menuDrawer">
|
|
||||||
<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/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -85,7 +32,6 @@ import { instanceName } from '@@/js/config.js';
|
||||||
import { isLink } from '@@/js/is-link.js';
|
import { isLink } from '@@/js/is-link.js';
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import type { PageMetadata } from '@/page.js';
|
import type { PageMetadata } from '@/page.js';
|
||||||
import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue';
|
|
||||||
import XMobileFooterMenu from '@/ui/_common_/mobile-footer-menu.vue';
|
import XMobileFooterMenu from '@/ui/_common_/mobile-footer-menu.vue';
|
||||||
import XPreferenceRestore from '@/ui/_common_/PreferenceRestore.vue';
|
import XPreferenceRestore from '@/ui/_common_/PreferenceRestore.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -178,50 +124,6 @@ const onContextmenu = (ev) => {
|
||||||
$ui-font-size: 1em; // TODO: どこかに集約したい
|
$ui-font-size: 1em; // TODO: どこかに集約したい
|
||||||
$widgets-hide-threshold: 1090px;
|
$widgets-hide-threshold: 1090px;
|
||||||
|
|
||||||
.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 {
|
.root {
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
|
@ -248,24 +150,6 @@ $widgets-hide-threshold: 1090px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menuDrawerBg {
|
|
||||||
z-index: 1001;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuDrawer {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.statusbars {
|
.statusbars {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -285,34 +169,4 @@ $widgets-hide-threshold: 1090px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue