fix(ui): remove redundant Quick Refresh from Refresh split button dropdown

The main Refresh button and Quick Refresh dropdown item both called refreshModels(false). Split button dropdowns should only contain alternative actions (Hick's Law). Dropdown now has only Rebuild Cache (fullRebuild=true). Removed from 2 templates, 2 JS files, 1 test fixture, and 10 locale files.
This commit is contained in:
Will Miao
2026-05-12 07:50:54 +08:00
parent 75f74d54d8
commit df1410535e
15 changed files with 15 additions and 83 deletions

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "Modelliste aktualisieren", "title": "Modelliste aktualisieren",
"quick": "Änderungen synchronisieren",
"quickTooltip": "Nach neuen oder fehlenden Modelldateien suchen, damit die Liste aktuell bleibt.",
"full": "Cache neu aufbauen", "full": "Cache neu aufbauen",
"fullTooltip": "Alle Modelldetails aus Metadatendateien neu laden nutzen, wenn die Bibliothek veraltet wirkt oder nach manuellen Änderungen." "fullTooltip": "Alle Modelldetails aus Metadatendateien neu laden nutzen, wenn die Bibliothek veraltet wirkt oder nach manuellen Änderungen."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "Rezeptliste aktualisieren", "title": "Rezeptliste aktualisieren",
"quick": "Änderungen synchronisieren",
"quickTooltip": "Änderungen synchronisieren - schnelle Aktualisierung ohne Cache-Neubau",
"full": "Cache neu aufbauen", "full": "Cache neu aufbauen",
"fullTooltip": "Cache neu aufbauen - vollständiger Rescan aller Rezeptdateien" "fullTooltip": "Cache neu aufbauen - vollständiger Rescan aller Rezeptdateien"
}, },
@@ -1961,4 +1957,4 @@
"retry": "Wiederholen" "retry": "Wiederholen"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "Refresh model list", "title": "Refresh model list",
"quick": "Sync Changes",
"quickTooltip": "Scan for new or missing model files so the list stays current.",
"full": "Rebuild Cache", "full": "Rebuild Cache",
"fullTooltip": "Reload all model details from metadata files—use if the library looks out of date or after manual edits." "fullTooltip": "Reload all model details from metadata files—use if the library looks out of date or after manual edits."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "Refresh recipe list", "title": "Refresh recipe list",
"quick": "Sync Changes",
"quickTooltip": "Sync changes - quick refresh without rebuilding cache",
"full": "Rebuild Cache", "full": "Rebuild Cache",
"fullTooltip": "Rebuild cache - full rescan of all recipe files" "fullTooltip": "Rebuild cache - full rescan of all recipe files"
}, },
@@ -1961,4 +1957,4 @@
"retry": "Retry" "retry": "Retry"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "Actualizar lista de modelos", "title": "Actualizar lista de modelos",
"quick": "Sincronizar cambios",
"quickTooltip": "Busca archivos de modelo nuevos o faltantes para mantener la lista al día.",
"full": "Reconstruir caché", "full": "Reconstruir caché",
"fullTooltip": "Vuelve a cargar todos los detalles desde los archivos de metadatos; úsalo si la biblioteca parece desactualizada o tras ediciones manuales." "fullTooltip": "Vuelve a cargar todos los detalles desde los archivos de metadatos; úsalo si la biblioteca parece desactualizada o tras ediciones manuales."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "Actualizar lista de recetas", "title": "Actualizar lista de recetas",
"quick": "Sincronizar cambios",
"quickTooltip": "Sincronizar cambios - actualización rápida sin reconstruir caché",
"full": "Reconstruir caché", "full": "Reconstruir caché",
"fullTooltip": "Reconstruir caché - reescaneo completo de todos los archivos de recetas" "fullTooltip": "Reconstruir caché - reescaneo completo de todos los archivos de recetas"
}, },
@@ -1961,4 +1957,4 @@
"retry": "Reintentar" "retry": "Reintentar"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "Actualiser la liste des modèles", "title": "Actualiser la liste des modèles",
"quick": "Synchroniser les changements",
"quickTooltip": "Analyse les nouveaux fichiers de modèle ou les fichiers manquants pour garder la liste à jour.",
"full": "Reconstruire le cache", "full": "Reconstruire le cache",
"fullTooltip": "Recharge tous les détails des modèles depuis les fichiers metadata — à utiliser si la bibliothèque paraît obsolète ou après des modifications manuelles." "fullTooltip": "Recharge tous les détails des modèles depuis les fichiers metadata — à utiliser si la bibliothèque paraît obsolète ou après des modifications manuelles."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "Actualiser la liste des recipes", "title": "Actualiser la liste des recipes",
"quick": "Synchroniser les changements",
"quickTooltip": "Synchroniser les changements - actualisation rapide sans reconstruire le cache",
"full": "Reconstruire le cache", "full": "Reconstruire le cache",
"fullTooltip": "Reconstruire le cache - rescan complet de tous les fichiers de recipes" "fullTooltip": "Reconstruire le cache - rescan complet de tous les fichiers de recipes"
}, },
@@ -1961,4 +1957,4 @@
"retry": "Réessayer" "retry": "Réessayer"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "רענן רשימת מודלים", "title": "רענן רשימת מודלים",
"quick": "סנכרון שינויים",
"quickTooltip": "סריקה לאיתור קבצי מודל חדשים או חסרים כדי לשמור את הרשימה מעודכנת.",
"full": "בניית מטמון מחדש", "full": "בניית מטמון מחדש",
"fullTooltip": "טוען מחדש את כל פרטי המודלים מקבצי המטא-דאטה לשימוש אם הספרייה נראית לא מעודכנת או לאחר עריכות ידניות." "fullTooltip": "טוען מחדש את כל פרטי המודלים מקבצי המטא-דאטה לשימוש אם הספרייה נראית לא מעודכנת או לאחר עריכות ידניות."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "רענן רשימת מתכונים", "title": "רענן רשימת מתכונים",
"quick": "סנכרן שינויים",
"quickTooltip": "סנכרן שינויים - רענון מהיר ללא בניית מטמון מחדש",
"full": "בנה מטמון מחדש", "full": "בנה מטמון מחדש",
"fullTooltip": "בנה מטמון מחדש - סריקה מחדש מלאה של כל קבצי המתכונים" "fullTooltip": "בנה מטמון מחדש - סריקה מחדש מלאה של כל קבצי המתכונים"
}, },
@@ -1961,4 +1957,4 @@
"retry": "נסה שוב" "retry": "נסה שוב"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "モデルリストを更新", "title": "モデルリストを更新",
"quick": "変更を同期",
"quickTooltip": "新しいモデルファイルや欠けているファイルをスキャンして一覧を最新に保ちます。",
"full": "キャッシュを再構築", "full": "キャッシュを再構築",
"fullTooltip": "メタデータファイルから全モデル情報を再読み込みします。リストが古いと感じるときや手動編集後に使用してください。" "fullTooltip": "メタデータファイルから全モデル情報を再読み込みします。リストが古いと感じるときや手動編集後に使用してください。"
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "レシピリストを更新", "title": "レシピリストを更新",
"quick": "変更を同期",
"quickTooltip": "変更を同期 - キャッシュを再構築せずにクイック更新",
"full": "キャッシュを再構築", "full": "キャッシュを再構築",
"fullTooltip": "キャッシュを再構築 - すべてのレシピファイルを完全に再スキャン" "fullTooltip": "キャッシュを再構築 - すべてのレシピファイルを完全に再スキャン"
}, },
@@ -1961,4 +1957,4 @@
"retry": "再試行" "retry": "再試行"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "모델 목록 새로고침", "title": "모델 목록 새로고침",
"quick": "변경 사항 동기화",
"quickTooltip": "새로운 모델 파일이나 누락된 파일을 찾아 목록을 최신 상태로 유지합니다.",
"full": "캐시 재구성", "full": "캐시 재구성",
"fullTooltip": "메타데이터 파일에서 모든 모델 정보를 다시 불러옵니다. 라이브러리가 오래되어 보이거나 수동 수정 후에 사용하세요." "fullTooltip": "메타데이터 파일에서 모든 모델 정보를 다시 불러옵니다. 라이브러리가 오래되어 보이거나 수동 수정 후에 사용하세요."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "레시피 목록 새로고침", "title": "레시피 목록 새로고침",
"quick": "변경 사항 동기화",
"quickTooltip": "변경 사항 동기화 - 캐시를 재구성하지 않고 빠른 새로고침",
"full": "캐시 재구성", "full": "캐시 재구성",
"fullTooltip": "캐시 재구성 - 모든 레시피 파일을 완전히 다시 스캔" "fullTooltip": "캐시 재구성 - 모든 레시피 파일을 완전히 다시 스캔"
}, },
@@ -1961,4 +1957,4 @@
"retry": "다시 시도" "retry": "다시 시도"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "Обновить список моделей", "title": "Обновить список моделей",
"quick": "Синхронизировать изменения",
"quickTooltip": "Находит новые или отсутствующие файлы моделей, чтобы список оставался актуальным.",
"full": "Перестроить кэш", "full": "Перестроить кэш",
"fullTooltip": "Перечитывает все данные моделей из файлов метаданных — используйте, если библиотека выглядит устаревшей или после ручных правок." "fullTooltip": "Перечитывает все данные моделей из файлов метаданных — используйте, если библиотека выглядит устаревшей или после ручных правок."
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "Обновить список рецептов", "title": "Обновить список рецептов",
"quick": "Синхронизировать изменения",
"quickTooltip": "Синхронизировать изменения - быстрое обновление без перестроения кэша",
"full": "Перестроить кэш", "full": "Перестроить кэш",
"fullTooltip": "Перестроить кэш - полное повторное сканирование всех файлов рецептов" "fullTooltip": "Перестроить кэш - полное повторное сканирование всех файлов рецептов"
}, },
@@ -1961,4 +1957,4 @@
"retry": "Повторить" "retry": "Повторить"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "刷新模型列表", "title": "刷新模型列表",
"quick": "同步变更",
"quickTooltip": "扫描新的或缺失的模型文件,保持列表最新。",
"full": "重建缓存", "full": "重建缓存",
"fullTooltip": "从元数据文件重新加载所有模型信息;用于列表过时或手动编辑后。" "fullTooltip": "从元数据文件重新加载所有模型信息;用于列表过时或手动编辑后。"
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "刷新配方列表", "title": "刷新配方列表",
"quick": "同步变更",
"quickTooltip": "同步变更 - 快速刷新而不重建缓存",
"full": "重建缓存", "full": "重建缓存",
"fullTooltip": "重建缓存 - 重新扫描所有配方文件" "fullTooltip": "重建缓存 - 重新扫描所有配方文件"
}, },
@@ -1961,4 +1957,4 @@
"retry": "重试" "retry": "重试"
} }
} }
} }

