Renamed overview to dashboard (#80)

This commit is contained in:
Mawoka
2022-08-11 15:27:28 +02:00
parent b98299d022
commit 4a7bc2a589
11 changed files with 29 additions and 12 deletions
+1 -1
View File
@@ -97,7 +97,7 @@
if (res.ok) {
confirm_to_leave = false;
console.log(confirm_to_leave);
window.location.href = '/overview';
window.location.href = '/dashboard';
} else {
alert('Error');
}
+2 -1
View File
@@ -107,7 +107,8 @@
"count": "Count",
"range": "Range",
"multiple_choice": "Multiple-Choice",
"private": "Private"
"private": "Private",
"dashboard": ""
},
"editor": {
"time_in_seconds": "Time in seconds",
+1 -1
View File
@@ -109,7 +109,7 @@
<li class="py-2">
<a
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 class="py-2">
+1 -1
View File
@@ -9,7 +9,7 @@
const returnTo =
url.searchParams.get('returnTo') !== null
? url.searchParams.get('returnTo')
: '/overview';
: '/dashboard';
if (session.authenticated) {
return {
status: 302,
+1 -1
View File
@@ -8,7 +8,7 @@
if (session.authenticated) {
return {
status: 302,
redirect: '/overview'
redirect: '/dashboard'
};
}
return {};
@@ -8,7 +8,7 @@
if (session.authenticated) {
return {
status: 302,
redirect: '/overview'
redirect: '/dashboard'
};
}
return {};
+1 -1
View File
@@ -142,7 +142,7 @@
<button
type="button"
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"
>{$t('words.close')}
@@ -8,7 +8,7 @@
if (!session.authenticated) {
return {
status: 302,
redirect: '/account/login?returnTo=/overview'
redirect: '/account/login?returnTo=/dashboard'
};
}
return {
@@ -71,7 +71,7 @@
body: `Failed to start game, ${await res.text()}`
});
alertModal.subscribe((_) => {
window.location.assign('/account/login?returnTo=/overview');
window.location.assign('/account/login?returnTo=/dashboard');
});
}
const data = await res.json();
@@ -89,7 +89,7 @@
</script>
<svelte:head>
<title>ClassQuiz - Overview</title>
<title>ClassQuiz - Dashboard</title>
</svelte:head>
<div class="min-h-screen flex flex-col">
+1 -1
View File
@@ -170,7 +170,7 @@
<button
type="button"
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"
>{$t('words.close')}
+1 -1
View File
@@ -53,7 +53,7 @@
});
if (res.status === 200) {
window.location.href = '/overview';
window.location.href = '/dashboard';
} else if (res.status === 400) {
alertModal.set({
open: true,
+16
View File
@@ -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'
}
};
};