2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2023-05-15 13:08:46 +03:00
|
|
|
<template>
|
2023-07-07 14:18:06 +03:00
|
|
|
<div :class="$style.root">
|
|
|
|
<div style="container-type: inline-size;">
|
|
|
|
<RouterView/>
|
|
|
|
</div>
|
2023-05-15 13:08:46 +03:00
|
|
|
|
|
|
|
<XCommon/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { provide, ComputedRef } from 'vue';
|
|
|
|
import XCommon from './_common_/common.vue';
|
|
|
|
import { mainRouter } from '@/router';
|
|
|
|
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
|
|
|
import { instanceName } from '@/config';
|
|
|
|
|
|
|
|
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
|
|
|
|
|
|
|
provide('router', mainRouter);
|
|
|
|
provideMetadataReceiver((info) => {
|
|
|
|
pageMetadata = info;
|
|
|
|
if (pageMetadata.value) {
|
|
|
|
document.title = `${pageMetadata.value.title} | ${instanceName}`;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
document.documentElement.style.overflowY = 'scroll';
|
|
|
|
</script>
|
|
|
|
|
2023-05-19 10:30:39 +03:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
2023-05-15 13:08:46 +03:00
|
|
|
min-height: 100dvh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
</style>
|