View File

@@ -640,8 +640,6 @@
}, },
"refresh": { "refresh": {
"title": "重新整理模型列表", "title": "重新整理模型列表",
"quick": "同步變更",
"quickTooltip": "掃描新的或缺少的模型檔案,讓清單保持最新。",
"full": "重建快取", "full": "重建快取",
"fullTooltip": "從中繼資料檔重新載入所有模型資訊;適用於清單過時或手動編輯後。" "fullTooltip": "從中繼資料檔重新載入所有模型資訊;適用於清單過時或手動編輯後。"
}, },
@@ -816,8 +814,6 @@
}, },
"refresh": { "refresh": {
"title": "重新整理配方列表", "title": "重新整理配方列表",
"quick": "同步變更",
"quickTooltip": "同步變更 - 快速重新整理而不重建快取",
"full": "重建快取", "full": "重建快取",
"fullTooltip": "重建快取 - 重新掃描所有配方檔案" "fullTooltip": "重建快取 - 重新掃描所有配方檔案"
}, },
@@ -1961,4 +1957,4 @@
"retry": "重試" "retry": "重試"
} }
} }
} }

View File

@@ -166,17 +166,6 @@ export class PageControls {
}); });
}); });
// Handle quick refresh option
const quickRefreshOption = document.querySelector('[data-action="quick-refresh"]');
if (quickRefreshOption) {
quickRefreshOption.addEventListener('click', (e) => {
e.stopPropagation();
this.refreshModels(false);
// Close the dropdown
document.querySelector('.dropdown-group.active')?.classList.remove('active');
});
}
// Handle full rebuild option // Handle full rebuild option
const fullRebuildOption = document.querySelector('[data-action="full-rebuild"]'); const fullRebuildOption = document.querySelector('[data-action="full-rebuild"]');
if (fullRebuildOption) { if (fullRebuildOption) {
@@ -829,4 +818,4 @@ export class PageControls {
this.sidebarManager.cleanup(); this.sidebarManager.cleanup();
} }
} }
} }

