mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -03:00
Add folder tag toggle and feedback button; refactor theme toggle
This commit is contained in:
@@ -96,4 +96,28 @@ export function openCivitai(modelName) {
|
||||
// 如果没有ID,尝试使用名称搜索
|
||||
window.open(`https://civitai.com/models?query=${encodeURIComponent(modelName)}`, '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
export function toggleFolderTags() {
|
||||
const folderTags = document.querySelector('.folder-tags');
|
||||
if (!folderTags) return;
|
||||
|
||||
const isHidden = folderTags.style.display === 'none';
|
||||
folderTags.style.display = isHidden ? 'flex' : 'none';
|
||||
|
||||
// Save preference
|
||||
localStorage.setItem('folderTagsVisible', isHidden ? 'true' : 'false');
|
||||
}
|
||||
|
||||
export function openFeedback() {
|
||||
window.open('https://github.com/willmiao/ComfyUI-Lora-Manager/issues/new', '_blank');
|
||||
}
|
||||
|
||||
// Add this to your existing initialization code
|
||||
export function initFolderTagsVisibility() {
|
||||
const folderTags = document.querySelector('.folder-tags');
|
||||
if (!folderTags) return;
|
||||
|
||||
const isVisible = localStorage.getItem('folderTagsVisible') !== 'false';
|
||||
folderTags.style.display = isVisible ? 'flex' : 'none';
|
||||
}
|
||||
Reference in New Issue
Block a user