Foundry and discord bot
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m51s
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m51s
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import ContentManager from './components/managers/ContentManager.vue';
|
||||
import ToastManager from './components/managers/ToastManager.vue';
|
||||
import WindowManager from './components/managers/WindowManager.vue';
|
||||
import DiscordAuthorize from './components/views/DiscordAuthorize.vue';
|
||||
|
||||
import { CreateWindow } from '@/services/Windows'
|
||||
import { GetUser, HasAdmin } from './services/User';
|
||||
@@ -11,6 +12,11 @@ import { useCampaignService } from './services/Campaign';
|
||||
|
||||
const { RestoreCampaign } = useCampaignService();
|
||||
|
||||
// El bot de Discord enllaça amb aquesta pantalla; no és part de l'aplicació i no ha d'arrencar
|
||||
// les finestres normals.
|
||||
const requestUrl = useRequestURL();
|
||||
const isDiscordAuthorize = computed(() => requestUrl.pathname.replace(/\/+$/, '') === '/discord/authorize');
|
||||
|
||||
async function start(){
|
||||
if(GetUser()){
|
||||
const restoredCampaign = await RestoreCampaign();
|
||||
@@ -40,12 +46,15 @@ useHead({
|
||||
onMounted(() => {
|
||||
setupTheme();
|
||||
setTheme('dark');
|
||||
start();
|
||||
if(!isDiscordAuthorize.value){
|
||||
start();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="viewer">
|
||||
<DiscordAuthorize v-if="isDiscordAuthorize"></DiscordAuthorize>
|
||||
<div v-else class="viewer">
|
||||
<ToastManager></ToastManager>
|
||||
<TooltipManager></TooltipManager>
|
||||
<ContextMenuManager></ContextMenuManager>
|
||||
|
||||
Reference in New Issue
Block a user