From 7b302e4c210ac153203621160d2f6ce604febf77 Mon Sep 17 00:00:00 2001 From: Pandipipas Date: Sat, 16 May 2026 14:15:36 +0200 Subject: [PATCH] feat: add new translations for settings and graphics; implement shortcut conflict detection and reset functionality --- src/dashboard/scoreko-dev/i18n.ts | 18 +++ .../scoreko-dev/stores/shortcut-settings.ts | 8 +- src/dashboard/scoreko-dev/views/Graphics.vue | 47 +++++--- src/dashboard/scoreko-dev/views/Players.vue | 104 +++++++++++++++++- src/dashboard/scoreko-dev/views/Settings.vue | 103 +++++++++++++++-- 5 files changed, 251 insertions(+), 29 deletions(-) diff --git a/src/dashboard/scoreko-dev/i18n.ts b/src/dashboard/scoreko-dev/i18n.ts index 3f29418..f7bab9f 100644 --- a/src/dashboard/scoreko-dev/i18n.ts +++ b/src/dashboard/scoreko-dev/i18n.ts @@ -91,6 +91,12 @@ type Translations = { commentaryClear: string; aboutChangelog : string; aboutTechStackTitle : string; + settingsShortcutConflictWarning : string; + settingsShortcutStartRecording: string; + settingsShortcutStopRecording: string; + settingsShortcutResetSingle: string; + graphicsCopied : string; + graphicsOpenBrowser : string; }; const STORAGE_KEY = 'scoreko-dev.language'; @@ -185,6 +191,12 @@ const messages: Record = { commentaryClear: 'Clear commentary', aboutChangelog: 'Changelog', aboutTechStackTitle: 'Tech stack', + settingsShortcutConflictWarning: 'This shortcut is already assigned to', + settingsShortcutStartRecording: 'Start recording shortcut', + settingsShortcutStopRecording: 'Stop recording shortcut', + settingsShortcutResetSingle: 'Reset single player score shortcut', + graphicsCopied: 'URL copied to clipboard', + graphicsOpenBrowser: 'Open in browser', }, es: { menuDashboard: 'Panel', @@ -275,6 +287,12 @@ const messages: Record = { commentaryClear: 'Limpiar comentario', aboutChangelog: 'Changelog', aboutTechStackTitle: 'Tech stack', + settingsShortcutConflictWarning: 'This shortcut is already assigned to', + settingsShortcutStartRecording: 'Start recording shortcut', + settingsShortcutStopRecording: 'Stop recording shortcut', + settingsShortcutResetSingle: 'Reset single player score shortcut', + graphicsCopied: 'URL copiada al portapapeles', + graphicsOpenBrowser: 'Abrir en el navegador', }, }; diff --git a/src/dashboard/scoreko-dev/stores/shortcut-settings.ts b/src/dashboard/scoreko-dev/stores/shortcut-settings.ts index fc67b23..352fcd4 100644 --- a/src/dashboard/scoreko-dev/stores/shortcut-settings.ts +++ b/src/dashboard/scoreko-dev/stores/shortcut-settings.ts @@ -175,9 +175,15 @@ export const useShortcutSettingsStore = defineStore('shortcut-settings', () => { persistSettings(shortcuts); }; + const resetShortcut = (action: ShortcutAction) => { + shortcuts[action] = defaultShortcuts[action]; + persistSettings(shortcuts); + }; + return { shortcuts, setShortcut, resetShortcuts, + resetShortcut, }; -}); +}); \ No newline at end of file diff --git a/src/dashboard/scoreko-dev/views/Graphics.vue b/src/dashboard/scoreko-dev/views/Graphics.vue index e3f1382..7dddfe3 100644 --- a/src/dashboard/scoreko-dev/views/Graphics.vue +++ b/src/dashboard/scoreko-dev/views/Graphics.vue @@ -1,13 +1,13 @@