This commit is contained in:
syuilo
2025-03-18 15:23:50 +09:00
parent 474155b677
commit 0a295e1bb0
11 changed files with 393 additions and 588 deletions

View File

@@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
</template>
<div ref="contents" :class="$style.root" style="container-type: inline-size;">
<div :class="$style.root" class="_pageContainer">
<RouterView :key="reloadCount" :router="windowRouter"/>
</div>
</MkWindow>
@@ -31,13 +31,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue';
import { url } from '@@/js/config.js';
import { getScrollContainer } from '@@/js/scroll.js';
import type { PageMetadata } from '@/page.js';
import RouterView from '@/components/global/RouterView.vue';
import MkWindow from '@/components/MkWindow.vue';
import { popout as _popout } from '@/utility/popout.js';
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
import { useScrollPositionManager } from '@/nirax.js';
import { i18n } from '@/i18n.js';
import { provideMetadataReceiver, provideReactiveMetadata } from '@/page.js';
import { openingWindowsCount } from '@/os.js';
@@ -58,7 +56,6 @@ const emit = defineEmits<{
const routerFactory = useRouterFactory();
const windowRouter = routerFactory(props.initialPath);
const contents = shallowRef<HTMLElement | null>(null);
const pageMetadata = ref<null | PageMetadata>(null);
const windowEl = shallowRef<InstanceType<typeof MkWindow>>();
const history = ref<{ path: string; key: string; }[]>([{
@@ -177,8 +174,6 @@ function popout() {
windowEl.value?.close();
}
useScrollPositionManager(() => getScrollContainer(contents.value), windowRouter);
onMounted(() => {
analytics.page({
path: props.initialPath,
@@ -202,9 +197,7 @@ defineExpose({
<style lang="scss" module>
.root {
overscroll-behavior: contain;
min-height: 100%;
height: 100%;
background: var(--MI_THEME-bg);
--MI-margin: var(--MI-marginHalf);