Merge pull request #1323 from Bnyro/404

add 404 page
This commit is contained in:
Bnyro 2022-08-27 13:25:52 +02:00 committed by GitHub
commit 4d9e6865ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,7 @@
<template>
<div class="flex flex-col justify-center items-center min-h-[88vh]">
<h1 class="font-bold !text-9xl">404</h1>
<h2 class="!text-2xl" v-t="'info.page_not_found'" />
<a class="btn mt-16" href="/" v-t="'actions.back_to_home'" />
</div>
</template>

View File

@ -314,7 +314,7 @@
</tbody> </tbody>
</table> </table>
<br /> <br />
<p v-t="'information.preferences_note'" /> <p v-t="'info.preferences_note'" />
<br /> <br />
<button class="btn" v-t="'actions.reset_preferences'" @click="resetPreferences()" /> <button class="btn" v-t="'actions.reset_preferences'" @click="resetPreferences()" />
<button class="btn mx-4" v-t="'actions.backup_preferences'" @click="backupPreferences()" /> <button class="btn mx-4" v-t="'actions.backup_preferences'" @click="backupPreferences()" />

View File

@ -96,7 +96,8 @@
"reset_preferences": "Reset preferences", "reset_preferences": "Reset preferences",
"confirm_reset_preferences": "Are you sure you want to reset your preferences?", "confirm_reset_preferences": "Are you sure you want to reset your preferences?",
"backup_preferences": "Backup preferences", "backup_preferences": "Backup preferences",
"restore_preferences": "Restore preferences" "restore_preferences": "Restore preferences",
"back_to_home": "Back to home"
}, },
"comment": { "comment": {
"pinned_by": "Pinned by", "pinned_by": "Pinned by",
@ -141,7 +142,8 @@
"subscriptions": { "subscriptions": {
"subscribed_channels_count": "Subscribed to: {0}" "subscribed_channels_count": "Subscribed to: {0}"
}, },
"information": { "info": {
"preferences_note": "Note: preferences are saved in the local storage of your browser. Deleting your browser data will reset them." "preferences_note": "Note: preferences are saved in the local storage of your browser. Deleting your browser data will reset them.",
"page_not_found": "Page not found"
} }
} }

View File

@ -80,6 +80,11 @@ const routes = [
name: "Playlists", name: "Playlists",
component: () => import("../components/PlaylistsPage.vue"), component: () => import("../components/PlaylistsPage.vue"),
}, },
{
path: "/:pathMatch(.*)*",
name: "Page Not Found",
component: () => import("../components/PageNotFound.vue"),
},
]; ];
const router = createRouter({ const router = createRouter({