Compare commits
2 Commits
c98905e285
...
27c525d5bd
Author | SHA1 | Date | |
---|---|---|---|
27c525d5bd | |||
b2d18b81a8 |
@ -53,8 +53,18 @@
|
||||
enabled: data.settingsRead
|
||||
}
|
||||
];
|
||||
|
||||
let pageTitleSuffix =
|
||||
tabs.find((t) => $page.url.pathname === t.path)?.name ??
|
||||
$page.url.pathname === `${env.PUBLIC_BASE_PATH}/admin/login`
|
||||
? 'Login '
|
||||
: null;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Craftattack Admin{pageTitleSuffix ? ` - ${pageTitleSuffix}` : ''}</title>
|
||||
</svelte:head>
|
||||
|
||||
{#if $page.url.pathname !== `${env.PUBLIC_BASE_PATH}/admin/login`}
|
||||
<div class="h-12 relative bg-base-200 flex justify-center items-center">
|
||||
<ul class="menu menu-horizontal h-10 p-0 flex items-center bg-base-300 rounded-lg">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Input from '$lib/components/Input/Input.svelte';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { goto } from '$app/navigation';
|
||||
import { errorMessage } from '$lib/stores';
|
||||
|
||||
let passwordValue: string;
|
||||
@ -13,7 +12,7 @@
|
||||
body: new FormData(document.forms[0])
|
||||
});
|
||||
if (response.ok) {
|
||||
await goto(`${env.PUBLIC_BASE_PATH}/admin`, { invalidateAll: true });
|
||||
window.location = `${env.PUBLIC_BASE_PATH}/admin`;
|
||||
resolve();
|
||||
} else if (response.status == 401) {
|
||||
passwordValue = '';
|
||||
|
@ -9,6 +9,7 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Report</title>
|
||||
<!-- just in case... -->
|
||||
<meta name="robots" content="noindex" />
|
||||
</svelte:head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user