Test/custom admin ui #4

Merged
orion merged 4 commits from test/custom-admin-ui into master 2026-07-09 17:11:50 +08:00
Showing only changes of commit 656188a486 - Show all commits
+5 -4
View File
@@ -75,7 +75,9 @@ def write_detail_collapse_script(theme_dir: Path) -> bool:
btn.type = 'button'; btn.type = 'button';
btn.className = 'fcbx-life-toggle mt-3 rounded-lg border px-3 py-2 text-sm font-medium transition'; btn.className = 'fcbx-life-toggle mt-3 rounded-lg border px-3 py-2 text-sm font-medium transition';
btn.style.cssText = 'border-color:rgba(148,163,184,.55);display:inline-flex;align-items:center;gap:.35rem;'; btn.style.cssText = 'border-color:rgba(148,163,184,.55);display:inline-flex;align-items:center;gap:.35rem;';
btn.addEventListener('click', () => { btn.addEventListener('click', event => {
event.preventDefault();
event.stopPropagation();
section.dataset.fcbxLifecycleCollapsed = section.dataset.fcbxLifecycleCollapsed === '1' ? '0' : '1'; section.dataset.fcbxLifecycleCollapsed = section.dataset.fcbxLifecycleCollapsed === '1' ? '0' : '1';
apply(section); apply(section);
}); });
@@ -116,9 +118,8 @@ def main() -> None:
theme = ASSETS_ROOT / 'themes/2026' theme = ASSETS_ROOT / 'themes/2026'
assets = theme / 'assets' assets = theme / 'assets'
if assets.exists(): if assets.exists():
for path in assets.glob('FileManageView-*.js'): # 只用独立 DOM 脚本处理生命周期收起,避免再改编译后的 FileManageView
if patch_file_manage(path): # 否则 Vue 内部状态和外部补丁会互相抢状态,导致展开/收起需要点多次。
changed.append(str(path.relative_to(ASSETS_ROOT)))
for path in assets.glob('clipboard-*.js'): for path in assets.glob('clipboard-*.js'):
if patch_clipboard(path): if patch_clipboard(path):
changed.append(str(path.relative_to(ASSETS_ROOT))) changed.append(str(path.relative_to(ASSETS_ROOT)))