PR CI / ledger (pull_request) Successful in 4s
PR CI / flow (pull_request) Successful in 4s
PR CI / test (stable) (pull_request) Successful in 45s
PR CI / ui (pull_request) Successful in 48s
PR CI / test (lowest) (pull_request) Successful in 50s
PR CI / security (pull_request) Successful in 54s
PR CI / pr-ci (pull_request) Successful in 2s
PR CI / release-automerge (pull_request) Successful in 3s
24 lines
925 B
Vue
24 lines
925 B
Vue
<script setup lang="ts">
|
|
import { boot } from './api';
|
|
import { t } from './i18n';
|
|
import Layout from './components/Layout.vue';
|
|
import { state } from './state';
|
|
</script>
|
|
|
|
<template>
|
|
<component :is="state.component" v-if="state.component && !boot.user" />
|
|
<Layout v-else-if="state.component">
|
|
<p v-if="state.forbidden" class="m-card p-5 text-sm">{{ t('You may not open this page.') }}</p>
|
|
<p v-else-if="state.loading" class="text-sm text-muted">{{ t('Loading…') }}</p>
|
|
<component :is="state.component" v-else v-bind="state.props" />
|
|
</Layout>
|
|
<div
|
|
v-if="state.toast"
|
|
role="status"
|
|
class="fixed bottom-5 right-5 z-50 rounded-lg border border-l-4 border-line bg-panel px-4 py-3 text-sm font-medium text-text shadow-xl"
|
|
:class="state.toast.error ? 'border-l-red-500' : 'border-l-emerald-500'"
|
|
>
|
|
{{ state.toast.text }}
|
|
</div>
|
|
</template>
|