-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<main class="w-screen h-screen bg-gradient-to-b flex items-center justify-center overflow-hidden from-blue-950 to-gray-900"> | ||
|
||
<!-- from-blue-950 to-gray-900 --> | ||
<div class=' bg-slate-600 p-4 rounded-2xl shadow-xl'> | ||
<div class="w-96"> <!-- Change bg-base-100 to bg-blue-100 or any other color --> | ||
<h2 class="text-xl font-bold text-gray-300">Oops, looks like this page doesn´t exist</h2> | ||
<figure class="px-10 pt-6 "> | ||
<img src="../images/itsfine.gif" alt="gif" class="rounded-xl" /> | ||
</figure> | ||
|
||
<div class="card-body items-center text-center"> | ||
<p class='text-secondary'>It's ok it sometimes happens to everyone</p> | ||
<div class="card-actions"> | ||
<a class="mx-6 mt-2 flex items-center justify-center h-6 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold" href="/">Go back to the landing page</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
export const ssr = false; | ||
|
||
import { redirect } from '@sveltejs/kit'; | ||
import getLocalDB from '$lib/utils/localDB/manager'; | ||
|
||
const loginLock = ['/interface']; | ||
//redirect to login in locked pages | ||
export const load = async ({ url }) => { | ||
const db = getLocalDB(); | ||
if (loginLock.includes(url?.pathname) && !db.userID) { | ||
throw redirect(302, '/auth/login'); | ||
} | ||
return { | ||
user: db?.userID || null | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.