From 2d06eeabf4b618b40351b3d114bbe5c6aedc3046 Mon Sep 17 00:00:00 2001 From: Flavio Fois Date: Mon, 9 Feb 2026 21:38:17 +0100 Subject: [PATCH] feat: Implement Easter egg for music inspiration in credits page - Added click handler for Easter egg that enables music inspiration feature. - Updated credits page to include new icons and handle click events. - Enhanced inspiration page to fetch and display Spotify track embed HTML. - Refactored inspiration loading logic to include track data. - Introduced theme selection in settings with light and dark modes. - Updated settings page to reflect new theme options and improve toast messages. - Refined layout styles across various pages for consistent theming. - Bumped application version to 1.5.0 in installer script. --- config.ini | 6 +- frontend/messages/en.json | 42 +++++- frontend/messages/it.json | 42 +++++- frontend/package.json | 1 + frontend/src/app.html | 21 ++- frontend/src/lib/components/MailViewer.svelte | 54 ++++---- frontend/src/lib/components/SidebarApp.svelte | 4 +- frontend/src/lib/components/UnsavedBar.svelte | 8 +- frontend/src/lib/stores/settings.svelte.ts | 46 ++++++- frontend/src/lib/types.d.ts | 2 + frontend/src/lib/utils/theme.ts | 45 +++++++ frontend/src/routes/(app)/+layout.svelte | 78 ++++++----- .../src/routes/(app)/credits/+page.svelte | 57 +++++++- .../src/routes/(app)/inspiration/+page.svelte | 114 +++------------- .../src/routes/(app)/inspiration/+page.ts | 92 ++++++++++++- .../src/routes/(app)/settings/+page.svelte | 127 +++++++++++++----- frontend/src/routes/+layout.svelte | 1 + frontend/src/routes/image/+layout.svelte | 17 ++- frontend/src/routes/image/+page.svelte | 32 ++--- frontend/src/routes/pdf/+layout.svelte | 21 +-- frontend/src/routes/pdf/+page.svelte | 43 +++--- installer/installer.iss | 4 +- 22 files changed, 575 insertions(+), 282 deletions(-) create mode 100644 frontend/src/lib/utils/theme.ts diff --git a/config.ini b/config.ini index 8b6f1a3..ef8dd93 100644 --- a/config.ini +++ b/config.ini @@ -1,8 +1,8 @@ [EMLy] SDK_DECODER_SEMVER = 1.3.2 -SDK_DECODER_RELEASE_CHANNEL = beta -GUI_SEMVER = 1.4.0 -GUI_RELEASE_CHANNEL = stable +SDK_DECODER_RELEASE_CHANNEL = stable +GUI_SEMVER = 1.5.0 +GUI_RELEASE_CHANNEL = beta LANGUAGE = it UPDATE_CHECK_ENABLED = false UPDATE_PATH = diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 346513e..6dfb4e2 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -50,7 +50,9 @@ "settings_danger_reset_dialog_continue": "Continue", "settings_danger_warning": "Warning: This action is irreversible. Please ensure you have backed up any important data before proceeding.", "settings_danger_alert_title": "Advanced options enabled", - "settings_danger_alert_description": "You're about to access EMLy's advanced options. Modifying such options may cause instability, including crashes, freezes, or security software alerts. For support or troubleshooting, contact @lyzcoote on Discord.", + "settings_danger_alert_description_part1": "You're about to access EMLy's advanced options.", + "settings_danger_alert_description_part2": "Modifying such options may cause instability, including crashes, freezes, or security software alerts.", + "settings_danger_alert_description_part3": "For support or troubleshooting, contact your TL/RDS.", "settings_danger_alert_understood": "Understood", "settings_toast_reverted": "Reverted to last saved settings.", "settings_toast_save_failed": "Failed to save settings.", @@ -98,6 +100,12 @@ "bugreport_email_placeholder": "your.email@example.com", "bugreport_text_label": "Bug Description", "bugreport_text_placeholder": "Describe the bug in detail...", + "settings_appearance_title": "Appearance", + "settings_appearance_description": "Customize the application theme.", + "settings_theme_label": "Theme", + "settings_theme_hint": "Choose between light and dark mode.", + "settings_theme_light": "Light", + "settings_theme_dark": "Dark", "bugreport_info": "Your message, email file (if loaded), screenshot, and system information will be included in the report.", "bugreport_screenshot_label": "Attached Screenshot:", "bugreport_cancel": "Cancel", @@ -160,5 +168,35 @@ "credits_lib_dompurify": "XSS sanitizer for HTML content", "credits_license_title": "License & Source", "credits_license_text": "EMLy is proprietary software developed by 3gIT. All rights reserved. The application uses various open source libraries, each governed by their respective licenses.", - "credits_copyright": "All rights reserved." + "credits_copyright": "All rights reserved.", + "settings_updates_title": "Updates", + "settings_updates_description": "Check for and install application updates from your network share.", + "settings_updates_current_version": "Current Version", + "settings_updates_available": "Update Available", + "settings_updates_check_failed": "Check failed", + "settings_updates_no_updates": "No updates found", + "settings_updates_check_label": "Check for Updates", + "settings_updates_last_checked": "Last checked: {time}", + "settings_updates_click_check": "Click to check for available updates", + "settings_updates_checking": "Checking...", + "settings_updates_check_now": "Check Now", + "settings_updates_version_available": "Version {version} Available", + "settings_updates_downloading": "Downloading... {progress}%", + "settings_updates_click_download": "Click to download the update", + "settings_updates_download_button": "Download", + "settings_updates_ready_title": "Update Ready to Install", + "settings_updates_ready_ref": "Version {version} has been downloaded and verified", + "settings_updates_install_button": "Install Now", + "settings_updates_info_message": "Updates are checked from your configured network share path.", + "settings_updates_current_path": "Current path:", + "settings_updates_no_path": "No update path configured", + "settings_toast_update_available": "Update available: {version}", + "settings_toast_latest_version": "You're on the latest version", + "settings_toast_check_failed": "Failed to check for updates", + "settings_toast_download_success": "Update downloaded successfully", + "settings_toast_download_failed": "Failed to download update", + "settings_toast_install_failed": "Failed to launch installer", + "settings_danger_update_checker_label": "Enable Update Checker", + "settings_danger_update_checker_hint": "Check for application updates from network share", + "settings_danger_update_checker_info": "Info: When enabled, the app will check for updates from your configured network share. Disable this if you manage updates manually or don't have network access." } diff --git a/frontend/messages/it.json b/frontend/messages/it.json index abd5811..c56c8dc 100644 --- a/frontend/messages/it.json +++ b/frontend/messages/it.json @@ -50,7 +50,9 @@ "settings_danger_reset_dialog_continue": "Continua", "settings_danger_warning": "Attenzione: Questa azione è irreversibile. Assicurati di aver effettuato il backup di tutti i dati importanti prima di procedere.", "settings_danger_alert_title": "Opzioni avanzate abilitate", - "settings_danger_alert_description": "Stai per accedere alle opzioni avanzate di EMLy. Modificare tali opzioni può causare instabilità, inclusi crash, blocchi o avvisi del software di sicurezza. Per supporto o risoluzione dei problemi, contatta @lyzcoote su Discord.", + "settings_danger_alert_description_part1": "Stai per accedere alle opzioni avanzate di EMLy.", + "settings_danger_alert_description_part2": "Modificare tali opzioni può causare instabilità, inclusi crash, blocchi o avvisi del software di sicurezza.", + "settings_danger_alert_description_part3": "Per supporto o risoluzione dei problemi, contatta il proprio TL/RDS.", "settings_danger_alert_understood": "Capito", "settings_toast_reverted": "Ripristinato alle ultime impostazioni salvate.", "settings_toast_save_failed": "Impossibile salvare le impostazioni.", @@ -98,6 +100,12 @@ "bugreport_email_placeholder": "tua.email@esempio.com", "bugreport_text_label": "Descrizione del Bug", "bugreport_text_placeholder": "Descrivi il bug in dettaglio...", + "settings_appearance_title": "Aspetto", + "settings_appearance_description": "Personalizza il tema dell'applicazione.", + "settings_theme_label": "Tema", + "settings_theme_hint": "Scegli tra modalità chiara e scura.", + "settings_theme_light": "Chiaro", + "settings_theme_dark": "Scuro", "bugreport_info": "Il tuo messaggio, il file email (se caricato), lo screenshot e le informazioni di sistema saranno inclusi nella segnalazione.", "bugreport_screenshot_label": "Screenshot Allegato:", "bugreport_cancel": "Annulla", @@ -160,5 +168,35 @@ "credits_lib_dompurify": "Sanitizzatore XSS per contenuti HTML", "credits_license_title": "Licenza e Sorgente", "credits_license_text": "EMLy è un software proprietario sviluppato da 3gIT. Tutti i diritti riservati. L'applicazione utilizza varie librerie open source, ciascuna governata dalle rispettive licenze.", - "credits_copyright": "Tutti i diritti riservati." + "credits_copyright": "Tutti i diritti riservati.", + "settings_updates_title": "Aggiornamenti", + "settings_updates_description": "Controlla e installa gli aggiornamenti dell'applicazione dalla condivisione di rete.", + "settings_updates_current_version": "Versione corrente", + "settings_updates_available": "Aggiornamento disponibile", + "settings_updates_check_failed": "Controllo fallito", + "settings_updates_no_updates": "Nessun aggiornamento trovato", + "settings_updates_check_label": "Controlla aggiornamenti", + "settings_updates_last_checked": "Ultimo controllo: {time}", + "settings_updates_click_check": "Clicca per cercare aggiornamenti disponibili", + "settings_updates_checking": "Controllo in corso...", + "settings_updates_check_now": "Controlla ora", + "settings_updates_version_available": "Versione {version} disponibile", + "settings_updates_downloading": "Download in corso... {progress}%", + "settings_updates_click_download": "Clicca per scaricare l'aggiornamento", + "settings_updates_download_button": "Scarica", + "settings_updates_ready_title": "Aggiornamento pronto per l'installazione", + "settings_updates_ready_ref": "La versione {version} è stata scaricata e verificata", + "settings_updates_install_button": "Installa ora", + "settings_updates_info_message": "Gli aggiornamenti vengono controllati dal percorso di rete configurato.", + "settings_updates_current_path": "Percorso attuale:", + "settings_updates_no_path": "Nessun percorso di aggiornamento configurato", + "settings_toast_update_available": "Aggiornamento disponibile: {version}", + "settings_toast_latest_version": "Sei sull'ultima versione", + "settings_toast_check_failed": "Impossibile controllare gli aggiornamenti", + "settings_toast_download_success": "Aggiornamento scaricato con successo", + "settings_toast_download_failed": "Impossibile scaricare l'aggiornamento", + "settings_toast_install_failed": "Impossibile avviare l'installazione", + "settings_danger_update_checker_label": "Abilita controllo aggiornamenti", + "settings_danger_update_checker_hint": "Controlla aggiornamenti applicazione dalla condivisione di rete", + "settings_danger_update_checker_info": "Info: Quando abilitato, l'app controllerà gli aggiornamenti dal percorso di rete configurato. Disabilitalo se gestisci gli aggiornamenti manualmente o non hai accesso alla rete." } diff --git a/frontend/package.json b/frontend/package.json index a4702d7..57dc77d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,6 +36,7 @@ "vite-plugin-devtools-json": "^1.0.0" }, "dependencies": { + "@rollup/rollup-win32-arm64-msvc": "^4.57.1", "@types/html2canvas": "^1.0.0", "dompurify": "^3.3.1", "html2canvas": "^1.4.1", diff --git a/frontend/src/app.html b/frontend/src/app.html index a3b1624..08986d3 100644 --- a/frontend/src/app.html +++ b/frontend/src/app.html @@ -14,11 +14,11 @@ try { const key = "emly_theme"; const stored = localStorage.getItem(key); - const theme = stored === "light" || stored === "dark" ? stored : "dark"; + const theme = stored === "light" || stored === "dark" ? stored : "light"; document.documentElement.classList.toggle("dark", theme === "dark"); } catch { - // If storage is blocked, default to dark. - document.documentElement.classList.add("dark"); + // If storage is blocked, default to light. + document.documentElement.classList.remove("dark"); } })(); @@ -67,8 +67,21 @@
-
Loading, please wait...
+
Loading...
+
%sveltekit.body%
diff --git a/frontend/src/lib/components/MailViewer.svelte b/frontend/src/lib/components/MailViewer.svelte index 70c0ebe..349919c 100644 --- a/frontend/src/lib/components/MailViewer.svelte +++ b/frontend/src/lib/components/MailViewer.svelte @@ -403,8 +403,8 @@ } .panel { - background: rgba(255, 255, 255, 0.04); - border: 1px solid rgba(255, 255, 255, 0.1); + background: var(--card); + border: 1px solid var(--border); border-radius: 14px; overflow: hidden; } @@ -423,20 +423,20 @@ height: 34px; padding: 0 12px; border-radius: 10px; - border: 1px solid rgba(255, 255, 255, 0.12); - background: rgba(255, 255, 255, 0.06); - color: inherit; + border: 1px solid var(--border); + background: var(--muted); + color: var(--muted-foreground); cursor: pointer; user-select: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; - color: rgba(255, 255, 255, 0.5); } .btn:hover { - background: rgba(255, 255, 255, 0.09); + background: var(--accent); + color: var(--accent-foreground); } .events { @@ -454,16 +454,16 @@ } .email-header-content { - background: rgba(255, 255, 255, 0.05); + background: var(--card); padding: 16px; - border-bottom: 1px solid rgba(255, 255, 255, 0.08); + border-bottom: 1px solid var(--border); } .email-subject { font-size: 18px; font-weight: 600; line-height: 1.25; - color: inherit; + color: var(--foreground); min-width: 0; overflow-wrap: break-word; } @@ -496,21 +496,21 @@ .email-meta-grid .label { text-align: right; - color: rgba(255, 255, 255, 0.5); + color: var(--muted-foreground); margin-right: 8px; font-weight: 500; } .email-meta-grid .value { - color: rgba(255, 255, 255, 0.9); + color: var(--foreground); word-break: break-all; font-weight: 500; } .email-attachments { padding: 10px 16px; - border-bottom: 1px solid rgba(255, 255, 255, 0.08); - background: rgba(255, 255, 255, 0.03); + border-bottom: 1px solid var(--border); + background: var(--muted); display: flex; align-items: center; gap: 12px; @@ -522,7 +522,7 @@ font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; - color: rgba(255, 255, 255, 0.5); + color: var(--muted-foreground); flex-shrink: 0; } @@ -538,9 +538,9 @@ height: 28px; padding: 0 10px; border-radius: 6px; - border: 1px solid rgba(255, 255, 255, 0.15); + border: 1px solid var(--border); background: transparent; - color: rgba(255, 255, 255, 0.8); + color: var(--foreground); font-size: 12px; cursor: pointer; text-decoration: none; @@ -548,8 +548,8 @@ } .att-btn:hover { - background: rgba(255, 255, 255, 0.05); - color: #fff; + background: var(--accent); + color: var(--accent-foreground); } .att-btn.image { @@ -628,10 +628,10 @@ justify-content: center; height: 36px; padding: 0 16px; - background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.15); + background: var(--muted); + border: 1px solid var(--border); border-radius: 8px; - color: white; + color: var(--foreground); font-size: 13px; font-weight: 500; cursor: pointer; @@ -639,8 +639,8 @@ } .browse-btn:hover { - background: rgba(255, 255, 255, 0.15); - border-color: rgba(255, 255, 255, 0.25); + background: var(--accent); + border-color: var(--accent-foreground); } .browse-btn:disabled, @@ -660,12 +660,12 @@ } ::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, 0.1); + background: var(--border); border-radius: 6px; } ::-webkit-scrollbar-thumb:hover { - background: rgba(255, 255, 255, 0.2); + background: var(--muted-foreground); } ::-webkit-scrollbar-corner { @@ -674,7 +674,7 @@ .att-empty { font-size: 11px; - color: rgba(255, 255, 255, 0.4); + color: var(--muted-foreground); font-style: italic; } diff --git a/frontend/src/lib/components/SidebarApp.svelte b/frontend/src/lib/components/SidebarApp.svelte index 693ce5e..d80a675 100644 --- a/frontend/src/lib/components/SidebarApp.svelte +++ b/frontend/src/lib/components/SidebarApp.svelte @@ -56,8 +56,8 @@