View File

@@ -286,16 +286,6 @@ class RecipeManager {
}); });
}); });
// Handle quick refresh option (Sync Changes)
const quickRefreshOption = document.querySelector('[data-action="quick-refresh"]');
if (quickRefreshOption) {
quickRefreshOption.addEventListener('click', (e) => {
e.stopPropagation();
this.pageControls.refreshModels(false);
this.closeDropdowns();
});
}
// Handle full rebuild option (Rebuild Cache) // Handle full rebuild option (Rebuild Cache)
const fullRebuildOption = document.querySelector('[data-action="full-rebuild"]'); const fullRebuildOption = document.querySelector('[data-action="full-rebuild"]');
if (fullRebuildOption) { if (fullRebuildOption) {
@@ -407,4 +397,4 @@ document.addEventListener('DOMContentLoaded', async () => {
}); });
// Export for use in other modules // Export for use in other modules
export { RecipeManager }; export { RecipeManager };

View File

@@ -41,9 +41,6 @@
<i class="fas fa-caret-down"></i> <i class="fas fa-caret-down"></i>
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<div class="dropdown-item" data-action="quick-refresh" title="{{ t('loras.controls.refresh.quickTooltip') }}">
<i class="fas fa-bolt"></i> <span>{{ t('loras.controls.refresh.quick') }}</span>
</div>
<div class="dropdown-item" data-action="full-rebuild" title="{{ t('loras.controls.refresh.fullTooltip') }}"> <div class="dropdown-item" data-action="full-rebuild" title="{{ t('loras.controls.refresh.fullTooltip') }}">
<i class="fas fa-tools"></i> <span>{{ t('loras.controls.refresh.full') }}</span> <i class="fas fa-tools"></i> <span>{{ t('loras.controls.refresh.full') }}</span>
</div> </div>
@@ -129,4 +126,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -75,9 +75,6 @@
<i class="fas fa-caret-down"></i> <i class="fas fa-caret-down"></i>
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<div class="dropdown-item" data-action="quick-refresh" title="{{ t('recipes.controls.refresh.quickTooltip', default='Sync changes - quick refresh without rebuilding cache') }}">
<i class="fas fa-bolt"></i> <span>{{ t('loras.controls.refresh.quick', default='Sync Changes') }}</span>
</div>
<div class="dropdown-item" data-action="full-rebuild" title="{{ t('recipes.controls.refresh.fullTooltip', default='Rebuild cache - full rescan of all recipe files') }}"> <div class="dropdown-item" data-action="full-rebuild" title="{{ t('recipes.controls.refresh.fullTooltip', default='Rebuild cache - full rescan of all recipe files') }}">
<i class="fas fa-tools"></i> <span>{{ t('loras.controls.refresh.full', default='Rebuild Cache') }}</span> <i class="fas fa-tools"></i> <span>{{ t('loras.controls.refresh.full', default='Rebuild Cache') }}</span>
</div> </div>
@@ -196,4 +193,4 @@
{% block main_script %} {% block main_script %}
<script type="module" src="/loras_static/js/recipes.js?v={{ version }}"></script> <script type="module" src="/loras_static/js/recipes.js?v={{ version }}"></script>
{% endblock %} {% endblock %}

View File

@@ -135,7 +135,6 @@ function renderControlsDom(pageKey) {
<button data-action="refresh" class="dropdown-main"></button> <button data-action="refresh" class="dropdown-main"></button>
<button class="dropdown-toggle"></button> <button class="dropdown-toggle"></button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<div class="dropdown-item" data-action="quick-refresh"></div>
<div class="dropdown-item" data-action="full-rebuild"></div> <div class="dropdown-item" data-action="full-rebuild"></div>
</div> </div>
</div> </div>
@@ -930,4 +929,4 @@ describe('PageControls favorites, sorting, and duplicates scenarios', () => {
expect(stateModule.state.bulkMode).toBe(true); expect(stateModule.state.bulkMode).toBe(true);
expect(pageState.duplicatesMode).toBe(true); expect(pageState.duplicatesMode).toBe(true);
}); });
}); });