Polish static UI flows
This commit is contained in:
@@ -2370,6 +2370,17 @@ document.querySelectorAll('.asset-card').forEach(card => {
|
||||
introEl.textContent = intro || '暂无简介';
|
||||
tagsEl.innerHTML = tags.map(t => '<span class="ad-tag-chip">' + t + '</span>').join('') +
|
||||
'<button class="ad-tag-add" type="button" title="添加标签"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M8 3v10M3 8h10"/></svg></button>';
|
||||
const tagAddBtn = tagsEl.querySelector('.ad-tag-add');
|
||||
tagAddBtn?.addEventListener('click', e => {
|
||||
e.stopPropagation();
|
||||
const existing = [...tagsEl.querySelectorAll('.ad-tag-chip')].map(el => el.textContent);
|
||||
const next = ['精选素材', '常用资产', '待复用', '已核准'].find(t => !existing.includes(t)) || '新标签';
|
||||
const chip = document.createElement('span');
|
||||
chip.className = 'ad-tag-chip';
|
||||
chip.textContent = next;
|
||||
tagsEl.insertBefore(chip, tagAddBtn);
|
||||
Shell.toast('已添加标签', next);
|
||||
});
|
||||
propsEl.innerHTML = props.map(([k, v]) => '<div class="ad-prop"><span class="k">' + k + '</span><span class="v">' + v + '</span></div>').join('');
|
||||
|
||||
bg.classList.add('show');
|
||||
@@ -2426,6 +2437,13 @@ document.querySelectorAll('.asset-card').forEach(card => {
|
||||
close(true);
|
||||
});
|
||||
|
||||
bg.querySelectorAll('.ad-icon-btn, .ad-stat-btn').forEach(btn => {
|
||||
btn.addEventListener('click', e => {
|
||||
e.stopPropagation();
|
||||
Shell.toast('已加入下载', (_curName || '资产') + ' · 原图 / 三视图');
|
||||
});
|
||||
});
|
||||
|
||||
// 弹窗按钮 · 主按钮「保存并退出」/ 次按钮「退出」
|
||||
confirmSaveBtn.addEventListener('click', () => {
|
||||
if (_versions.length) _doSave();
|
||||
|
||||
Reference in New Issue
Block a user