Fix auto-import toggle visual and import page refresh
Toggle appeared off when running because CSS :checked rules were scoped to .repair-master-toggle. Added auto-import-toggle-label selectors. Refresh now re-renders whichever tab is active.
This commit is contained in:
parent
1446c7b63a
commit
c20529dbb5
2 changed files with 11 additions and 8 deletions
|
|
@ -66395,10 +66395,6 @@ async function importPageRefreshStaging() {
|
|||
// Clear finished jobs from the queue
|
||||
importPageClearFinishedJobs();
|
||||
|
||||
// Re-fetch groups and suggestions (server rebuilds cache after imports)
|
||||
importPageLoadAutoGroups();
|
||||
importPageLoadSuggestions();
|
||||
|
||||
try {
|
||||
const resp = await fetch('/api/import/staging/files');
|
||||
const data = await resp.json();
|
||||
|
|
@ -66417,10 +66413,14 @@ async function importPageRefreshStaging() {
|
|||
document.getElementById('import-page-staging-stats').textContent =
|
||||
`${importPageState.stagingFiles.length} file${importPageState.stagingFiles.length !== 1 ? 's' : ''}${totalSize ? ' · ' + sizeStr : ''}`;
|
||||
|
||||
// Refresh the current tab view
|
||||
// Refresh the current tab view after data is loaded
|
||||
if (importPageState.activeTab === 'singles') {
|
||||
importPageRenderSinglesList();
|
||||
} else if (importPageState.activeTab === 'album') {
|
||||
importPageLoadAutoGroups();
|
||||
}
|
||||
// Always refresh suggestions and groups in background
|
||||
importPageLoadSuggestions();
|
||||
} catch (err) {
|
||||
console.error('Failed to refresh staging:', err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49264,15 +49264,18 @@ tr.tag-diff-same {
|
|||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.repair-master-toggle input {
|
||||
.repair-master-toggle input,
|
||||
.auto-import-toggle-label input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.repair-master-toggle input:checked + .repair-toggle-slider {
|
||||
.repair-master-toggle input:checked + .repair-toggle-slider,
|
||||
.auto-import-toggle-label input:checked + .repair-toggle-slider {
|
||||
background: var(--accent-color, #6366f1);
|
||||
}
|
||||
|
||||
.repair-master-toggle input:checked + .repair-toggle-slider::after {
|
||||
.repair-master-toggle input:checked + .repair-toggle-slider::after,
|
||||
.auto-import-toggle-label input:checked + .repair-toggle-slider::after {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue