mirror of https://github.com/hykilpikonna/AquaDX
[+] Add expected error type
parent
2ef950ae26
commit
2f966d4fa9
|
@ -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>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
export type Dict = Record<string, any>
|
||||
|
||||
export interface TrendEntry {
|
||||
date: string
|
||||
rating: number
|
||||
|
|
Loading…
Reference in New Issue