🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!
Fix desktop, tablet, and mobile QA issues across editing, tags, export, settings, and layouts
sassanixac79bfe93dad
diff --git a/backend/warranties_routes.py b/backend/warranties_routes.pyindex dc8ca21..98efc64 100644--- a/backend/warranties_routes.py+++ b/backend/warranties_routes.py@@ -2923,7 +2923,18 @@ def get_timezones():})# Convert to frontend expected format: array of objects with region and timezones- timezone_groups_array = []+ timezone_groups_array = [+ {+ 'region': 'UTC',+ 'timezones': [+ {+ 'value': 'UTC',+ 'label': 'UTC (Coordinated Universal Time)',+ 'full_name': 'UTC'+ }+ ]+ }+ ]for region, timezones in grouped_timezones.items():timezone_groups_array.append({'region': region,diff --git a/frontend/js/components/claims.js b/frontend/js/components/claims.jsindex 10d01ed..a7aceec 100644--- a/frontend/js/components/claims.js+++ b/frontend/js/components/claims.js@@ -2,6 +2,7 @@ import authService from '../services/authService.js';import { getWarranties, getIsGlobalView } from '../store.js';import { showToast, apiErrorMessage } from './ui.js';import { formatDate } from '../lib/dates.js';+import { isPaperlessEnabled } from './paperless.js';const state = {currentWarrantyId: null,@@ -192,12 +193,15 @@ function documentsSectionHtml(claim, canEdit) {</div>`;}).join('');- const addRow = canEdit- ? `<div class="claim-documents-add">- <select class="claim-doc-storage">+ const storageSelectHtml = isPaperlessEnabled()+ ? `<select class="claim-doc-storage"><option value="local">${t('claims.storage_local', 'Upload file')}</option><option value="paperless">${t('claims.storage_paperless', 'Upload to Paperless')}</option>- </select>+ </select>`+ : '';+ const addRow = canEdit+ ? `<div class="claim-documents-add">+ ${storageSelectHtml}<button type="button" class="btn btn-sm btn-secondary claim-doc-attach" data-claim-id="${claim.id}"><i class="fas fa-paperclip"></i> ${t('claims.attach_document', 'Attach document')}</button></div>`: '';@@ -598,19 +602,21 @@ function createDocumentsSection(claim, canEdit) {if (canEdit) {const addRow = el('div', 'claim-documents-add');- const storageSelect = el('select', 'claim-doc-storage');- const optLocal = el('option', null, t('claims.storage_local', 'Upload file'));- optLocal.value = 'local';- const optPaperless = el('option', null, t('claims.storage_paperless', 'Upload to Paperless'));- optPaperless.value = 'paperless';- storageSelect.appendChild(optLocal);- storageSelect.appendChild(optPaperless);+ if (isPaperlessEnabled()) {+ const storageSelect = el('select', 'claim-doc-storage');+ const optLocal = el('option', null, t('claims.storage_local', 'Upload file'));+ optLocal.value = 'local';+ const optPaperless = el('option', null, t('claims.storage_paperless', 'Upload to Paperless'));+ optPaperless.value = 'paperless';+ storageSelect.appendChild(optLocal);+ storageSelect.appendChild(optPaperless);+ addRow.appendChild(storageSelect);+ }const attachBtn = el('button', 'btn btn-sm btn-secondary claim-doc-attach');attachBtn.type = 'button';attachBtn.dataset.claimId = String(claim.id);attachBtn.appendChild(el('i', 'fas fa-paperclip'));attachBtn.appendChild(document.createTextNode(' ' + t('claims.attach_document', 'Attach document')));- addRow.appendChild(storageSelect);addRow.appendChild(attachBtn);section.appendChild(addRow);}diff --git a/frontend/js/components/editModal.js b/frontend/js/components/editModal.jsindex d4e81e0..6bbd2d7 100644--- a/frontend/js/components/editModal.js+++ b/frontend/js/components/editModal.js@@ -540,6 +540,12 @@ function populateDocuments(warranty) {setDeleteHandler('deleteOtherDocumentBtn', otherContainer, (window.i18next && window.i18next.t('warranties.other_document_will_be_deleted') || 'Files will be deleted'));const photoUrlInput = document.getElementById('editProductPhotoUrl');if (photoUrlInput) photoUrlInput.value = '';+ const invoiceUrlInput = document.getElementById('editInvoiceUrl');+ if (invoiceUrlInput) invoiceUrlInput.value = warranty.invoice_url || '';+ const manualUrlInput = document.getElementById('editManualUrl');+ if (manualUrlInput) manualUrlInput.value = warranty.manual_url || '';+ const otherDocUrlInput = document.getElementById('editOtherDocumentUrl');+ if (otherDocUrlInput) otherDocUrlInput.value = warranty.other_document_url || '';clearPaperlessSelection('edit_invoice');clearPaperlessSelection('edit_manual');clearPaperlessSelection('edit_productPhoto');@@ -637,9 +643,9 @@ export async function saveWarranty() {formData.append('tag_ids', JSON.stringify(tags.map((t) => t.id)));// Document URLs- formData.append('invoice_url', (document.getElementById('editInvoiceUrl') || {}).value || '');- formData.append('manual_url', (document.getElementById('editManualUrl') || {}).value || '');- formData.append('other_document_url', (document.getElementById('editOtherDocumentUrl') || {}).value || '');+ formData.append('invoice_url', ((document.getElementById('editInvoiceUrl') || {}).value || '').trim());+ formData.append('manual_url', ((document.getElementById('editManualUrl') || {}).value || '').trim());+ formData.append('other_document_url', ((document.getElementById('editOtherDocumentUrl') || {}).value || '').trim());// Filesconst invoiceFile = (document.getElementById('editInvoice') || {}).files ? document.getElementById('editInvoice').files[0] : null;diff --git a/frontend/js/components/importExport.js b/frontend/js/components/importExport.jsindex 3e5a08a..4218be1 100644--- a/frontend/js/components/importExport.js+++ b/frontend/js/components/importExport.js@@ -1,4 +1,4 @@-import { getWarranties, getFilters } from '../store.js';+import { getWarranties, getFilters, wasLastLoadedArchived } from '../store.js';import { showToast, showLoadingSpinner, hideLoadingSpinner } from './ui.js';import { loadWarranties, applyFilters } from '../controllers/warrantyListController.js';import { loadTags } from './tagManager.js';@@ -21,6 +21,56 @@ export function neutralizeCsvFormula(value) {return text;}+export function filterWarrantiesForExport(warranties, filters = {}, options = {}) {+ const statusFilter = filters.status || 'all';+ const tagFilter = filters.tag || 'all';+ const vendorFilter = filters.vendor || 'all';+ const warrantyTypeFilter = filters.warranty_type || 'all';+ const searchTerm = (filters.search || '').toLowerCase();+ const isArchivedView = Boolean(options.isArchivedView);++ return (Array.isArray(warranties) ? warranties : []).filter((warranty) => {+ const isArchived = Boolean(warranty.is_archived || warranty.__isArchived || isArchivedView);+ if (statusFilter === 'archived') {+ if (!isArchived) return false;+ } else if (statusFilter !== 'all') {+ if (isArchived) return false;+ if (warranty.status !== statusFilter) return false;+ }++ if (tagFilter !== 'all') {+ const tagId = Number.parseInt(tagFilter, 10);+ const hasTag = Array.isArray(warranty.tags)+ && warranty.tags.some((tag) => tag.id === tagId);+ if (!hasTag) return false;+ }++ if (vendorFilter !== 'all') {+ if ((warranty.vendor || '').toLowerCase() !== String(vendorFilter).toLowerCase()) return false;+ }++ if (warrantyTypeFilter !== 'all') {+ if ((warranty.warranty_type || '').toLowerCase() !== String(warrantyTypeFilter).toLowerCase()) return false;+ }++ if (searchTerm) {+ const nameMatch = (warranty.product_name || '').toLowerCase().includes(searchTerm);+ const vendorMatch = (warranty.vendor || '').toLowerCase().includes(searchTerm);+ const tagMatch = Array.isArray(warranty.tags)+ && warranty.tags.some((tag) => (tag.name || '').toLowerCase().includes(searchTerm));+ const notesMatch = (warranty.notes || '').toLowerCase().includes(searchTerm);+ const modelNumberMatch = (warranty.model_number || '').toLowerCase().includes(searchTerm);+ const serialNumberMatch = Array.isArray(warranty.serial_numbers)+ && warranty.serial_numbers.some((sn) => sn && String(sn).toLowerCase().includes(searchTerm));+ if (!nameMatch && !vendorMatch && !tagMatch && !notesMatch && !modelNumberMatch && !serialNumberMatch) {+ return false;+ }+ }++ return true;+ });+}+export async function exportWarranties() {const warranties = getWarranties();if (!warranties.length) {@@ -28,31 +78,9 @@ export async function exportWarranties() {return;}const filters = getFilters();- let filtered = [...warranties];- if (filters.search) {- const term = filters.search.toLowerCase();- filtered = filtered.filter((warranty) => {- const nameMatch = (warranty.product_name || '').toLowerCase().includes(term);- const vendorMatch = (warranty.vendor || '').toLowerCase().includes(term);- const tagMatch = Array.isArray(warranty.tags)- && warranty.tags.some((tag) => (tag.name || '').toLowerCase().includes(term));- return nameMatch || vendorMatch || tagMatch;- });- }- if (filters.status !== 'all') {- filtered = filtered.filter((warranty) => warranty.status === filters.status);- }- if (filters.tag !== 'all') {- const tagId = Number.parseInt(filters.tag, 10);- filtered = filtered.filter((warranty) => Array.isArray(warranty.tags)- && warranty.tags.some((tag) => tag.id === tagId));- }- if (filters.vendor !== 'all') {- filtered = filtered.filter((warranty) => (warranty.vendor || '').toLowerCase() === (filters.vendor || '').toLowerCase());- }- if (filters.warranty_type !== 'all') {- filtered = filtered.filter((warranty) => (warranty.warranty_type || '').toLowerCase() === (filters.warranty_type || '').toLowerCase());- }+ const filtered = filterWarrantiesForExport(warranties, filters, {+ isArchivedView: wasLastLoadedArchived(),+ });if (!filtered.length) {showToast((window.i18next && window.i18next.t('messages.no_warranties_to_export') || 'No warranties to export'), 'info');diff --git a/frontend/js/components/notes.js b/frontend/js/components/notes.jsindex e78e4a8..7aef4d0 100644--- a/frontend/js/components/notes.js+++ b/frontend/js/components/notes.js@@ -181,17 +181,11 @@ function buildFormData(warranty, noteValue) {if (warranty.purchase_price !== null && warranty.purchase_price !== undefined) {formData.append('purchase_price', warranty.purchase_price);}- const vendorInput = document.getElementById('editVendorOrRetailer');- if (vendorInput) {- formData.append('vendor', vendorInput.value.trim());- } else if (warranty.vendor) {+ if (warranty.vendor !== null && warranty.vendor !== undefined && warranty.vendor !== '') {formData.append('vendor', warranty.vendor);}if (warranty.warranty_type) formData.append('warranty_type', warranty.warranty_type);- const modelNumberInput = document.getElementById('editModelNumber');- if (modelNumberInput && modelNumberInput.value.trim() !== '') {- formData.append('model_number', modelNumberInput.value.trim());- } else if (typeof warranty.model_number !== 'undefined' && warranty.model_number !== null) {+ if (typeof warranty.model_number !== 'undefined' && warranty.model_number !== null) {formData.append('model_number', warranty.model_number);}if (Array.isArray(warranty.serial_numbers)) {diff --git a/frontend/js/components/paperless.js b/frontend/js/components/paperless.jsindex 580932c..f5195a3 100644--- a/frontend/js/components/paperless.js+++ b/frontend/js/components/paperless.js@@ -5,6 +5,10 @@ import { getIsGlobalView, getUserPreferencePrefix, setUserPreferencePrefix } frolet paperlessNgxEnabled = false;+export function isPaperlessEnabled() {+ return Boolean(paperlessNgxEnabled || (typeof window !== 'undefined' && window.paperlessNgxEnabled));+}+const browserState = {isOpen: false,documentType: null,diff --git a/frontend/js/components/tagManager.js b/frontend/js/components/tagManager.jsindex 24315f6..5ff616f 100644--- a/frontend/js/components/tagManager.js+++ b/frontend/js/components/tagManager.js@@ -342,6 +342,7 @@ export function openTagManagementModal() {if (!modal) return;ensureTagsLoaded();renderExistingTags();+ modal.style.display = '';modal.classList.add('active');}@@ -407,8 +408,9 @@ export function renderExistingTags() {function bindTagManagementDelegates() {if (state.listenersBound) return;const container = getElement(selectors.modal.existingTags);- if (!container) return;+ if (!container || container.dataset.tmListenersAttached === 'true') return;state.listenersBound = true;+ container.dataset.tmListenersAttached = 'true';container.addEventListener('click', (event) => {const row = event.target.closest('tr.existing-tag-row');if (!row) return;@@ -496,7 +498,8 @@ export function addTagManagementEventListeners() {if (!modal || modal.dataset.listenersBound === 'true') return;modal.dataset.listenersBound = 'true';const form = getElement(selectors.modal.newTagForm);- if (form) {+ if (form && form.dataset.tagFormBound !== 'true') {+ form.dataset.tagFormBound = 'true';form.addEventListener('submit', async (event) => {event.preventDefault();const nameInput = getElement(selectors.modal.tagNameInput);diff --git a/frontend/js/components/warrantyRenderer.js b/frontend/js/components/warrantyRenderer.jsindex 0b4c787..ee262a9 100644--- a/frontend/js/components/warrantyRenderer.js+++ b/frontend/js/components/warrantyRenderer.js@@ -461,10 +461,11 @@ function cardClassName(warranty, view, statusClass) {const isArchived = warranty.is_archived || warranty.viewFlags?.isArchivedView;if (isArchived) return 'warranty-card archived';if (warranty.is_voided) return 'warranty-card voided';- if (view === 'table') return `warranty-card status-${statusClass}`;- if (statusClass === 'expired') return 'warranty-card expired';- if (statusClass === 'expiring') return 'warranty-card expiring-soon';- return 'warranty-card active';+ const modifier = statusClass === 'expired'+ ? 'expired'+ : (statusClass === 'expiring' ? 'expiring-soon' : 'active');+ if (view === 'table') return `warranty-card ${modifier} status-${statusClass}`;+ return `warranty-card ${modifier}`;}function buildPhotoHtml(warranty, view) {diff --git a/frontend/js/controllers/warrantyListController.js b/frontend/js/controllers/warrantyListController.jsindex 9ef8e50..b1fa987 100644--- a/frontend/js/controllers/warrantyListController.js+++ b/frontend/js/controllers/warrantyListController.js@@ -172,11 +172,13 @@ export async function loadWarranties(isAuthenticatedOverride) {return;}- let combined = Array.isArray(primary) ? primary : [];-let lastLoadedArchived = filters.status === 'archived';let lastLoadedIncludesArchived = false;+ let combined = Array.isArray(primary)+ ? (lastLoadedArchived ? primary.map((warranty) => ({ ...warranty, __isArchived: true })) : primary)+ : [];+if (filters.status === 'all') {const archived = await listWarranties({ scope, archived: true });const archivedMarked = Array.isArray(archived) ? archived.map((warranty) => ({ ...warranty, __isArchived: true })) : [];diff --git a/frontend/mobile-header.css b/frontend/mobile-header.cssindex f496a4d..643882a 100644--- a/frontend/mobile-header.css+++ b/frontend/mobile-header.css@@ -415,13 +415,17 @@flex-wrap: nowrap !important;gap: 8px !important;}- .search-container .secondary-actions #viewDropdownContainer,- .search-container .secondary-actions #scopeDropdown {+ .search-container .secondary-actions #viewDropdownContainer {width: auto !important;flex: 0 1 auto !important;display: block !important;min-width: 0 !important;}+ .search-container .secondary-actions #scopeDropdown {+ width: auto !important;+ flex: 0 1 auto !important;+ min-width: 0 !important;+ }#viewMenuBtn,#scopeMenuBtn {width: auto !important;@@ -506,6 +510,27 @@.search-container #viewDropdownContainer { grid-area: view !important; }.search-container #scopeDropdown { grid-area: scope !important; }+ /* Keep column-3 (Data, Scope) and column-2 (View) popovers inside mobile viewports */+ #dataMenu,+ #scopeMenu {+ left: auto !important;+ right: 0 !important;+ width: max-content !important;+ max-width: calc(100vw - 32px) !important;+ }+ html[dir="rtl"] #dataMenu,+ html[dir="rtl"] #scopeMenu {+ left: 0 !important;+ right: auto !important;+ }+ #viewMenu {+ left: 50% !important;+ right: auto !important;+ transform: translateX(-50%) !important;+ width: max-content !important;+ max-width: calc(100vw - 32px) !important;+ }+/* Make the button inside each grid cell fill its container */.search-container .secondary-actions .data-dropdown > .action-btn,.search-container .secondary-actions #globalManageTagsBtn,@@ -931,6 +956,8 @@.list-view .product-name-header {padding: 10px 12px !important;font-size: 1rem !important;+ flex-wrap: wrap !important;+ gap: 6px !important;}.list-view .product-name-header .warranty-title {@@ -939,7 +966,14 @@white-space: normal !important; /* Allow wrapping on mobile */overflow: visible !important;text-overflow: clip !important;- max-width: calc(100% - 70px) !important; /* Make room for action buttons */+ flex: 1 1 100% !important;+ max-width: 100% !important;+ }++ .list-view .product-name-header .warranty-actions {+ width: 100% !important;+ justify-content: flex-end !important;+ flex-wrap: wrap !important;}/* Optimize warranty content padding */diff --git a/frontend/mobile-menu.js b/frontend/mobile-menu.jsindex b080815..b027c40 100644--- a/frontend/mobile-menu.js+++ b/frontend/mobile-menu.js@@ -54,8 +54,8 @@}const userDropdown = header.querySelector('#userMenuDropdown');- const userMenuAnchors = userDropdown ? Array.from(userDropdown.querySelectorAll('a')) : [];- if (userMenuAnchors.length) {+ const userMenuAnchors = (isAuthenticated && userDropdown) ? Array.from(userDropdown.querySelectorAll('a')) : [];+ if (isAuthenticated && userMenuAnchors.length) {createSection(displayName || 'Menu');appendLinks(userMenuAnchors);@@ -89,6 +89,16 @@}panel.setAttribute('data-built', 'true');+ return panel.querySelectorAll('a').length > 0;+ }++ function hasNavigableItems(header) {+ if (!header) return false;+ const isAuthenticated = !!(function(){ try { return localStorage.getItem('auth_token'); } catch(_) { return null; } })();+ const navLinks = header.querySelectorAll('.nav-links a').length;+ const authLinks = !isAuthenticated ? header.querySelectorAll('#authContainer a').length : 0;+ const userLinks = isAuthenticated ? header.querySelectorAll('#userMenuDropdown a').length : 0;+ return (navLinks + authLinks + userLinks) > 0;}function initializeMobileMenu() {@@ -99,11 +109,20 @@const overlay = document.getElementById('mobileMenuOverlay');if (!toggleBtn || !panel || !overlay) return;+ if (!hasNavigableItems(header)) {+ toggleBtn.style.display = 'none';+ return;+ }+if (toggleBtn.getAttribute('data-mm-bound') === '1') return;toggleBtn.setAttribute('data-mm-bound', '1');const openMenu = () => {buildMobileMenuContent(panel, header);+ if (!panel.querySelector('a')) {+ toggleBtn.style.display = 'none';+ return;+ }panel.classList.add('is-open');overlay.classList.add('is-open');document.body.classList.add('mobile-menu-active');diff --git a/frontend/register.html b/frontend/register.htmlindex 13ad310..bf46369 100644--- a/frontend/register.html+++ b/frontend/register.html@@ -289,13 +289,8 @@<i class="fas fa-shield-alt"></i><h1>Warracker</h1></div>- <div class="header-right-group">- <button class="mobile-menu-toggle" aria-label="Toggle menu"><i class="fas fa-bars"></i></button>- </div></div></header>- <div class="mobile-menu-panel" id="mobileMenuPanel"></div>- <div class="mobile-menu-overlay" id="mobileMenuOverlay"></div><!-- Main Content --><div class="container">diff --git a/frontend/reset-password-request.html b/frontend/reset-password-request.htmlindex da697f7..841de02 100644--- a/frontend/reset-password-request.html+++ b/frontend/reset-password-request.html@@ -108,13 +108,8 @@<i class="fas fa-shield-alt"></i><h1><a href="index.html" style="color: inherit; text-decoration: none; cursor: pointer;">Warracker</a></h1></div>- <div class="header-right-group">- <button class="mobile-menu-toggle" aria-label="Toggle menu"><i class="fas fa-bars"></i></button>- </div></div></header>- <div class="mobile-menu-panel" id="mobileMenuPanel"></div>- <div class="mobile-menu-overlay" id="mobileMenuOverlay"></div><!-- Main Content --><div class="container">diff --git a/frontend/reset-password.html b/frontend/reset-password.htmlindex 32abb6a..b7e3614 100644--- a/frontend/reset-password.html+++ b/frontend/reset-password.html@@ -165,13 +165,8 @@<i class="fas fa-shield-alt"></i><h1><a href="index.html" style="color: inherit; text-decoration: none; cursor: pointer;">Warracker</a></h1></div>- <div class="header-right-group">- <button class="mobile-menu-toggle" aria-label="Toggle menu"><i class="fas fa-bars"></i></button>- </div></div></header>- <div class="mobile-menu-panel" id="mobileMenuPanel"></div>- <div class="mobile-menu-overlay" id="mobileMenuOverlay"></div><!-- Main Content --><div class="container">@@ -346,12 +341,15 @@return;}+ const submitBtn = passwordResetForm.querySelector('button[type="submit"]');+ const originalBtnText = submitBtn ? submitBtn.innerHTML : '';+try {// Show loading state- const submitBtn = passwordResetForm.querySelector('button[type="submit"]');- const originalBtnText = submitBtn.innerHTML;- submitBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Resetting Password...';- submitBtn.disabled = true;+ if (submitBtn) {+ submitBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Resetting Password...';+ submitBtn.disabled = true;+ }// Make API requestconst response = await fetch('/api/auth/password/reset', {@@ -387,8 +385,10 @@showMessage(error.message || 'Password reset failed. Please try again.', 'error');// Reset button- submitBtn.innerHTML = originalBtnText;- submitBtn.disabled = false;+ if (submitBtn) {+ submitBtn.innerHTML = originalBtnText;+ submitBtn.disabled = false;+ }}});diff --git a/frontend/script.js b/frontend/script.jsindex c0bea0f..f0dd37f 100644--- a/frontend/script.js+++ b/frontend/script.js@@ -399,7 +399,7 @@ document.addEventListener('DOMContentLoaded', function() {// --- Ensure globalManageTagsBtn triggers modal and tag form is always initialized ---// (Redundant with setupUIEventListeners, but ensures modal is always ready)const globalManageTagsBtn = document.getElementById('globalManageTagsBtn');- if (globalManageTagsBtn) {+ if (globalManageTagsBtn && !(window.components && window.components.tagManager)) {globalManageTagsBtn.addEventListener('click', async () => {if (!allTags || allTags.length === 0) {showLoadingSpinner();@@ -427,9 +427,9 @@ document.addEventListener('DOMContentLoaded', function() {// 1. ALWAYS Initialize listeners for the global Tag Management Modal IF IT EXISTSif (globalTagManagementModal) {- if (globalNewTagForm) {- // Ensure the event listener is attached only once, or manage it if DOMContentLoaded could fire multiple times (not typical)- // For simplicity, assuming DOMContentLoaded runs once per page load.+ const hasModularTagManager = !!(window.components && window.components.tagManager);+ if (globalNewTagForm && !hasModularTagManager && globalNewTagForm.dataset.tagFormBound !== 'true') {+ globalNewTagForm.dataset.tagFormBound = 'true';globalNewTagForm.addEventListener('submit', (e) => {e.preventDefault();// Inline implementation for creating a new tag from the modal@@ -461,7 +461,8 @@ document.addEventListener('DOMContentLoaded', function() {const closeButtons = globalTagManagementModal.querySelectorAll('[data-dismiss="modal"]');closeButtons.forEach(button => {button.addEventListener('click', (event) => {- globalTagManagementModal.style.display = 'none';+ globalTagManagementModal.classList.remove('active');+ globalTagManagementModal.style.display = '';event.stopPropagation(); // This was the fix from before, ensuring it's applied});});@@ -4685,6 +4686,10 @@ function getContrastColor(hexColor) {// Open tag management modalfunction openTagManagementModal() {+ if (window.components && window.components.tagManager && typeof window.components.tagManager.openTagManagementModal === 'function') {+ window.components.tagManager.openTagManagementModal();+ return;+ }if (!tagManagementModal) return;// Populate existing tags@@ -4692,6 +4697,7 @@ function openTagManagementModal() {addTagManagementEventListeners();// Show modal+ tagManagementModal.style.display = '';tagManagementModal.classList.add('active');}@@ -4859,6 +4865,7 @@ function updateTag(id, name, color) {// Centralized event delegation for tag management tablefunction addTagManagementEventListeners() {+ if (window.components && window.components.tagManager) return;if (!tagManagementModal) return;const container = existingTagsContainer;if (!container) return;@@ -5016,7 +5023,7 @@ function setupUIEventListeners() {}// --- Global Manage Tags Button ---const globalManageTagsBtn = document.getElementById('globalManageTagsBtn');- if (globalManageTagsBtn) {+ if (globalManageTagsBtn && !(window.components && window.components.tagManager)) {globalManageTagsBtn.addEventListener('click', async () => {// Ensure allTags are loaded before opening the modalif (!allTags || allTags.length === 0) {diff --git a/frontend/settings-new.html b/frontend/settings-new.htmlindex f59f1e4..e94aeed 100644--- a/frontend/settings-new.html+++ b/frontend/settings-new.html@@ -607,7 +607,7 @@<div class="preference-item"><div><label for="oidcOnlyMode" data-i18n="settings.oidc_only_mode">OIDC-Only Login Mode</label>- <p class="text-muted" data-i18n="settings.oidc_only_mode_desc">Hide traditional username/password login form and only allow OIDC login. <strong>Warning:</strong> Ensure OIDC is properly configured before enabling this option.</p>+ <p class="text-muted" data-i18n="settings.oidc_only_mode_desc">Hide traditional username/password login form and only allow OIDC login. Warning: Ensure OIDC is properly configured before enabling this option.</p></div><label class="toggle-switch"><input type="checkbox" id="oidcOnlyMode">@@ -1111,52 +1111,6 @@<button type="button" class="btn btn-secondary close-modal">Cancel</button><button type="button" id="confirmDeleteUserBtn" class="btn btn-danger" onclick="deleteUser()">Delete</button></div>- <div style="margin-top: 20px; border-top: 1px solid #ddd; padding-top: 10px;">- <p><small>If the delete button doesn't work, try these alternatives:</small></p>- <ul style="font-size: 0.8em;">- <li><a href="#" id="directDeleteLink" style="color: #dc3545;" onclick="deleteUser(); return false;">Alternative 1: Direct function call</a></li>- <li><a href="#" id="directAPILink" style="color: #dc3545;" onclick="directDeleteUserAPI(document.getElementById('deleteUserId').value); return false;">Alternative 2: Direct API call</a></li>- <li><button type="submit" class="btn btn-sm btn-danger">Alternative 3: Form Submit</button></li>- </ul>- <div style="margin-top: 10px;">- <button type="button" id="emergencyDeleteBtn" class="btn btn-sm btn-danger"- onclick="(function() {- const userId = document.getElementById('deleteUserId').value || document.getElementById('displayUserId').textContent;- if (!userId) {- alert('Error: User ID is missing');- return;- }- const token = localStorage.getItem('auth_token');- if (!token) {- alert('Error: Authentication token is missing');- return;- }- alert('Emergency delete for user ID: ' + userId);- fetch('/api/admin/users/' + userId, {- method: 'DELETE',- headers: {- 'Authorization': 'Bearer ' + token,- 'Content-Type': 'application/json'- }- })- .then(response => {- alert('Response status: ' + response.status);- if (response.status >= 200 && response.status < 300) {- alert('User deleted successfully');- document.querySelectorAll('.modal-backdrop').forEach(m => m.style.display = 'none');- location.reload();- } else {- alert('Failed to delete user: ' + response.status);- }- })- .catch(error => {- alert('Error: ' + error.message);- });- })(); return false;">- Emergency Delete (Inline JS)- </button>- </div>- </div></form></div></div>diff --git a/frontend/settings-new.js b/frontend/settings-new.jsindex eeab0e8..1467e17 100644--- a/frontend/settings-new.js+++ b/frontend/settings-new.js@@ -929,6 +929,27 @@ async function loadPreferences() {console.log(`${prefix}defaultView not found, defaulting view to grid`);}+ // Helper to resolve either a currency code (e.g. 'USD') or a currency symbol (e.g. '$')+ // to a valid standard <option> value in currencySymbolSelect.+ const resolveCurrencyOptionValue = (codeOrSymbol) => {+ if (!codeOrSymbol || !currencySymbolSelect) return null;+ const raw = String(codeOrSymbol).trim();+ if (!raw) return null;+ const options = Array.from(currencySymbolSelect.options);+ const byCode = options.find(opt => opt.value !== 'other' && opt.value === raw);+ if (byCode) return byCode.value;+ const sharedDefaults = { '$': 'USD', '£': 'GBP', '¥': 'JPY', '₩': 'KRW', 'kr': 'SEK' };+ const sharedCode = sharedDefaults[raw];+ if (sharedCode && options.some(opt => opt.value === sharedCode)) {+ return sharedCode;+ }+ const bySymbol = globalCurrenciesData.find(c => c.symbol === raw);+ if (bySymbol && options.some(opt => opt.value === bySymbol.code)) {+ return bySymbol.code;+ }+ return null;+ };+// Currency - Load stored preference first (code preferred; symbol is legacy)const storedCurrencyCode = localStorage.getItem(`${prefix}currencyCode`);const storedCurrency = storedCurrencyCode || localStorage.getItem(`${prefix}currencySymbol`);@@ -938,15 +959,11 @@ async function loadPreferences() {if (storedCurrency) {if (currencySymbolSelect) {- // Check if the stored code/symbol matches a standard option- // (option values are currency codes; legacy stored values may be symbols)- const standardOption = Array.from(currencySymbolSelect.options).find(opt =>- opt.value === storedCurrency ||- (globalCurrenciesData.find(c => c.code === opt.value)?.symbol === storedCurrency));- if (standardOption) {- currencySymbolSelect.value = storedCurrency;+ const resolvedCode = resolveCurrencyOptionValue(storedCurrency);+ if (resolvedCode) {+ currencySymbolSelect.value = resolvedCode;if (currencySymbolCustom) currencySymbolCustom.style.display = 'none';- console.log(`Set currency dropdown to stored value: ${storedCurrency}`);+ console.log(`Set currency dropdown to resolved code: ${resolvedCode} (from ${storedCurrency})`);} else {// It's a custom symbolcurrencySymbolSelect.value = 'other';@@ -1009,16 +1026,15 @@ async function loadPreferences() {}}// --- MODIFIED CURRENCY SYMBOL HANDLING ---- const storedCurrency = localStorage.getItem(`${prefix}currencySymbol`); // Get localStorage value again for comparison+ const storedCurrencySymbol = localStorage.getItem(`${prefix}currencySymbol`);if (apiPrefs.currency_symbol && currencySymbolSelect) {// Only update UI from API if the API value is different from what was in localStorage// Or if localStorage didn't have a value initially- if (!storedCurrency || apiPrefs.currency_symbol !== storedCurrency) {- console.log(`API currency_symbol (${apiPrefs.currency_symbol}) differs from localStorage (${storedCurrency}). Updating UI.`);- // Logic to handle standard vs custom symbol from API- const standardOption = Array.from(currencySymbolSelect.options).find(opt => opt.value === apiPrefs.currency_symbol);- if (standardOption) {- currencySymbolSelect.value = apiPrefs.currency_symbol;+ if (!storedCurrencySymbol || apiPrefs.currency_symbol !== storedCurrencySymbol) {+ console.log(`API currency_symbol (${apiPrefs.currency_symbol}) differs from localStorage (${storedCurrencySymbol}). Updating UI.`);+ const resolvedApiCode = resolveCurrencyOptionValue(apiPrefs.currency_symbol);+ if (resolvedApiCode) {+ currencySymbolSelect.value = resolvedApiCode;if (currencySymbolCustom) currencySymbolCustom.style.display = 'none';} else {currencySymbolSelect.value = 'other';@@ -1028,7 +1044,7 @@ async function loadPreferences() {}}} else {- console.log(`API currency_symbol (${apiPrefs.currency_symbol}) matches localStorage (${storedCurrency}). Skipping UI update.`);+ console.log(`API currency_symbol (${apiPrefs.currency_symbol}) matches localStorage (${storedCurrencySymbol}). Skipping UI update.`);}}// --- END MODIFIED CURRENCY SYMBOL HANDLING ---@@ -4155,7 +4171,17 @@ async function checkSchedulerStatus() {* @returns {Promise} A promise that resolves when timezones are loaded*/function loadTimezones() {- return loadTimezonesIntoSelect(timezoneSelect);+ const tasks = [];+ if (timezoneSelect) {+ tasks.push(loadTimezonesIntoSelect(timezoneSelect));+ }+ if (userAppriseTimezoneSelect) {+ tasks.push(loadTimezonesIntoSelect(userAppriseTimezoneSelect));+ }+ if (tasks.length === 0) {+ return Promise.resolve();+ }+ return Promise.allSettled(tasks);}function loadTimezonesIntoSelect(selectElement) {@@ -4195,21 +4221,34 @@ function loadTimezonesIntoSelect(selectElement) {selectElement.appendChild(optgroup);});++ const applyTimezoneValue = (tz) => {+ const hasOption = (val) => Array.from(selectElement.options).some(opt => opt.value === val);+ if (tz && hasOption(tz)) {+ selectElement.value = tz;+ } else if (hasOption('UTC')) {+ selectElement.value = 'UTC';+ }+ };// Set the current timezone from preferences// Get the appropriate key prefix based on user typeconst prefix = getPreferenceKeyPrefix();const savedPreferences = JSON.parse(localStorage.getItem(`${prefix}preferences`) || '{}');+ const isAppriseSelect = selectElement === userAppriseTimezoneSelect;+ const localTz = isAppriseSelect+ ? (savedPreferences.apprise_timezone || savedPreferences.timezone)+ : savedPreferences.timezone;console.log('Loading timezone preference from localStorage', {prefix: prefix,preferenceKey: `${prefix}preferences`,- savedTimezone: savedPreferences.timezone+ savedTimezone: localTz});- if (savedPreferences.timezone) {- selectElement.value = savedPreferences.timezone;- console.log(`Set ${selectElement.id} to:`, savedPreferences.timezone, 'Current value:', selectElement.value);+ if (localTz) {+ applyTimezoneValue(localTz);+ console.log(`Set ${selectElement.id} to:`, localTz, 'Current value:', selectElement.value);resolve();} else {// If no timezone preference found in localStorage, load from API as backup@@ -4224,15 +4263,19 @@ function loadTimezonesIntoSelect(selectElement) {.then(response => response.json()).then(data => {// API returns preferences directly, not nested- if (data && data.timezone) {- console.log('Received timezone from API:', data.timezone);- selectElement.value = data.timezone;- console.log(`Set ${selectElement.id} to:`, data.timezone, 'Current value:', selectElement.value);+ const apiTz = data ? (isAppriseSelect ? (data.apprise_timezone || data.timezone) : data.timezone) : null;+ if (apiTz) {+ console.log('Received timezone from API:', apiTz);+ applyTimezoneValue(apiTz);+ console.log(`Set ${selectElement.id} to:`, apiTz, 'Current value:', selectElement.value);+ } else {+ applyTimezoneValue('UTC');}resolve();}).catch(error => {console.error('Error loading preferences from API:', error);+ applyTimezoneValue('UTC');resolve(); // Still resolve to continue the chain});}@@ -4344,13 +4387,22 @@ window.addEventListener('storage', (event) => {}}- if (event.key === `${prefix}currencySymbol`) { // Simplified log for other keys- console.log(`[Settings Storage Listener] ${prefix}currencySymbol changed to ${event.newValue}`);- if (event.newValue && currencySymbolSelect && currencySymbolSelect.value !== event.newValue) {- // Handle standard vs custom symbol update- const standardOption = Array.from(currencySymbolSelect.options).find(opt => opt.value === event.newValue);- if (standardOption) {- currencySymbolSelect.value = event.newValue;+ if (event.key === `${prefix}currencySymbol` || event.key === `${prefix}currencyCode`) {+ console.log(`[Settings Storage Listener] ${event.key} changed to ${event.newValue}`);+ if (event.newValue && currencySymbolSelect) {+ const sharedDefaults = { '$': 'USD', '£': 'GBP', '¥': 'JPY', '₩': 'KRW', 'kr': 'SEK' };+ const options = Array.from(currencySymbolSelect.options);+ const raw = String(event.newValue).trim();+ const byCode = options.find(opt => opt.value !== 'other' && opt.value === raw);+ const sharedCode = sharedDefaults[raw];+ const bySymbol = globalCurrenciesData.find(c => c.symbol === raw);+ const resolvedCode = (byCode && byCode.value)+ || (sharedCode && options.some(opt => opt.value === sharedCode) ? sharedCode : null)+ || (bySymbol && options.some(opt => opt.value === bySymbol.code) ? bySymbol.code : null);+ if (resolvedCode) {+ if (currencySymbolSelect.value !== resolvedCode) {+ currencySymbolSelect.value = resolvedCode;+ }if (currencySymbolCustom) currencySymbolCustom.style.display = 'none';console.log('[Settings Storage Listener] Updated settings currency dropdown via storage event.');} else if (currencySymbolSelect.value !== 'other' || (currencySymbolCustom && currencySymbolCustom.value !== event.newValue)) {diff --git a/frontend/settings-styles.css b/frontend/settings-styles.cssindex a40b4fc..114bcaa 100644--- a/frontend/settings-styles.css+++ b/frontend/settings-styles.css@@ -993,8 +993,23 @@ input:checked + .toggle-slider:before {border: 1px solid transparent;border-radius: 6px;display: flex;- align-items: center;- gap: 10px;+ flex-wrap: wrap;+ align-items: flex-start;+ gap: 8px;+ line-height: 1.45;+}++.alert-info {+ color: #0c5460;+ background-color: #d1ecf1;+ border-color: #bee5eb;+}++:root[data-theme="dark"] .alert-info,+.dark-mode .alert-info {+ color: #9eeaf9;+ background-color: rgba(13, 202, 240, 0.12);+ border-color: rgba(13, 202, 240, 0.3);}.alert-warning {@@ -1009,6 +1024,26 @@ input:checked + .toggle-slider:before {border-color: rgba(255, 193, 7, 0.3);}+@media (max-width: 600px) {+ .preference-item:has(.form-control) {+ flex-direction: column;+ align-items: stretch;+ gap: 10px;+ }++ .preference-item:has(.form-control) .form-control {+ width: 100%;+ }++ .alert {+ display: block;+ }++ .alert i {+ margin-inline-end: 6px;+ }+}+.apprise-actions {display: grid;grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));diff --git a/frontend/status.js b/frontend/status.jsindex d950046..5fabaac 100644--- a/frontend/status.js+++ b/frontend/status.js@@ -491,6 +491,8 @@const activeLabel = i18next.t('warranties.active');const expiringSoonLabel = i18next.t('warranties.expiring_soon');const expiredLabel = i18next.t('warranties.expired');+ const isDark = document.documentElement.getAttribute('data-theme') === 'dark';+ const legendColor = isDark ? '#e0e0e0' : '#333333';statusChart = new Chart(ctx, {type: 'doughnut',@@ -498,7 +500,16 @@labels: [activeLabel, expiringSoonLabel, expiredLabel],datasets: [{ data: [trulyActive, expiringSoon, expired], backgroundColor: ['#4CAF50', '#FF9800', '#F44336'], borderWidth: 1 }]},- options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom' } } }+ options: {+ responsive: true,+ maintainAspectRatio: false,+ plugins: {+ legend: {+ position: 'bottom',+ labels: { color: legendColor }+ }+ }+ }});console.log('Created new status chart');} catch (e) {@@ -564,6 +575,9 @@try {// Get translated label for timeline chartconst timelineLabel = i18next.t('status.expiration_timeline');+ const isDark = document.documentElement.getAttribute('data-theme') === 'dark';+ const textColor = isDark ? '#e0e0e0' : '#333333';+ const gridColor = isDark ? 'rgba(255, 255, 255, 0.12)' : 'rgba(0, 0, 0, 0.1)';timelineChart = new Chart(ctx, {type: 'bar',@@ -571,7 +585,26 @@labels: labels,datasets: [{ label: timelineLabel, data: counts, backgroundColor: '#3498db', borderWidth: 1 }]},- options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, ticks: { precision: 0 } } } }+ options: {+ responsive: true,+ maintainAspectRatio: false,+ plugins: {+ legend: {+ labels: { color: textColor }+ }+ },+ scales: {+ x: {+ ticks: { color: textColor },+ grid: { color: gridColor }+ },+ y: {+ beginAtZero: true,+ ticks: { precision: 0, color: textColor },+ grid: { color: gridColor }+ }+ }+ }});console.log('Created new timeline chart');} catch (e) {@@ -1162,7 +1195,7 @@// Map: { 'YYYY-MM': count }const timelineMap = {};warranties.forEach(w => {- if (w.is_lifetime) return; // Skip lifetime warranties+ if (w.is_lifetime || w.is_archived || w.is_voided) return; // Skip lifetime, archived, and voided warrantiesif (!w.expiration_date) return;let expDate = w.expiration_date;if (typeof expDate === 'string') {diff --git a/frontend/style.css b/frontend/style.cssindex 4ac2d99..c187fbb 100644--- a/frontend/style.css+++ b/frontend/style.css@@ -347,6 +347,7 @@ header .container {.form-tab.completed {color: var(--secondary-color);+ padding-inline-end: 20px;}.form-tab.completed::after {@@ -354,9 +355,9 @@ header .container {font-family: 'Font Awesome 5 Free';font-weight: 900;position: absolute;- top: 10px;- right: 10px;- font-size: 0.8rem;+ top: 4px;+ inset-inline-end: 6px;+ font-size: 0.7rem;}.form-tab i {@@ -1032,6 +1033,17 @@ input.invalid {color: #7d3c98;}+:root[data-theme="dark"] .status-void,+:root[data-theme="dark"] .status-badge.status-void {+ background-color: rgba(187, 134, 252, 0.22);+ color: #e2c6ff;+}++:root[data-theme="dark"] tr.status-void {+ background-color: rgba(187, 134, 252, 0.08);+ color: var(--text-color);+}+/* Voided warranty cards (issue #250): purple accent, distinct fromactive (green), expiring (amber), expired (red), and archived (grey) */.warranty-card.voided {@@ -1044,6 +1056,10 @@ input.invalid {background-color: rgba(142, 68, 173, 0.05);}+:root[data-theme="dark"] .table-view .warranty-card.voided {+ background-color: rgba(187, 134, 252, 0.1);+}+/* Ensure all status badges share the same shape/spacing */.status-active,.status-expired,@@ -1176,6 +1192,19 @@ input.invalid {margin-bottom: 15px;}+@media (max-width: 480px) {+ .serial-number-input {+ flex-direction: column;+ align-items: stretch;+ gap: 8px;+ }++ .serial-number-input .form-control,+ .serial-number-input .btn {+ width: 100%;+ }+}+/* End serial number input styling */.modal-header {@@ -1498,6 +1527,7 @@ input.invalid {/* ===== EMPTY STATE ===== */.empty-state {+ grid-column: 1 / -1;text-align: center;padding: 40px 20px;color: var(--dark-gray);@@ -1863,10 +1893,15 @@ input:checked + .toggle-slider:before {.status-card[data-status="total_value"] .count {font-size: 1.4rem;- /* Large totals must stay inside the card: allow the value to- wrap (amount and symbol are separate spans) instead of- overflowing on one nowrap line (#294). */- overflow-wrap: anywhere;+ /* Large totals must stay inside the card: allow wrapping at token boundaries+ instead of overflowing on one nowrap line (#294) without splitting mid-number. */+ overflow-wrap: break-word;+}++@media (min-width: 821px) {+ .status-card[data-status="total_value"] {+ grid-column: span 2;+ }}.info-popover {@@ -2255,6 +2290,40 @@ tr.status-expiring {align-items: center;}+@media (max-width: 768px) {+ .table-header {+ flex-direction: column;+ align-items: stretch;+ gap: 12px;+ }++ .table-actions {+ flex-wrap: wrap;+ width: 100%;+ gap: 10px;+ }++ .table-actions .search-box {+ flex: 1 1 100%;+ min-width: 100%;+ width: 100%;+ }++ .table-actions .search-box input {+ width: 100%;+ min-width: 0;+ }++ .table-actions .filter-options {+ flex: 1 1 auto;+ min-width: 0;+ }++ .table-actions .export-btn {+ flex: 0 0 auto;+ }+}+.filter-options {min-width: 150px;}@@ -3385,13 +3454,15 @@ input.invalid {/* Specific styling for links in table view */.table-view .document-links-row a {- white-space: nowrap !important;- overflow: hidden !important; /* Restore overflow hidden */- text-overflow: ellipsis !important; /* Restore text overflow */- max-width: 90% !important; /* Slightly narrower to ensure centering works */- font-size: 0.9rem !important; /* Slightly smaller font size */- padding: 4px 8px !important; /* Smaller padding */- text-align: left !important; /* Keep text left-aligned within the link */+ white-space: normal !important;+ word-break: break-word !important;+ overflow: visible !important;+ text-overflow: clip !important;+ max-width: 100% !important;+ font-size: 0.85rem !important;+ padding: 4px 8px !important;+ text-align: center !important;+ line-height: 1.25 !important;width: auto; /* Allow natural width */}@@ -3587,8 +3658,10 @@ input.invalid {.table-view .product-name-header {display: flex;+ flex-wrap: wrap;+ gap: 6px;width: 100%;- padding: 15px;+ padding: 12px 15px;background-color: var(--secondary-color);color: white;border-bottom: 1px solid var(--border-color);@@ -3601,10 +3674,26 @@ input.invalid {.table-view .warranty-card.expiring-soon .product-name-header {background-color: var(--warning-color);}++ .table-view .warranty-card.voided .product-name-header {+ background-color: #8e44ad;+ }.table-view .product-name-header .warranty-title {color: white;- font-size: 1.1rem;+ font-size: 1.05rem;+ flex: 1 1 100%;+ max-width: 100%;+ white-space: normal;+ overflow: visible;+ text-overflow: clip;+ line-height: 1.3;+ }++ .table-view .product-name-header .warranty-actions {+ width: 100%;+ justify-content: flex-end;+ flex-wrap: wrap;}.table-view .warranty-content,@@ -3770,7 +3859,10 @@ input.invalid {}.archived-view .warranty-card .warranty-actions .action-btn,-.warranty-card.archived .warranty-actions .action-btn {+.warranty-card.archived .warranty-actions .action-btn,+.archived-view .warranty-card .product-name-header .action-btn i,+.warranty-card.archived .product-name-header .action-btn i,+.table-view .warranty-card.archived .product-name-header .action-btn i {color: var(--text-color) !important;}@@ -4151,10 +4243,30 @@ input.invalid {}@media (max-width: 480px) {- /* Tabs stay swipeable on phones; fade the right edge to hint there's more */.edit-tabs-nav {- -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent 100%);- mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent 100%);+ display: grid;+ grid-template-columns: repeat(4, minmax(0, 1fr));+ overflow-x: visible;+ -webkit-mask-image: none;+ mask-image: none;+ }++ .edit-tab-btn {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 4px;+ padding: 8px 4px;+ font-size: 0.75rem;+ white-space: normal;+ text-align: center;+ line-height: 1.15;+ }++ .edit-tab-btn i {+ margin-right: 0;+ font-size: 0.95rem;}}@@ -4850,13 +4962,14 @@ input.invalid {}#tagManagementModal .tag-form {- flex-direction: column !important;gap: 10px !important;}#tagManagementModal .tag-form input[type="color"] {- width: 100% !important;- height: 40px !important;+ width: 44px !important;+ min-width: 44px !important;+ height: 38px !important;+ padding: 2px !important;}}@@ -5035,6 +5148,17 @@ html.dark-mode .warracker-footer a:hover {left: 8px;}+/* Prevent top info rows from colliding with the product photo thumbnail in Grid View */+.grid-view .warranty-content:has(.product-photo-thumbnail) .warranty-info > div:nth-child(-n+3) {+ padding-inline-end: 94px;+ flex-wrap: wrap;+}++.grid-view .warranty-content:has(.product-photo-thumbnail) .warranty-info > div:nth-child(-n+3) strong {+ white-space: nowrap;+ flex-shrink: 0;+}+.product-photo-thumbnail img {border: 2px solid var(--border-color);border-radius: 8px;@@ -5891,7 +6015,7 @@ html.dark-mode .warracker-footer a:hover {.login-showcase {flex-basis: 50%;- background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--primary-rgb), 0.7)), url('https://images.unsplash.com/photo-1586920740199-47ce3734a7a2?q=80&w=2070&auto=format&fit=crop') no-repeat center center;+ background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--primary-rgb), 0.7));background-size: cover;color: white;display: flex;@@ -6226,7 +6350,7 @@ html.dark-mode .warracker-footer a:hover {}[data-theme="dark"] .login-page-body .login-showcase {- background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.8), #1a1a1a 85%), url('https://images.unsplash.com/photo-1586920740199-47ce3734a7a2?q=80&w=2070&auto=format&fit=crop') no-repeat center center;+ background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.8), #1a1a1a 85%);background-size: cover;}diff --git a/locales/ar/translation.json b/locales/ar/translation.jsonindex 4c46f6c..338ec05 100644--- a/locales/ar/translation.json+++ b/locales/ar/translation.json@@ -344,7 +344,7 @@"save_oidc_settings": "حفظ إعدادات OIDC","oidc_sso_desc": "السماح للمستخدمين بتسجيل الدخول عبر موفر OIDC.","oidc_only_mode": "وضع تسجيل الدخول OIDC فقط",- "oidc_only_mode_desc": "إخفاء نموذج تسجيل الدخول التقليدي باسم المستخدم/كلمة المرور والسماح فقط بتسجيل الدخول عبر OIDC. <strong>تحذير:</strong> تأكد من تكوين OIDC بشكل صحيح قبل تمكين هذا الخيار.",+ "oidc_only_mode_desc": "إخفاء نموذج تسجيل الدخول التقليدي باسم المستخدم/كلمة المرور والسماح فقط بتسجيل الدخول عبر OIDC. تحذير: تأكد من تكوين OIDC بشكل صحيح قبل تمكين هذا الخيار.","oidc_provider_name_desc": "الاسم الداخلي لعميل OIDC (على سبيل المثال، 'oidc').","client_secret_desc": "قيمة حساسة. مخزنة في قاعدة البيانات. يلزم إعادة تشغيل التطبيق حتى تدخل التغييرات حيز التنفيذ.","issuer_url_desc": "عنوان URL الأساسي لموفر OIDC الخاص بك.",diff --git a/locales/cs/translation.json b/locales/cs/translation.jsonindex 6751438..19b0920 100644--- a/locales/cs/translation.json+++ b/locales/cs/translation.json@@ -341,7 +341,7 @@"save_oidc_settings": "Uložit nastavení OIDC","oidc_sso_desc": "Povolit uživatelům přihlášení přes poskytovatele OIDC.","oidc_only_mode": "Režim přihlášení pouze přes OIDC",- "oidc_only_mode_desc": "Skrýt tradiční formulář pro přihlášení pomocí uživatelského jména/hesla a povolit pouze přihlášení přes OIDC. <strong>Varování:</strong> Před povolením této možnosti se ujistěte, že je OIDC správně nakonfigurován.",+ "oidc_only_mode_desc": "Skrýt tradiční formulář pro přihlášení pomocí uživatelského jména/hesla a povolit pouze přihlášení přes OIDC. Varování: Před povolením této možnosti se ujistěte, že je OIDC správně nakonfigurován.","oidc_provider_name_desc": "Interní název pro klienta OIDC (např. 'oidc').","client_secret_desc": "Citlivá hodnota. Uloženo v databázi. Pro projevení změn je nutný restart aplikace.","issuer_url_desc": "Základní URL vašeho poskytovatele OIDC.",diff --git a/locales/de/translation.json b/locales/de/translation.jsonindex a4af651..c7c47b9 100644--- a/locales/de/translation.json+++ b/locales/de/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "OIDC-Einstellungen speichern","oidc_sso_desc": "Benutzern die Anmeldung über einen OIDC-Anbieter ermöglichen.","oidc_only_mode": "Nur-OIDC-Anmeldemodus",- "oidc_only_mode_desc": "Traditionelles Anmeldeformular für Benutzername/Passwort ausblenden und nur OIDC-Anmeldung zulassen. <strong>Warnung:</strong> Stellen Sie sicher, dass OIDC ordnungsgemäß konfiguriert ist, bevor Sie diese Option aktivieren.",+ "oidc_only_mode_desc": "Traditionelles Anmeldeformular für Benutzername/Passwort ausblenden und nur OIDC-Anmeldung zulassen. Warnung: Stellen Sie sicher, dass OIDC ordnungsgemäß konfiguriert ist, bevor Sie diese Option aktivieren.","oidc_provider_name_desc": "Interner Name für den OIDC-Client (z. B. 'oidc').","client_secret_desc": "Sensibler Wert. In der Datenbank gespeichert. Ein Neustart der Anwendung ist erforderlich, damit die Änderungen wirksam werden.","issuer_url_desc": "Die Basis-URL Ihres OIDC-Anbieters.",diff --git a/locales/en/translation.json b/locales/en/translation.jsonindex e7ca121..033f134 100644--- a/locales/en/translation.json+++ b/locales/en/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "Save OIDC Settings","oidc_sso_desc": "Allow users to log in via an OIDC provider.","oidc_only_mode": "OIDC-Only Login Mode",- "oidc_only_mode_desc": "Hide traditional username/password login form and only allow OIDC login. <strong>Warning:</strong> Ensure OIDC is properly configured before enabling this option.",+ "oidc_only_mode_desc": "Hide traditional username/password login form and only allow OIDC login. Warning: Ensure OIDC is properly configured before enabling this option.","oidc_provider_name_desc": "Internal name for the OIDC client (e.g., 'oidc').","client_secret_desc": "Sensitive value. Stored in the database. An application restart is required for changes to take effect.","issuer_url_desc": "The base URL of your OIDC provider.",diff --git a/locales/es/translation.json b/locales/es/translation.jsonindex 67667f1..10edfa8 100644--- a/locales/es/translation.json+++ b/locales/es/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "Guardar Configuración OIDC","oidc_sso_desc": "Permitir a los usuarios iniciar sesión a través de un proveedor OIDC.","oidc_only_mode": "Modo de inicio de sesión solo OIDC",- "oidc_only_mode_desc": "Ocultar el formulario de inicio de sesión tradicional de nombre de usuario/contraseña y permitir solo el inicio de sesión OIDC. <strong>Advertencia:</strong> Asegúrese de que OIDC esté configurado correctamente antes de habilitar esta opción.",+ "oidc_only_mode_desc": "Ocultar el formulario de inicio de sesión tradicional de nombre de usuario/contraseña y permitir solo el inicio de sesión OIDC. Advertencia: Asegúrese de que OIDC esté configurado correctamente antes de habilitar esta opción.","oidc_provider_name_desc": "Nombre interno para el cliente OIDC (por ejemplo, 'oidc').","client_secret_desc": "Valor sensible. Almacenado en la base de datos. Se requiere un reinicio de la aplicación para que los cambios surtan efecto.","issuer_url_desc": "La URL base de su proveedor OIDC.",diff --git a/locales/fa/translation.json b/locales/fa/translation.jsonindex 05fa86c..60ff3a9 100644--- a/locales/fa/translation.json+++ b/locales/fa/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "ذخیره تنظیمات OIDC","oidc_sso_desc": "به کاربران اجازه دهید از طریق ارائهدهنده OIDC وارد شوند.","oidc_only_mode": "حالت ورود فقط با OIDC",- "oidc_only_mode_desc": "فرم ورود سنتی با نام کاربری/رمز عبور را پنهان کنید و فقط اجازه ورود با OIDC را بدهید. <strong>هشدار:</strong> قبل از فعال کردن این گزینه، از پیکربندی صحیح OIDC اطمینان حاصل کنید.",+ "oidc_only_mode_desc": "فرم ورود سنتی با نام کاربری/رمز عبور را پنهان کنید و فقط اجازه ورود با OIDC را بدهید. هشدار: قبل از فعال کردن این گزینه، از پیکربندی صحیح OIDC اطمینان حاصل کنید.","oidc_provider_name_desc": "نام داخلی برای مشتری OIDC (مثلاً 'oidc').","client_secret_desc": "مقدار حساس. در پایگاه داده ذخیره شده است. برای اعمال تغییرات، راهاندازی مجدد برنامه لازم است.","issuer_url_desc": "URL پایه ارائهدهنده OIDC شما.",diff --git a/locales/fr/translation.json b/locales/fr/translation.jsonindex 44509cb..4232350 100644--- a/locales/fr/translation.json+++ b/locales/fr/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "Enregistrer les Paramètres OIDC","oidc_sso_desc": "Permettre aux utilisateurs de se connecter via un fournisseur OIDC.","oidc_only_mode": "Mode de connexion OIDC uniquement",- "oidc_only_mode_desc": "Masquer le formulaire de connexion traditionnel nom d'utilisateur/mot de passe et n'autoriser que la connexion OIDC. <strong>Avertissement :</strong> Assurez-vous que l'OIDC est correctement configuré avant d'activer cette option.",+ "oidc_only_mode_desc": "Masquer le formulaire de connexion traditionnel nom d'utilisateur/mot de passe et n'autoriser que la connexion OIDC. Avertissement : Assurez-vous que l'OIDC est correctement configuré avant d'activer cette option.","oidc_provider_name_desc": "Nom interne du client OIDC (par exemple, 'oidc').","client_secret_desc": "Valeur sensible. Stockée dans la base de données. Un redémarrage de l'application est nécessaire pour que les modifications prennent effet.","issuer_url_desc": "L'URL de base de votre fournisseur OIDC.",diff --git a/locales/hi/translation.json b/locales/hi/translation.jsonindex e585478..4e6efc5 100644--- a/locales/hi/translation.json+++ b/locales/hi/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "ओआईडीसी सेटिंग्स सहेजें","oidc_sso_desc": "उपयोगकर्ताओं को एक OIDC प्रदाता के माध्यम से लॉगिन करने की अनुमति दें।","oidc_only_mode": "केवल-OIDC लॉगिन मोड",- "oidc_only_mode_desc": "पारंपरिक उपयोगकर्ता नाम/पासवर्ड लॉगिन फ़ॉर्म छिपाएं और केवल OIDC लॉगिन की अनुमति दें। <strong>चेतावनी:</strong> इस विकल्प को सक्षम करने से पहले सुनिश्चित करें कि OIDC ठीक से कॉन्फ़िगर किया गया है।",+ "oidc_only_mode_desc": "पारंपरिक उपयोगकर्ता नाम/पासवर्ड लॉगिन फ़ॉर्म छिपाएं और केवल OIDC लॉगिन की अनुमति दें। चेतावनी: इस विकल्प को सक्षम करने से पहले सुनिश्चित करें कि OIDC ठीक से कॉन्फ़िगर किया गया है।","oidc_provider_name_desc": "OIDC क्लाइंट के लिए आंतरिक नाम (जैसे, 'oidc')।","client_secret_desc": "संवेदनशील मान। डेटाबेस में संग्रहीत। परिवर्तनों को प्रभावी होने के लिए एप्लिकेशन को पुनरारंभ करना आवश्यक है।","issuer_url_desc": "आपके OIDC प्रदाता का आधार URL।",diff --git a/locales/it/translation.json b/locales/it/translation.jsonindex 29b02c1..ac0d718 100644--- a/locales/it/translation.json+++ b/locales/it/translation.json@@ -284,7 +284,7 @@"oidc_admin_desc": "Gruppo a cui vengono concessi privilegi di amministratore. Lascia vuoto per disabilitare.","oidc_admin_group": "Gruppo di amministrazione OIDC","oidc_only_mode": "Modalità di accesso solo OIDC",- "oidc_only_mode_desc": "Nascondi il tradizionale modulo di accesso con nome utente/password e consenti solo l'accesso OIDC. <strong>Avviso:</strong> assicurati che OIDC sia configurato correttamente prima di abilitare questa opzione.",+ "oidc_only_mode_desc": "Nascondi il tradizionale modulo di accesso con nome utente/password e consenti solo l'accesso OIDC. Avviso: assicurati che OIDC sia configurato correttamente prima di abilitare questa opzione.","oidc_provider_name_desc": "Nome interno per il client OIDC (ad esempio \"oidc\").","oidc_restart_message": "Affinché le impostazioni OIDC abbiano pieno effetto, è necessario riavviare l'applicazione.","oidc_sso_desc": "Consenti agli utenti di accedere tramite un provider OIDC.",diff --git a/locales/ja/translation.json b/locales/ja/translation.jsonindex a78bbd3..7e6bb32 100644--- a/locales/ja/translation.json+++ b/locales/ja/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "OIDC設定を保存","oidc_sso_desc": "ユーザーがOIDCプロバイダー経由でログインできるようにする。","oidc_only_mode": "OIDCのみのログインモード",- "oidc_only_mode_desc": "従来のユーザー名/パスワードログインフォームを非表示にし、OIDCログインのみを許可します。<strong>警告:</strong>このオプションを有効にする前に、OIDCが正しく設定されていることを確認してください。",+ "oidc_only_mode_desc": "従来のユーザー名/パスワードログインフォームを非表示にし、OIDCログインのみを許可します。警告:このオプションを有効にする前に、OIDCが正しく設定されていることを確認してください。","oidc_provider_name_desc": "OIDCクライアントの内部名(例:「oidc」)。","client_secret_desc": "機密情報。データベースに保存されます。変更を有効にするにはアプリケーションの再起動が必要です。","issuer_url_desc": "OIDCプロバイダーのベースURL。",diff --git a/locales/ko/translation.json b/locales/ko/translation.jsonindex 5981378..4977825 100644--- a/locales/ko/translation.json+++ b/locales/ko/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "OIDC 설정 저장","oidc_sso_desc": "사용자가 OIDC 공급자를 통해 로그인하도록 허용합니다.","oidc_only_mode": "OIDC 전용 로그인 모드",- "oidc_only_mode_desc": "기존 사용자 이름/비밀번호 로그인 양식을 숨기고 OIDC 로그인만 허용합니다. <strong>경고:</strong> 이 옵션을 활성화하기 전에 OIDC가 올바르게 구성되었는지 확인하십시오.",+ "oidc_only_mode_desc": "기존 사용자 이름/비밀번호 로그인 양식을 숨기고 OIDC 로그인만 허용합니다. 경고: 이 옵션을 활성화하기 전에 OIDC가 올바르게 구성되었는지 확인하십시오.","oidc_provider_name_desc": "OIDC 클라이언트의 내부 이름 (예: 'oidc').","client_secret_desc": "민감한 값. 데이터베이스에 저장됩니다. 변경 사항을 적용하려면 애플리케이션을 다시 시작해야 합니다.","issuer_url_desc": "OIDC 공급자의 기본 URL.",diff --git a/locales/nl/translation.json b/locales/nl/translation.jsonindex b7e1af4..1a8308a 100644--- a/locales/nl/translation.json+++ b/locales/nl/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "OIDC-instellingen opslaan","oidc_sso_desc": "Gebruikers toestaan in te loggen via een OIDC-provider.","oidc_only_mode": "Alleen-OIDC-inlogmodus",- "oidc_only_mode_desc": "Verberg het traditionele gebruikersnaam/wachtwoord-inlogformulier en sta alleen OIDC-inloggen toe. <strong>Waarschuwing:</strong> Zorg ervoor dat OIDC correct is geconfigureerd voordat u deze optie inschakelt.",+ "oidc_only_mode_desc": "Verberg het traditionele gebruikersnaam/wachtwoord-inlogformulier en sta alleen OIDC-inloggen toe. Waarschuwing: Zorg ervoor dat OIDC correct is geconfigureerd voordat u deze optie inschakelt.","oidc_provider_name_desc": "Interne naam voor de OIDC-client (bijv. 'oidc').","client_secret_desc": "Gevoelige waarde. Opgeslagen in de database. Een herstart van de applicatie is vereist om wijzigingen door te voeren.","issuer_url_desc": "De basis-URL van uw OIDC-provider.",diff --git a/locales/pl/translation.json b/locales/pl/translation.jsonindex 8c27457..ad8891d 100644--- a/locales/pl/translation.json+++ b/locales/pl/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "Zapisz ustawienia OIDC","oidc_sso_desc": "Pozwól użytkownikom logować się przez dostawcę OIDC.","oidc_only_mode": "Tryb logowania tylko OIDC",- "oidc_only_mode_desc": "Ukryj tradycyjny formularz login/hasło i pozwól tylko na logowanie OIDC. <strong>Uwaga:</strong> Upewnij się, że OIDC jest poprawnie skonfigurowane przed włączeniem tej opcji.",+ "oidc_only_mode_desc": "Ukryj tradycyjny formularz login/hasło i pozwól tylko na logowanie OIDC. Uwaga: Upewnij się, że OIDC jest poprawnie skonfigurowane przed włączeniem tej opcji.","oidc_provider_name_desc": "Wewnętrzna nazwa klienta OIDC (np. 'oidc').","client_secret_desc": "Wartość wrażliwa. Przechowywana w bazie danych. Wymagany restart aplikacji, aby zmiany zaczęły działać.","issuer_url_desc": "Podstawowy URL Twojego dostawcy OIDC.",diff --git a/locales/pt/translation.json b/locales/pt/translation.jsonindex a877fee..39c50a3 100644--- a/locales/pt/translation.json+++ b/locales/pt/translation.json@@ -389,7 +389,7 @@"save_oidc_settings": "Salvar Configurações OIDC","oidc_sso_desc": "Permitir que os usuários façam login através de um provedor OIDC.","oidc_only_mode": "Modo de Login Apenas OIDC",- "oidc_only_mode_desc": "Ocultar o formulário de login tradicional de nome de usuário/senha e permitir apenas o login OIDC. <strong>Aviso:</strong> Certifique-se de que o OIDC esteja configurado corretamente antes de habilitar esta opção.",+ "oidc_only_mode_desc": "Ocultar o formulário de login tradicional de nome de usuário/senha e permitir apenas o login OIDC. Aviso: Certifique-se de que o OIDC esteja configurado corretamente antes de habilitar esta opção.","oidc_provider_name_desc": "Nome interno para o cliente OIDC (ex: 'oidc').","client_secret_desc": "Valor sensível. Armazenado no banco de dados. É necessário reiniciar a aplicação para que as alterações entrem em vigor.","issuer_url_desc": "A URL base do seu provedor OIDC.",diff --git a/locales/ru/translation.json b/locales/ru/translation.jsonindex b39219b..12a5b3f 100644--- a/locales/ru/translation.json+++ b/locales/ru/translation.json@@ -395,7 +395,7 @@"save_oidc_settings": "Сохранить настройки OIDC","oidc_sso_desc": "Разрешить пользователям входить через провайдера OIDC.","oidc_only_mode": "Режим входа только через OIDC",- "oidc_only_mode_desc": "Скрыть традиционную форму входа с именем пользователя/паролем и разрешить вход только через OIDC. <strong>Внимание:</strong> Убедитесь, что OIDC правильно настроен, прежде чем включать эту опцию.",+ "oidc_only_mode_desc": "Скрыть традиционную форму входа с именем пользователя/паролем и разрешить вход только через OIDC. Внимание: Убедитесь, что OIDC правильно настроен, прежде чем включать эту опцию.","oidc_provider_name_desc": "Внутреннее имя для клиента OIDC (например, 'oidc').","client_secret_desc": "Конфиденциальное значение. Хранится в базе данных. Для вступления изменений в силу требуется перезапуск приложения.","issuer_url_desc": "Базовый URL вашего провайдера OIDC.",diff --git a/locales/tr/translation.json b/locales/tr/translation.jsonindex 2a8ebc6..3df575e 100644--- a/locales/tr/translation.json+++ b/locales/tr/translation.json@@ -302,7 +302,7 @@"save_oidc_settings": "OIDC Ayarlarını Kaydet","oidc_sso_desc": "Kullanıcıların bir OIDC sağlayıcısı aracılığıyla oturum açmasına izin ver.","oidc_only_mode": "Yalnızca OIDC Oturum Açma Modu",- "oidc_only_mode_desc": "Geleneksel kullanıcı adı/şifre giriş formunu gizleyin ve yalnızca OIDC girişine izin verin. <strong>Uyarı:</strong> Bu seçeneği etkinleştirmeden önce OIDC'nin düzgün yapılandırıldığından emin olun.",+ "oidc_only_mode_desc": "Geleneksel kullanıcı adı/şifre giriş formunu gizleyin ve yalnızca OIDC girişine izin verin. Uyarı: Bu seçeneği etkinleştirmeden önce OIDC'nin düzgün yapılandırıldığından emin olun.","oidc_provider_name_desc": "OIDC istemcisi için dahili ad (ör. 'oidc').","client_secret_desc": "Hassas değer. Veritabanında saklanır. Değişikliklerin etkili olması için bir uygulama yeniden başlatması gerekir.","issuer_url_desc": "OIDC sağlayıcınızın temel URL'si.",diff --git a/locales/uk/translation.json b/locales/uk/translation.jsonindex 8721a71..64b8620 100644--- a/locales/uk/translation.json+++ b/locales/uk/translation.json@@ -340,7 +340,7 @@"save_oidc_settings": "Зберегти налаштування OIDC","oidc_sso_desc": "Дозволити користувачам входити через провайдера OIDC.","oidc_only_mode": "Режим входу тільки через OIDC",- "oidc_only_mode_desc": "Приховати традиційну форму входу з ім'ям користувача/паролем і дозволити вхід тільки через OIDC. <strong>Увага:</strong> Переконайтеся, що OIDC правильно налаштований, перш ніж вмикати цю опцію.",+ "oidc_only_mode_desc": "Приховати традиційну форму входу з ім'ям користувача/паролем і дозволити вхід тільки через OIDC. Увага: Переконайтеся, що OIDC правильно налаштований, перш ніж вмикати цю опцію.","oidc_provider_name_desc": "Внутрішня назва для клієнта OIDC (наприклад, 'oidc').","client_secret_desc": "Конфіденційне значення. Зберігається в базі даних. Для набуття чинності змін потрібен перезапуск програми.","issuer_url_desc": "Базовий URL вашого провайдера OIDC.",diff --git a/locales/zh_CN/translation.json b/locales/zh_CN/translation.jsonindex 2eb36b2..51e8f0c 100644--- a/locales/zh_CN/translation.json+++ b/locales/zh_CN/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "保存 OIDC 设置","oidc_sso_desc": "允许用户通过 OIDC 提供商登录。","oidc_only_mode": "仅允许 OIDC 登录",- "oidc_only_mode_desc": "隐藏传统的用户名/密码登录表单,只允许通过 OIDC 登录。<strong>警告:</strong>启用前请确保 OIDC 已正确配置。",+ "oidc_only_mode_desc": "隐藏传统的用户名/密码登录表单,只允许通过 OIDC 登录。警告:启用前请确保 OIDC 已正确配置。","oidc_provider_name_desc": "OIDC 客户端的内部名称(例如 'oidc')。","client_secret_desc": "敏感值,会存储在数据库中。更改后需要重启应用才会生效。","issuer_url_desc": "OIDC 提供商的基础 URL。",diff --git a/locales/zh_HK/translation.json b/locales/zh_HK/translation.jsonindex d605ab3..5375e9c 100644--- a/locales/zh_HK/translation.json+++ b/locales/zh_HK/translation.json@@ -334,7 +334,7 @@"save_oidc_settings": "儲存OIDC設定","oidc_sso_desc": "允許使用者透過OIDC提供者登入。","oidc_only_mode": "僅OIDC登入模式",- "oidc_only_mode_desc": "隱藏傳統的使用者名稱/密碼登入表單,僅允許OIDC登入。<strong>警告:</strong>在啟用此選項之前,請確保OIDC已正確設定。",+ "oidc_only_mode_desc": "隱藏傳統的使用者名稱/密碼登入表單,僅允許OIDC登入。警告:在啟用此選項之前,請確保OIDC已正確設定。","oidc_provider_name_desc": "OIDC用戶端的內部名稱(例如'oidc')。","client_secret_desc": "敏感值。儲存在資料庫中。變更生效需要重新啟動應用程式。","issuer_url_desc": "您的OIDC提供者的基礎URL。",diff --git a/tests/test_qa_fixes_regressions.py b/tests/test_qa_fixes_regressions.pynew file mode 100644index 0000000..a934d36--- /dev/null+++ b/tests/test_qa_fixes_regressions.py@@ -0,0 +1,286 @@+"""Regression tests for desktop, tablet, and mobile QA walkthrough fixes.++Pins behavioral and structural guarantees across Workstreams 1-3:+- editModal.js populates invoice_url, manual_url, and other_document_url on open+- notes.js serializes vendor and model_number directly from warranty (never hidden edit DOM)+- tagManager.js and script.js share DOM guards to prevent duplicate tag requests+- reset-password.html hoists submitBtn/originalBtnText above try/catch+- importExport.js filterWarrantiesForExport matches list filters (archived + model/serial/notes)+- /api/timezones includes UTC so the default timezone is selectable+- settings-new.js resolves currency symbols (e.g. '$') to option codes ('USD') and loads both timezone selects+- locales/*/translation.json omit literal <strong> tags from settings.oidc_only_mode_desc+- status.js skips archived and voided warranties in extractTimelineData and uses dark-mode chart colors+- warrantyRenderer.js emits standard status modifier classes in Table View+- paperless.js exports isPaperlessEnabled() and claims.js gates .claim-doc-storage on it+- mobile-header.css does not force display: block !important on #scopeDropdown and aligns mobile popovers+- style.css cleans up dead Unsplash 404 URLs, fixes Tag color picker, mobile Status search, and dark Void contrast+- mobile-menu.js hides empty hamburger drawers; auth pages remove unused hamburger toggles+- settings-new.html omits leftover developer Emergency Delete fallback buttons+"""+import json+import re+import shutil+import subprocess+from pathlib import Path++import pytest++REPO = Path(__file__).resolve().parent.parent+FRONTEND = REPO / "frontend"+LOCALES = REPO / "locales"+++def test_edit_modal_populates_and_trims_document_urls():+ src = (FRONTEND / "js" / "components" / "editModal.js").read_text(encoding="utf-8")+ pop_start = src.index("function populateDocuments(warranty)")+ pop_end = src.index("export async function saveWarranty()")+ pop_body = src[pop_start:pop_end]++ assert "document.getElementById('editInvoiceUrl')" in pop_body+ assert "warranty.invoice_url || ''" in pop_body+ assert "document.getElementById('editManualUrl')" in pop_body+ assert "warranty.manual_url || ''" in pop_body+ assert "document.getElementById('editOtherDocumentUrl')" in pop_body+ assert "warranty.other_document_url || ''" in pop_body++ save_body = src[pop_end:]+ assert "document.getElementById('editInvoiceUrl') || {}).value || '').trim()" in save_body+ assert "document.getElementById('editManualUrl') || {}).value || '').trim()" in save_body+ assert "document.getElementById('editOtherDocumentUrl') || {}).value || '').trim()" in save_body+++def test_notes_build_form_data_does_not_read_hidden_edit_modal_inputs():+ src = (FRONTEND / "js" / "components" / "notes.js").read_text(encoding="utf-8")+ start = src.index("function buildFormData(warranty, noteValue)")+ end = src.index("async function refreshWarranties()")+ body = src[start:end]++ assert "editModelNumber" not in body+ assert "editVendorOrRetailer" not in body+ assert "formData.append('vendor', warranty.vendor)" in body+ assert "formData.append('model_number', warranty.model_number)" in body+++def test_tag_manager_and_legacy_script_share_dom_guards():+ tm = (FRONTEND / "js" / "components" / "tagManager.js").read_text(encoding="utf-8")+ legacy = (FRONTEND / "script.js").read_text(encoding="utf-8")++ # Shared DOM guards on #existingTags and #newTagForm+ assert "container.dataset.tmListenersAttached === 'true'" in tm+ assert "container.dataset.tmListenersAttached = 'true'" in tm+ assert "form.dataset.tagFormBound !== 'true'" in tm+ assert "form.dataset.tagFormBound = 'true'" in tm++ assert "globalNewTagForm.dataset.tagFormBound !== 'true'" in legacy+ assert "globalNewTagForm.dataset.tagFormBound = 'true'" in legacy+ assert "window.components && window.components.tagManager" in legacy+++def test_reset_password_declares_submit_btn_outside_try():+ html = (FRONTEND / "reset-password.html").read_text(encoding="utf-8")+ btn_decl = html.index("const submitBtn = passwordResetForm.querySelector('button[type=\"submit\"]');")+ orig_decl = html.index("const originalBtnText = submitBtn ? submitBtn.innerHTML : '';")+ try_pos = html.index("try {", btn_decl - 200)++ assert btn_decl < try_pos+ assert orig_decl < try_pos+++def test_import_export_filter_matches_list_controller_behavior():+ node = shutil.which("node")+ if node is None:+ pytest.skip("node is not installed")++ script = """+ globalThis.window = globalThis;+ globalThis.localStorage = { getItem: () => null, setItem: () => {}, removeItem: () => {} };+ globalThis.document = {+ getElementById: () => null,+ querySelector: () => null,+ querySelectorAll: () => [],+ addEventListener: () => {},+ };+ const { filterWarrantiesForExport } = await import('./frontend/js/components/importExport.js');+ const sample = [+ {+ id: 1,+ product_name: 'Laptop',+ vendor: 'Lenovo',+ status: 'active',+ is_archived: false,+ model_number: 'X1C-GEN12',+ serial_numbers: ['SN-ALPHA-99'],+ notes: 'Extended onsite support',+ tags: [{ id: 10, name: 'Work' }],+ warranty_type: 'manufacturer',+ },+ {+ id: 2,+ product_name: 'Old Monitor',+ vendor: 'Dell',+ status: 'expired',+ is_archived: true,+ model_number: 'U2720Q',+ serial_numbers: ['SN-ARCH-01'],+ notes: 'Retired from desk',+ tags: [{ id: 11, name: 'Home' }],+ warranty_type: 'extended',+ },+ {+ id: 3,+ product_name: 'Mouse',+ vendor: 'Logitech',+ status: 'expired',+ is_archived: false,+ model_number: 'MX3S',+ serial_numbers: ['SN-MOUSE-7'],+ notes: '',+ tags: [],+ warranty_type: 'manufacturer',+ },+ ];++ const archivedOnly = filterWarrantiesForExport(sample, { status: 'archived' });+ if (archivedOnly.length !== 1 || archivedOnly[0].id !== 2) {+ throw new Error('archived filter failed: ' + JSON.stringify(archivedOnly));+ }+ const archivedFromArchivedEndpoint = filterWarrantiesForExport(+ [{ id: 9, product_name: 'Router', status: 'expired' }],+ { status: 'archived' },+ { isArchivedView: true }+ );+ if (archivedFromArchivedEndpoint.length !== 1 || archivedFromArchivedEndpoint[0].id !== 9) {+ throw new Error('archived view export failed when row omits is_archived');+ }+ const expiredNonArchived = filterWarrantiesForExport(sample, { status: 'expired' });+ if (expiredNonArchived.length !== 1 || expiredNonArchived[0].id !== 3) {+ throw new Error('expired filter should exclude archived: ' + JSON.stringify(expiredNonArchived));+ }+ const byModel = filterWarrantiesForExport(sample, { status: 'all', search: 'x1c-gen12' });+ if (byModel.length !== 1 || byModel[0].id !== 1) {+ throw new Error('model_number search failed');+ }+ const bySerial = filterWarrantiesForExport(sample, { status: 'all', search: 'sn-mouse-7' });+ if (bySerial.length !== 1 || bySerial[0].id !== 3) {+ throw new Error('serial_numbers search failed');+ }+ const byNotes = filterWarrantiesForExport(sample, { status: 'all', search: 'onsite support' });+ if (byNotes.length !== 1 || byNotes[0].id !== 1) {+ throw new Error('notes search failed');+ }+ console.log('OK');+ """+ result = subprocess.run(+ [node, "--input-type=module", "-e", script],+ cwd=str(REPO),+ capture_output=True,+ text=True,+ )+ assert result.returncode == 0, f"stdout={result.stdout}\nstderr={result.stderr}"+ assert "OK" in result.stdout+++def test_backend_timezones_route_includes_utc():+ src = (REPO / "backend" / "warranties_routes.py").read_text(encoding="utf-8")+ start = src.index("def get_timezones():")+ end = src.index("except Exception as e:", start)+ body = src[start:end]++ assert "'region': 'UTC'" in body+ assert "'value': 'UTC'" in body+++def test_settings_resolves_currency_symbols_and_loads_both_timezone_selects():+ src = (FRONTEND / "settings-new.js").read_text(encoding="utf-8")+ assert "const resolveCurrencyOptionValue = (codeOrSymbol) =>" in src+ assert "currencySymbolSelect.value = resolvedCode;" in src+ assert "currencySymbolSelect.value = resolvedApiCode;" in src+ assert "tasks.push(loadTimezonesIntoSelect(userAppriseTimezoneSelect));" in src+++def test_locales_and_settings_html_have_no_raw_strong_tags_in_oidc_desc():+ locale_files = sorted(LOCALES.glob("*/translation.json"))+ assert len(locale_files) >= 20+ offenders = []+ for path in locale_files:+ data = json.loads(path.read_text(encoding="utf-8"))+ desc = data.get("settings", {}).get("oidc_only_mode_desc", "")+ if "<strong>" in desc or "</strong>" in desc:+ offenders.append(str(path.relative_to(REPO)))+ assert not offenders, f"Found literal <strong> tags in: {offenders}"++ html = (FRONTEND / "settings-new.html").read_text(encoding="utf-8")+ m = re.search(r'data-i18n="settings\.oidc_only_mode_desc"[^>]*>(.*?)</p>', html, re.S)+ assert m is not None+ assert "<strong>" not in m.group(1)+++def test_status_timeline_excludes_archived_and_voided_and_supports_dark_charts():+ src = (FRONTEND / "status.js").read_text(encoding="utf-8")+ assert "if (w.is_lifetime || w.is_archived || w.is_voided) return;" in src+ assert "const isDark = document.documentElement.getAttribute('data-theme') === 'dark';" in src+ assert "legendColor = isDark ? '#e0e0e0'" in src+++def test_table_view_emits_standard_status_classes():+ src = (FRONTEND / "js" / "components" / "warrantyRenderer.js").read_text(encoding="utf-8")+ start = src.index("function cardClassName(")+ end = src.index("function buildPhotoHtml(")+ body = src[start:end]++ assert "if (view === 'table') return `warranty-card ${modifier} status-${statusClass}`;" in body+++def test_claims_hides_paperless_selector_when_paperless_disabled():+ paperless = (FRONTEND / "js" / "components" / "paperless.js").read_text(encoding="utf-8")+ claims = (FRONTEND / "js" / "components" / "claims.js").read_text(encoding="utf-8")++ assert "export function isPaperlessEnabled()" in paperless+ assert "import { isPaperlessEnabled } from './paperless.js';" in claims+ assert claims.count("isPaperlessEnabled()") >= 2+++def test_mobile_header_scope_not_forced_and_popovers_aligned():+ css = (FRONTEND / "mobile-header.css").read_text(encoding="utf-8")++ # Tablet rule must not force display: block !important on #scopeDropdown+ tablet_start = css.index("@media (min-width: 481px) and (max-width: 768px)")+ tablet_end = css.index("@media (min-width: 600px) and (max-width: 768px)", tablet_start)+ tablet_block = css[tablet_start:tablet_end]+ scope_match = re.search(+ r"\.search-container\s+\.secondary-actions\s+#scopeDropdown\s*\{([^}]*)\}",+ tablet_block,+ )+ assert scope_match is not None+ assert "display:" not in scope_match.group(1)++ # Mobile popover alignment rules exist+ assert "#dataMenu," in css+ assert "#scopeMenu {" in css+ assert "#viewMenu {" in css+++def test_auth_pages_and_mobile_menu_avoid_empty_drawer():+ mm = (FRONTEND / "mobile-menu.js").read_text(encoding="utf-8")+ assert "function hasNavigableItems(header)" in mm+ assert "if (!hasNavigableItems(header))" in mm+ assert "(isAuthenticated && userDropdown)" in mm++ for page in ("register.html", "reset-password-request.html", "reset-password.html"):+ html = (FRONTEND / page).read_text(encoding="utf-8")+ assert "mobile-menu-toggle" not in html, f"{page} still has empty mobile-menu-toggle"+++def test_style_css_and_settings_cleanup_invariants():+ css = (FRONTEND / "style.css").read_text(encoding="utf-8")+ assert "photo-1586920740199-47ce3734a7a2" not in css+ assert ".grid-view .warranty-content:has(.product-photo-thumbnail)" in css+ assert ".table-view .warranty-card.archived .product-name-header .action-btn i" in css+ assert ":root[data-theme=\"dark\"] .status-void" in css+ assert ".table-actions .search-box" in css+ assert "min-width: 44px !important;" in css+ assert "grid-column: 1 / -1;" in css++ settings_html = (FRONTEND / "settings-new.html").read_text(encoding="utf-8")+ assert "emergencyDeleteBtn" not in settings_html+ assert "If the delete button doesn't work" not in settings_html