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";
|
import { DISCORD_INVITE } from "../../libs/config";
|
||||||
|
|
||||||
export let error: string;
|
export let error: string;
|
||||||
|
export let expected: boolean = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="overlay" transition:fade>
|
<div class="overlay" transition:fade>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="error">{t('status.error')}</h2>
|
<h2 class="error">{t('status.error')}</h2>
|
||||||
<span>{t('status.error.hint')}<a href={DISCORD_INVITE}>{t('status.error.hint.link')}</a></span>
|
{#if !expected}
|
||||||
<span>{t('status.detail', { detail: error })}</span>
|
<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">
|
<div class="actions">
|
||||||
<button on:click={() => location.reload()} class="error">
|
<button on:click={() => location.reload()} class="error">
|
||||||
|
@ -27,4 +30,10 @@
|
||||||
|
|
||||||
button
|
button
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
|
.detail
|
||||||
|
white-space: pre-line
|
||||||
|
font-size: 0.9em
|
||||||
|
line-height: 1.2
|
||||||
|
opacity: 0.8
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
export type Dict = Record<string, any>
|
||||||
|
|
||||||
export interface TrendEntry {
|
export interface TrendEntry {
|
||||||
date: string
|
date: string
|
||||||
rating: number
|
rating: number
|
||||||
|
|
Loading…
Reference in New Issue