[+] Add expected error type

pull/131/head
Azalea 2025-03-20 06:04:03 -04:00
parent 2ef950ae26
commit 2f966d4fa9
2 changed files with 13 additions and 2 deletions

View File

@ -4,13 +4,16 @@
import { DISCORD_INVITE } from "../../libs/config";
export let error: string;
export let expected: boolean = false;
</script>
<div class="overlay" transition:fade>
<div>
<h2 class="error">{t('status.error')}</h2>
<span>{t('status.error.hint')}<a href={DISCORD_INVITE}>{t('status.error.hint.link')}</a></span>
<span>{t('status.detail', { detail: error })}</span>
{#if !expected}
<span>{t('status.error.hint')}<a href={DISCORD_INVITE}>{t('status.error.hint.link')}</a></span>
{/if}
<span class="detail">{error}</span>
<div class="actions">
<button on:click={() => location.reload()} class="error">
@ -27,4 +30,10 @@
button
width: 100%
.detail
white-space: pre-line
font-size: 0.9em
line-height: 1.2
opacity: 0.8
</style>

View File

@ -1,3 +1,5 @@
export type Dict = Record<string, any>
export interface TrendEntry {
date: string
rating: number