141fc44099
Centered logo pages with event explanation and allowed actions; router and apiFetch redirect to them on auth, permission, not-found, and rate-limit errors. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
739 B
Vue
27 lines
739 B
Vue
<template>
|
|
<div :class="showShell ? 'app-shell' : 'layout layout-login'">
|
|
<AppSidebar v-if="showShell" />
|
|
<main :class="showShell ? 'app-main' : ''">
|
|
<RouterView />
|
|
</main>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed, onMounted } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import { getToken } from "./api";
|
|
import AppSidebar from "./components/AppSidebar.vue";
|
|
import { refreshSessionRole } from "./router";
|
|
|
|
const route = useRoute();
|
|
const publicLayout = computed(() => route.path === "/login" || route.meta.standalone === true);
|
|
const showShell = computed(() => !publicLayout.value && !!getToken());
|
|
|
|
onMounted(() => {
|
|
if (getToken()) {
|
|
void refreshSessionRole();
|
|
}
|
|
});
|
|
</script>
|