1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-26 12:38:16 +09:00
MisskeyIO/packages/frontend/src/ui/zen.vue
2022-12-27 14:36:33 +09:00

35 lines
785 B
Vue

<template>
<div class="mk-app">
<RouterView/>
<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, setPageMetadata } 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>
<style lang="scss" scoped>
.mk-app {
min-height: 100dvh;
box-sizing: border-box;
}
</style>