Files
security-alert-center/frontend/src/App.vue
T
PapaTramp 141fc44099 feat: SAC 0.7.3 custom error pages 401/403/404/429
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>
2026-06-01 11:06:21 +10:00

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>