hm
This commit is contained in:
parent
2e5a76a102
commit
6a83355db1
2 changed files with 23 additions and 1 deletions
|
@ -1,9 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import logo from '$lib/img/logo.png';
|
||||
|
||||
let { data }: { data: PageData} = $props();
|
||||
</script>
|
||||
|
||||
<div class="splash">
|
||||
<div id="error"></div>
|
||||
<div id="error">
|
||||
{data.error}
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="logo-column">
|
||||
<img class="logo" src={logo} alt="ZappyZep Logo" />
|
||||
|
|
17
revampdashboard/src/routes/+page.ts
Normal file
17
revampdashboard/src/routes/+page.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import type { PageLoad } from './$types';
|
||||
|
||||
const errorMessages = {
|
||||
noAccess:
|
||||
'No dashboard access. If you think this is a mistake, please contact your server owner.',
|
||||
expiredLogin: 'Dashboard login expired. Please log in again.'
|
||||
};
|
||||
|
||||
export const load: PageLoad = ({ url }) => {
|
||||
const error = String(url.searchParams.get('error') ?? '');
|
||||
|
||||
if (error) {
|
||||
return {
|
||||
error: errorMessages[error as keyof typeof errorMessages] || 'Unexpected error'
|
||||
};
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue