✨ Renamed overview to dashboard (#80)
This commit is contained in:
@@ -97,7 +97,7 @@
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
confirm_to_leave = false;
|
confirm_to_leave = false;
|
||||||
console.log(confirm_to_leave);
|
console.log(confirm_to_leave);
|
||||||
window.location.href = '/overview';
|
window.location.href = '/dashboard';
|
||||||
} else {
|
} else {
|
||||||
alert('Error');
|
alert('Error');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,8 @@
|
|||||||
"count": "Count",
|
"count": "Count",
|
||||||
"range": "Range",
|
"range": "Range",
|
||||||
"multiple_choice": "Multiple-Choice",
|
"multiple_choice": "Multiple-Choice",
|
||||||
"private": "Private"
|
"private": "Private",
|
||||||
|
"dashboard": ""
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"time_in_seconds": "Time in seconds",
|
"time_in_seconds": "Time in seconds",
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
<li class="py-2">
|
<li class="py-2">
|
||||||
<a
|
<a
|
||||||
class="text-lg font-medium lg:px-4 text-gray-600 hover:text-green-600 link-hover"
|
class="text-lg font-medium lg:px-4 text-gray-600 hover:text-green-600 link-hover"
|
||||||
href="/overview">{$t('words.overview')}</a
|
href="/dashboard">{$t('words.dashboard')}</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li class="py-2">
|
<li class="py-2">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
const returnTo =
|
const returnTo =
|
||||||
url.searchParams.get('returnTo') !== null
|
url.searchParams.get('returnTo') !== null
|
||||||
? url.searchParams.get('returnTo')
|
? url.searchParams.get('returnTo')
|
||||||
: '/overview';
|
: '/dashboard';
|
||||||
if (session.authenticated) {
|
if (session.authenticated) {
|
||||||
return {
|
return {
|
||||||
status: 302,
|
status: 302,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
if (session.authenticated) {
|
if (session.authenticated) {
|
||||||
return {
|
return {
|
||||||
status: 302,
|
status: 302,
|
||||||
redirect: '/overview'
|
redirect: '/dashboard'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
if (session.authenticated) {
|
if (session.authenticated) {
|
||||||
return {
|
return {
|
||||||
status: 302,
|
status: 302,
|
||||||
redirect: '/overview'
|
redirect: '/dashboard'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
window.location.href = '/overview';
|
window.location.href = '/dashboard';
|
||||||
}}
|
}}
|
||||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
||||||
>{$t('words.close')}
|
>{$t('words.close')}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
if (!session.authenticated) {
|
if (!session.authenticated) {
|
||||||
return {
|
return {
|
||||||
status: 302,
|
status: 302,
|
||||||
redirect: '/account/login?returnTo=/overview'
|
redirect: '/account/login?returnTo=/dashboard'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
body: `Failed to start game, ${await res.text()}`
|
body: `Failed to start game, ${await res.text()}`
|
||||||
});
|
});
|
||||||
alertModal.subscribe((_) => {
|
alertModal.subscribe((_) => {
|
||||||
window.location.assign('/account/login?returnTo=/overview');
|
window.location.assign('/account/login?returnTo=/dashboard');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>ClassQuiz - Overview</title>
|
<title>ClassQuiz - Dashboard</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="min-h-screen flex flex-col">
|
<div class="min-h-screen flex flex-col">
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
window.location.href = '/overview';
|
window.location.href = '/dashboard';
|
||||||
}}
|
}}
|
||||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
||||||
>{$t('words.close')}
|
>{$t('words.close')}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
window.location.href = '/overview';
|
window.location.href = '/dashboard';
|
||||||
} else if (res.status === 400) {
|
} else if (res.status === 400) {
|
||||||
alertModal.set({
|
alertModal.set({
|
||||||
open: true,
|
open: true,
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type { RequestHandler } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export const GET: RequestHandler = async () => {
|
||||||
|
return {
|
||||||
|
status: 301,
|
||||||
|
headers: {
|
||||||
|
Location: '/dashboard'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user