dsh-plugin-image-workbench 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/static/index.html +14 -7
package/package.json
CHANGED
package/server/static/index.html
CHANGED
|
@@ -152,6 +152,9 @@
|
|
|
152
152
|
.stepbar b{font-size:12.5px}
|
|
153
153
|
.stepbar .hint{margin:0}
|
|
154
154
|
.stepbar .tag{font-size:11px;color:var(--ink-3)}
|
|
155
|
+
/* 分镜条数:橙色加粗放大,一眼看到这轮要出几张;字号压过标题本身,扫视时先落在这里 */
|
|
156
|
+
.stepbar .tag#itemCount{font-size:13.5px;font-weight:700;color:#e8590c;
|
|
157
|
+
font-variant-numeric:tabular-nums;letter-spacing:0}
|
|
155
158
|
.spacer{flex:1}
|
|
156
159
|
.step-no{width:18px;height:18px;border-radius:50%;background:var(--primary);color:#fff;
|
|
157
160
|
font-size:11px;display:flex;align-items:center;justify-content:center;font-weight:600;flex:0 0 auto}
|
|
@@ -4597,12 +4600,16 @@ async function openDrafts(){
|
|
|
4597
4600
|
d.items.forEach(it=>{
|
|
4598
4601
|
const row = document.createElement('div');
|
|
4599
4602
|
row.className = 'draft-row';
|
|
4600
|
-
/*
|
|
4601
|
-
|
|
4602
|
-
const
|
|
4603
|
+
/* 名字优先用标题:标题才是这篇东西叫什么,选题只是「想写什么」的一句话,
|
|
4604
|
+
以前选题优先,标题写好了却看到草稿叫「33333」 */
|
|
4605
|
+
const draftLabel = () => safeText(it.name || it.title || it.topic || '(无标题)');
|
|
4606
|
+
/* 小字只留「N 条分镜 · 跟主名不同的那条信息」:主名已经是标题了,
|
|
4607
|
+
再拼一遍标题等于占地方;选题也跟主名一样就跳过,试下第一条分镜标题 */
|
|
4608
|
+
const brief = [safeText(it.topic),
|
|
4609
|
+
safeText((it.titles || []).find(Boolean) || '')]
|
|
4610
|
+
.find(t => t && t !== draftLabel()) || '';
|
|
4603
4611
|
const sub = clipText([it.count ? it.count + ' 条分镜' : '无分镜',
|
|
4604
4612
|
brief ? clipText(brief, 12) : ''].filter(Boolean).join(' · '), 30);
|
|
4605
|
-
const draftLabel = () => safeText(it.name || it.topic || it.title || '(无选题)');
|
|
4606
4613
|
row.innerHTML = `<span class="dc"><b data-role="label">${esc(draftLabel())}</b>`
|
|
4607
4614
|
+ `<input class="rn-input" data-role="rn" type="text" maxlength="60" placeholder="输入草稿名称,留空恢复默认" style="display:none">`
|
|
4608
4615
|
+ `<span class="ds">${esc(fmtTime(it.updated))} · ${esc(sub)}</span></span>`
|
|
@@ -4615,8 +4622,8 @@ async function openDrafts(){
|
|
|
4615
4622
|
const labelEl = row.querySelector('[data-role="label"]');
|
|
4616
4623
|
const rnEl = row.querySelector('[data-role="rn"]');
|
|
4617
4624
|
/* 回显「当前这个名字」:自定义名优先,没有自定义名就回显它现在显示的默认名
|
|
4618
|
-
|
|
4619
|
-
const defaultName = () => safeText(it.
|
|
4625
|
+
(标题 / 选题),用户在现有名字上改,而不是对着一个空框重想 */
|
|
4626
|
+
const defaultName = () => safeText(it.title || it.topic || '');
|
|
4620
4627
|
const currentName = () => safeText(it.name || '') || defaultName();
|
|
4621
4628
|
rnEl.value = currentName();
|
|
4622
4629
|
row.querySelector('[data-act="rename"]').onclick = ()=>{
|
|
@@ -4634,7 +4641,7 @@ async function openDrafts(){
|
|
|
4634
4641
|
labelEl.style.display = 'block';
|
|
4635
4642
|
if (!save) { rnEl.value = currentName(); return; }
|
|
4636
4643
|
const val = Array.from(safeText(rnEl.value.trim())).slice(0, 60).join('');
|
|
4637
|
-
/*
|
|
4644
|
+
/* 改完正好等于默认名(标题 / 选题)就存空串,让名字继续跟着标题走,
|
|
4638
4645
|
免得把它写死成一份静态名称 */
|
|
4639
4646
|
const nextName = val === defaultName() ? '' : val;
|
|
4640
4647
|
if (nextName === (it.name || '')) { rnEl.value = currentName(); return; }
|