Fix issue #79: Implement documentation
All checks were successful
Test / test (push) Successful in 2s
All checks were successful
Test / test (push) Successful in 2s
This commit is contained in:
@@ -1,43 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import ContentManager from './components/managers/ContentManager.vue';
|
||||
import ToastManager from './components/managers/ToastManager.vue';
|
||||
import WindowManager from './components/managers/WindowManager.vue';
|
||||
import ServiceLinkAuthorize from './components/views/ServiceLinkAuthorize.vue';
|
||||
|
||||
import { CreateWindow } from '@/services/Windows'
|
||||
import { GetUser, HasAdmin } from './services/User';
|
||||
import TooltipManager from './components/managers/TooltipManager.vue';
|
||||
import ContextMenuManager from './components/managers/ContextMenuManager.vue';
|
||||
import { useCampaignService } from './services/Campaign';
|
||||
|
||||
const { RestoreCampaign } = useCampaignService();
|
||||
|
||||
// Els serveis (Discord, Foundry, Obsidian) enllacen amb aquesta pantalla única; no són part
|
||||
// de l'aplicació i no han d'arrencar les finestres normals. La ruta antiga de Discord també
|
||||
// hi porta, perquè els enllaços que ja corren per Discord no queden morts.
|
||||
const requestUrl = useRequestURL();
|
||||
const isServiceLink = computed(() => {
|
||||
const path = requestUrl.pathname.replace(/\/+$/, '');
|
||||
return path === '/link/authorize' || path === '/discord/authorize';
|
||||
});
|
||||
|
||||
async function start(){
|
||||
if(GetUser()){
|
||||
const restoredCampaign = await RestoreCampaign();
|
||||
if (!restoredCampaign) {
|
||||
CreateWindow('main_menu');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(await HasAdmin()){
|
||||
CreateWindow('login');
|
||||
} else {
|
||||
CreateWindow('register', {firstTime: true});
|
||||
}
|
||||
// DisplayToast('aqua', 'All plugins loaded successfully');
|
||||
}
|
||||
|
||||
// El que es veu és la pàgina que toca (app/pages): /docs porta la documentació, i la
|
||||
// resta de rutes obren l'aplicació de finestres. Aquí només hi ha el que és de tot el lloc.
|
||||
useHead({
|
||||
title: 'Dragonroll',
|
||||
meta: [
|
||||
@@ -50,29 +13,9 @@ useHead({
|
||||
onMounted(() => {
|
||||
setupTheme();
|
||||
setTheme('dark');
|
||||
if(!isServiceLink.value){
|
||||
start();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ServiceLinkAuthorize v-if="isServiceLink"></ServiceLinkAuthorize>
|
||||
<div v-else class="viewer">
|
||||
<ToastManager></ToastManager>
|
||||
<TooltipManager></TooltipManager>
|
||||
<ContextMenuManager></ContextMenuManager>
|
||||
<WindowManager></WindowManager>
|
||||
<ContentManager></ContentManager>
|
||||
<!-- Managers -->
|
||||
</div>
|
||||
<NuxtPage></NuxtPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.viewer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user