diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-08 18:30:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-08 18:30:40 +0900 |
| commit | f8ed6b1a541decb4ebef7b7dec5bab6c72f28e09 (patch) | |
| tree | 1bd5f0ddf79784ed6e53217645f6a82b282362b9 /packages | |
| parent | fix(frontend): チャンネルが新規作成できなかったのを修正 (diff) | |
| download | misskey-f8ed6b1a541decb4ebef7b7dec5bab6c72f28e09.tar.gz misskey-f8ed6b1a541decb4ebef7b7dec5bab6c72f28e09.tar.bz2 misskey-f8ed6b1a541decb4ebef7b7dec5bab6c72f28e09.zip | |
refactor
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/components/MkWindow.vue | 4 | ||||
| -rw-r--r-- | packages/frontend/src/directives/container.ts | 21 | ||||
| -rw-r--r-- | packages/frontend/src/directives/index.ts | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/channel.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/my-lists/list.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/ui/deck/column.vue | 4 | ||||
| -rw-r--r-- | packages/frontend/src/ui/universal.vue | 4 |
7 files changed, 8 insertions, 31 deletions
diff --git a/packages/frontend/src/components/MkWindow.vue b/packages/frontend/src/components/MkWindow.vue index 687abed632..b662479b2a 100644 --- a/packages/frontend/src/components/MkWindow.vue +++ b/packages/frontend/src/components/MkWindow.vue @@ -29,7 +29,7 @@ <button v-if="closeButton" v-tooltip="i18n.ts.close" class="_button" :class="$style.headerButton" @click="close()"><i class="ti ti-x"></i></button> </span> </div> - <div v-container :class="$style.content"> + <div :class="$style.content"> <slot></slot> </div> </div> @@ -541,7 +541,7 @@ defineExpose({ flex: 1; overflow: auto; background: var(--panel); - container-type: inline-size; + container-type: size; } $handleSize: 8px; diff --git a/packages/frontend/src/directives/container.ts b/packages/frontend/src/directives/container.ts deleted file mode 100644 index a8a93eb9be..0000000000 --- a/packages/frontend/src/directives/container.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Directive } from 'vue'; - -const map = new WeakMap<HTMLElement, ResizeObserver>(); - -export default { - mounted(el: HTMLElement, binding, vn) { - const ro = new ResizeObserver((entries, observer) => { - el.style.setProperty('--containerHeight', el.offsetHeight + 'px'); - }); - ro.observe(el); - map.set(el, ro); - }, - - unmounted(el, binding, vn) { - const ro = map.get(el); - if (ro) { - ro.disconnect(); - map.delete(el); - } - }, -} as Directive; diff --git a/packages/frontend/src/directives/index.ts b/packages/frontend/src/directives/index.ts index 064ee4f64b..7847d661d4 100644 --- a/packages/frontend/src/directives/index.ts +++ b/packages/frontend/src/directives/index.ts @@ -11,7 +11,6 @@ import clickAnime from './click-anime'; import panel from './panel'; import adaptiveBorder from './adaptive-border'; import adaptiveBg from './adaptive-bg'; -import container from './container'; export default function(app: App) { for (const [key, value] of Object.entries(directives)) { @@ -32,5 +31,4 @@ export const directives = { 'panel': panel, 'adaptive-border': adaptiveBorder, 'adaptive-bg': adaptiveBg, - 'container': container, }; diff --git a/packages/frontend/src/pages/channel.vue b/packages/frontend/src/pages/channel.vue index 0a2f66d4fc..af1b4d2056 100644 --- a/packages/frontend/src/pages/channel.vue +++ b/packages/frontend/src/pages/channel.vue @@ -206,7 +206,7 @@ definePageMetadata(computed(() => channel ? { <style lang="scss" module> .main { - min-height: calc(var(--containerHeight) - (var(--stickyTop, 0px) + var(--stickyBottom, 0px))); + min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--stickyBottom, 0px))); } .footer { diff --git a/packages/frontend/src/pages/my-lists/list.vue b/packages/frontend/src/pages/my-lists/list.vue index 768a48746c..86201e8e0c 100644 --- a/packages/frontend/src/pages/my-lists/list.vue +++ b/packages/frontend/src/pages/my-lists/list.vue @@ -131,7 +131,7 @@ definePageMetadata(computed(() => list ? { <style lang="scss" module> .main { - min-height: calc(var(--containerHeight) - (var(--stickyTop, 0px) + var(--stickyBottom, 0px))); + min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--stickyBottom, 0px))); } .userItem { diff --git a/packages/frontend/src/ui/deck/column.vue b/packages/frontend/src/ui/deck/column.vue index 19643cfd94..402bbe0352 100644 --- a/packages/frontend/src/ui/deck/column.vue +++ b/packages/frontend/src/ui/deck/column.vue @@ -22,7 +22,7 @@ <span :class="$style.title"><slot name="header"></slot></span> <button v-tooltip="i18n.ts.settings" :class="$style.menu" class="_button" @click.stop="showSettingsMenu"><i class="ti ti-dots"></i></button> </header> - <div v-show="active" ref="body" v-container :class="$style.body"> + <div v-show="active" ref="body" :class="$style.body"> <slot></slot> </div> </section> @@ -362,7 +362,7 @@ function onDrop(ev) { overflow-x: clip; -webkit-overflow-scrolling: touch; box-sizing: border-box; - container-type: inline-size; + container-type: size; background-color: var(--bg); } </style> diff --git a/packages/frontend/src/ui/universal.vue b/packages/frontend/src/ui/universal.vue index 2462967515..1fd63910a8 100644 --- a/packages/frontend/src/ui/universal.vue +++ b/packages/frontend/src/ui/universal.vue @@ -2,10 +2,10 @@ <div :class="[$style.root, { [$style.withWallpaper]: wallpaper }]"> <XSidebar v-if="!isMobile" :class="$style.sidebar"/> - <MkStickyContainer v-container :class="$style.contents"> + <MkStickyContainer :class="$style.contents"> <template #header><XStatusBars :class="$style.statusbars"/></template> <main style="min-width: 0;" :style="{ background: pageMetadata?.value?.bg }" @contextmenu.stop="onContextmenu"> - <div :class="$style.content" style="container-type: inline-size;"> + <div :class="$style.content" style="container-type: size;"> <RouterView/> </div> <div :class="$style.spacer"></div> |