Fix display of critical announcements in app (#3407)

This commit is contained in:
Prospector 2025-03-18 18:24:14 -07:00 committed by GitHub
parent d49cc87b8c
commit 16893ec0e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 10 deletions

View File

@ -521,6 +521,10 @@ function handleAuxClick(e) {
width: 'calc(100% - var(--right-bar-width))', width: 'calc(100% - var(--right-bar-width))',
}" }"
></div> ></div>
<div v-if="criticalErrorMessage" class="m-6 mb-0 flex flex-col border-red bg-bg-red rounded-2xl border-2 border-solid p-4 gap-1 font-semibold text-contrast">
<h1 class="m-0 text-lg font-extrabold">{{ criticalErrorMessage.header }}</h1>
<div class="markdown-body text-primary" v-html="renderString(criticalErrorMessage.body ?? '')"></div>
</div>
<RouterView v-slot="{ Component }"> <RouterView v-slot="{ Component }">
<template v-if="Component"> <template v-if="Component">
<Suspense @pending="loading.startLoading()" @resolve="loading.stopLoading()"> <Suspense @pending="loading.startLoading()" @resolve="loading.stopLoading()">
@ -592,12 +596,6 @@ function handleAuxClick(e) {
<PromotionWrapper /> <PromotionWrapper />
</template> </template>
</div> </div>
<div class="view">
<div v-if="criticalErrorMessage" class="critical-error-banner" data-tauri-drag-region>
<h1>{{ criticalErrorMessage.header }}</h1>
<div class="markdown-body" v-html="renderString(criticalErrorMessage.body ?? '')"></div>
</div>
</div>
</div> </div>
<URLConfirmModal ref="urlModal" /> <URLConfirmModal ref="urlModal" />
<Notifications ref="notificationsWrapper" sidebar /> <Notifications ref="notificationsWrapper" sidebar />

View File

@ -39,14 +39,14 @@ defineProps({
}) })
const typeClasses = { const typeClasses = {
info: 'border-blue bg-bg-blue', info: 'border-brand-blue bg-bg-blue',
warning: 'border-orange bg-bg-orange', warning: 'border-brand-orange bg-bg-orange',
critical: 'border-brand-red bg-bg-red', critical: 'border-brand-red bg-bg-red',
} }
const iconClasses = { const iconClasses = {
info: 'text-blue', info: 'text-brand-blue',
warning: 'text-orange', warning: 'text-brand-orange',
critical: 'text-brand-red', critical: 'text-brand-red',
} }