feat: remove query based routing
This commit is contained in:
@@ -30,36 +30,24 @@ const mainNotification = computed(() => ({
|
||||
description: $t("settings.description"),
|
||||
}));
|
||||
|
||||
// TODO: this could be computed instead
|
||||
const MENU_IMAGES: Record<string, HTMLImageElement> = {
|
||||
options: assets.settings.topScreen.options.options,
|
||||
clock: assets.settings.topScreen.clock.clock,
|
||||
user: assets.settings.topScreen.user.user,
|
||||
touchScreen: assets.settings.topScreen.touchScreen.touchScreen,
|
||||
};
|
||||
|
||||
const menuNotification = computed(() => {
|
||||
if (!store.currentMenu) return null;
|
||||
|
||||
let image: HTMLImageElement | null = null;
|
||||
let id = "";
|
||||
|
||||
if (/^options[A-Z]/.test(store.currentMenu)) {
|
||||
image = assets.settings.topScreen.options.options;
|
||||
id = "options";
|
||||
} else if (/^clock[A-Z]/.test(store.currentMenu)) {
|
||||
image = assets.settings.topScreen.clock.clock;
|
||||
id = "clock";
|
||||
} else if (/^user[A-Z]/.test(store.currentMenu)) {
|
||||
image = assets.settings.topScreen.user.user;
|
||||
id = "user";
|
||||
} else if (/^touchScreen[A-Z]/.test(store.currentMenu)) {
|
||||
image = assets.settings.topScreen.touchScreen.touchScreen;
|
||||
id = "touchScreen";
|
||||
}
|
||||
|
||||
if (!image) return null;
|
||||
if (!store.currentMenu || !store.menuExpanded) return null;
|
||||
|
||||
return {
|
||||
image,
|
||||
title: $t(`settings.${id}.title`),
|
||||
description: $t(`settings.${id}.description`),
|
||||
image: MENU_IMAGES[store.currentMenu]!,
|
||||
title: $t(`settings.${store.currentMenu}.title`),
|
||||
description: $t(`settings.${store.currentMenu}.description`),
|
||||
};
|
||||
});
|
||||
|
||||
// TODO: this could be computed instead
|
||||
const IMAGES_MAP: Record<string, HTMLImageElement> = {
|
||||
optionsStartUp: assets.settings.topScreen.options.startUp,
|
||||
optionsLanguage: assets.settings.topScreen.options.language,
|
||||
|
||||
Reference in New Issue
Block a user