From dea8eed8853bcf9df57dfd662b3b60f27ca0bfdf Mon Sep 17 00:00:00 2001 From: Admin9705 <9705@duck.com> Date: Mon, 16 Feb 2026 21:18:19 -0500 Subject: [PATCH] Welcome Message & Bug Icon --- frontend/static/css/sidebar.css | 11 + frontend/static/js/app.js | 32 +++ frontend/static/js/dist/bundle-app.js | 32 +++ frontend/static/js/dist/bundle-settings.js | 30 +++ .../js/modules/features/settings/general.js | 30 +++ .../templates/components/home_section.html | 195 ++++++++++++++++++ frontend/templates/components/sidebar.html | 3 + 7 files changed, 333 insertions(+) diff --git a/frontend/static/css/sidebar.css b/frontend/static/css/sidebar.css index b238e632..262c3377 100644 --- a/frontend/static/css/sidebar.css +++ b/frontend/static/css/sidebar.css @@ -584,6 +584,17 @@ box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2); } +.sidebar-social-btn.issues-btn { + color: #f59e0b; + background: rgba(245, 158, 11, 0.08); +} +.sidebar-social-btn.issues-btn:hover { + color: #fbbf24; + background: rgba(245, 158, 11, 0.2); + border-color: rgba(245, 158, 11, 0.3); + box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2); +} + /* ===== SIDEBAR FOOTER ===== */ .sidebar-footer { position: absolute; diff --git a/frontend/static/js/app.js b/frontend/static/js/app.js index da27d5e3..af75a1fe 100644 --- a/frontend/static/js/app.js +++ b/frontend/static/js/app.js @@ -730,6 +730,8 @@ let huntarrUI = { if (window.HomeRequestarr) { window.HomeRequestarr.refresh(); } + // Show welcome message on first visit (not during setup wizard) + this._maybeShowWelcome(); } else if (section === 'logs-media-hunt' && this.elements.logsSection) { // Media Hunt logs - show logsSection under Movie Hunt sidebar (hide tab bar) var activitySection = document.getElementById('activitySection'); @@ -2036,6 +2038,36 @@ let huntarrUI = { if (typeof setActiveNavItem === 'function') setActiveNavItem(); }, + _maybeShowWelcome: function() { + // Don't show during setup wizard phase + var wizardCompleted = HuntarrUtils.getUIPreference('media-hunt-wizard-completed', false); + if (!wizardCompleted) return; + // Check if already dismissed + var dismissed = HuntarrUtils.getUIPreference('welcome-dismissed', false); + if (dismissed) return; + // Show the welcome modal + var modal = document.getElementById('huntarr-welcome-modal'); + if (!modal) return; + modal.style.display = 'flex'; + // Wire up dismiss handlers (only once) + if (!modal._welcomeWired) { + modal._welcomeWired = true; + var dismissBtn = document.getElementById('huntarr-welcome-dismiss'); + var closeBtn = document.getElementById('huntarr-welcome-close'); + var backdrop = document.getElementById('huntarr-welcome-backdrop'); + var dismiss = function() { + modal.style.display = 'none'; + HuntarrUtils.setUIPreference('welcome-dismissed', true); + }; + if (dismissBtn) dismissBtn.addEventListener('click', dismiss); + if (closeBtn) closeBtn.addEventListener('click', dismiss); + if (backdrop) backdrop.addEventListener('click', dismiss); + document.addEventListener('keydown', function(e) { + if (e.key === 'Escape' && modal.style.display === 'flex') dismiss(); + }); + } + }, + _updateMainSidebarBetaVisibility: function() { // Partner Projects always visible in unified sidebar }, diff --git a/frontend/static/js/dist/bundle-app.js b/frontend/static/js/dist/bundle-app.js index 10084a17..4178fa61 100644 --- a/frontend/static/js/dist/bundle-app.js +++ b/frontend/static/js/dist/bundle-app.js @@ -732,6 +732,8 @@ let huntarrUI = { if (window.HomeRequestarr) { window.HomeRequestarr.refresh(); } + // Show welcome message on first visit (not during setup wizard) + this._maybeShowWelcome(); } else if (section === 'logs-media-hunt' && this.elements.logsSection) { // Media Hunt logs - show logsSection under Movie Hunt sidebar (hide tab bar) var activitySection = document.getElementById('activitySection'); @@ -2038,6 +2040,36 @@ let huntarrUI = { if (typeof setActiveNavItem === 'function') setActiveNavItem(); }, + _maybeShowWelcome: function() { + // Don't show during setup wizard phase + var wizardCompleted = HuntarrUtils.getUIPreference('media-hunt-wizard-completed', false); + if (!wizardCompleted) return; + // Check if already dismissed + var dismissed = HuntarrUtils.getUIPreference('welcome-dismissed', false); + if (dismissed) return; + // Show the welcome modal + var modal = document.getElementById('huntarr-welcome-modal'); + if (!modal) return; + modal.style.display = 'flex'; + // Wire up dismiss handlers (only once) + if (!modal._welcomeWired) { + modal._welcomeWired = true; + var dismissBtn = document.getElementById('huntarr-welcome-dismiss'); + var closeBtn = document.getElementById('huntarr-welcome-close'); + var backdrop = document.getElementById('huntarr-welcome-backdrop'); + var dismiss = function() { + modal.style.display = 'none'; + HuntarrUtils.setUIPreference('welcome-dismissed', true); + }; + if (dismissBtn) dismissBtn.addEventListener('click', dismiss); + if (closeBtn) closeBtn.addEventListener('click', dismiss); + if (backdrop) backdrop.addEventListener('click', dismiss); + document.addEventListener('keydown', function(e) { + if (e.key === 'Escape' && modal.style.display === 'flex') dismiss(); + }); + } + }, + _updateMainSidebarBetaVisibility: function() { // Partner Projects always visible in unified sidebar }, diff --git a/frontend/static/js/dist/bundle-settings.js b/frontend/static/js/dist/bundle-settings.js index 734260cd..15ce2fdb 100644 --- a/frontend/static/js/dist/bundle-settings.js +++ b/frontend/static/js/dist/bundle-settings.js @@ -14547,6 +14547,13 @@ document.head.appendChild(styleEl);

Re-show the Media Hunt setup wizard on next visit. Useful if you skipped the wizard and want to run it again.

+
+ + +

Re-show the welcome message on the Home page. Useful for testing or if you want to see the welcome message again.

+
@@ -14604,6 +14611,29 @@ document.head.appendChild(styleEl); }); } + // Reset Welcome Message button + var resetWelcomeBtn = container.querySelector('#reset-welcome-message-btn'); + if (resetWelcomeBtn) { + resetWelcomeBtn.addEventListener('click', function() { + if (window.HuntarrConfirm && window.HuntarrConfirm.show) { + window.HuntarrConfirm.show({ + title: 'Reset Welcome Message', + message: 'This will re-show the welcome message the next time you visit the Home page. Continue?', + confirmLabel: 'Reset', + cancelLabel: 'Cancel', + onConfirm: function() { + HuntarrUtils.setUIPreference('welcome-dismissed', false); + if (window.HuntarrToast) window.HuntarrToast.success('Welcome message has been reset. It will show on your next visit to Home.'); + } + }); + } else { + if (confirm('Reset the welcome message? It will show again on your next Home page visit.')) { + HuntarrUtils.setUIPreference('welcome-dismissed', false); + } + } + }); + } + if (window.SettingsForms.setupSettingsManualSave) { window.SettingsForms.setupSettingsManualSave(container, settings); } diff --git a/frontend/static/js/modules/features/settings/general.js b/frontend/static/js/modules/features/settings/general.js index bd44abae..1c860f30 100644 --- a/frontend/static/js/modules/features/settings/general.js +++ b/frontend/static/js/modules/features/settings/general.js @@ -204,6 +204,13 @@

