mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 06:23:08 +02:00
34 lines
778 B
Vue
34 lines
778 B
Vue
<template>
|
|
<div class="mk-zen">
|
|
<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">
|
|
.mk-zen {
|
|
min-height: 100dvh;
|
|
box-sizing: border-box;
|
|
}
|
|
</style>
|