feat(settings): assign all notification images

This commit is contained in:
2025-12-30 00:20:28 +01:00
parent fd7987cac1
commit 677302cf57

View File

@@ -31,11 +31,23 @@ const mainNotification = computed(() => ({
description: $t("settings.description"),
}));
// TODO: this could be computed instead
const MENU_IMAGES: Record<string, HTMLImageElement> = {
const IMAGES_MAP: Record<string, HTMLImageElement> = {
options: assets.settings.topScreen.options.options,
optionsStartUp: assets.settings.topScreen.options.startUp,
optionsLanguage: assets.settings.topScreen.options.language,
optionsGbaMode: assets.settings.topScreen.options.gbaMode,
clock: assets.settings.topScreen.clock.clock,
clockTime: assets.settings.topScreen.clock.time,
clockDate: assets.settings.topScreen.clock.date,
clockAlarm: assets.settings.topScreen.clock.alarm,
user: assets.settings.topScreen.user.user,
userUserName: assets.settings.topScreen.user.userName,
userBirthday: assets.settings.topScreen.user.birthday,
userMessage: assets.settings.topScreen.user.message,
userColor: assets.settings.topScreen.user.color,
touchScreen: assets.settings.topScreen.touchScreen.touchScreen,
};
@@ -43,19 +55,12 @@ const menuNotification = computed(() => {
if (!store.currentMenu || !store.menuExpanded) return null;
return {
image: MENU_IMAGES[store.currentMenu]!,
image: IMAGES_MAP[store.currentMenu]!,
title: $t(`settings.${store.currentMenu}.title`),
description: $t(`settings.${store.currentMenu}.description`),
};
});
const IMAGES_MAP: Record<string, HTMLImageElement> = {
optionsStartUp: assets.settings.topScreen.options.startUp,
optionsLanguage: assets.settings.topScreen.options.language,
optionsGbaMode: assets.settings.topScreen.options.gbaMode,
userColor: assets.settings.topScreen.user.color,
};
const submenuNotification = computed(() => {
if (!store.currentSubMenu) return null;