Re-show the Media Hunt setup wizard on next visit. Useful if you skipped the wizard and want to run it again.

+
+ + +

Re-show the welcome message on the Home page. Useful for testing or if you want to see the welcome message again.

+
@@ -261,6 +268,29 @@ }); } + // Reset Welcome Message button + var resetWelcomeBtn = container.querySelector('#reset-welcome-message-btn'); + if (resetWelcomeBtn) { + resetWelcomeBtn.addEventListener('click', function() { + if (window.HuntarrConfirm && window.HuntarrConfirm.show) { + window.HuntarrConfirm.show({ + title: 'Reset Welcome Message', + message: 'This will re-show the welcome message the next time you visit the Home page. Continue?', + confirmLabel: 'Reset', + cancelLabel: 'Cancel', + onConfirm: function() { + HuntarrUtils.setUIPreference('welcome-dismissed', false); + if (window.HuntarrToast) window.HuntarrToast.success('Welcome message has been reset. It will show on your next visit to Home.'); + } + }); + } else { + if (confirm('Reset the welcome message? It will show again on your next Home page visit.')) { + HuntarrUtils.setUIPreference('welcome-dismissed', false); + } + } + }); + } + if (window.SettingsForms.setupSettingsManualSave) { window.SettingsForms.setupSettingsManualSave(container, settings); } diff --git a/frontend/templates/components/home_section.html b/frontend/templates/components/home_section.html index ad7b0776..b6d2c23c 100644 --- a/frontend/templates/components/home_section.html +++ b/frontend/templates/components/home_section.html @@ -2342,4 +2342,199 @@ document.addEventListener('DOMContentLoaded', function() { // Home sponsor banner is driven by app-sponsor-rotation.js (same rotation as app pages) }); + + + + + diff --git a/frontend/templates/components/sidebar.html b/frontend/templates/components/sidebar.html index b140a262..5877788a 100644 --- a/frontend/templates/components/sidebar.html +++ b/frontend/templates/components/sidebar.html @@ -324,6 +324,9 @@ + + +