diff --git a/src/lib/enums/index.ts b/src/lib/enums/index.ts index b0775adaf..6255ea875 100644 --- a/src/lib/enums/index.ts +++ b/src/lib/enums/index.ts @@ -90,7 +90,7 @@ export const enum EmojiFont { Fluent = "Fluent", } -export const enum Route { +export enum Route { Home = "/", Chat = "/chat", Files = "/files", @@ -101,6 +101,10 @@ export const enum Route { Pre = "/pre", } +export function getRoute(value: string): Route { + return value.startsWith("/settings") ? Route.Settings : Object.values(Route).find(route => route === value) || Route.Home +} + export const enum FilesItemKind { File, Folder, diff --git a/src/lib/layouts/BottomNavBarMobile.svelte b/src/lib/layouts/BottomNavBarMobile.svelte index 5ae627f75..002b540c8 100644 --- a/src/lib/layouts/BottomNavBarMobile.svelte +++ b/src/lib/layouts/BottomNavBarMobile.svelte @@ -1,4 +1,6 @@ -{#if !isKeyboardOpened} -
- -