cicy-desktop 2.1.312 → 2.1.313

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.312",
3
+ "version": "2.1.313",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -39,11 +39,7 @@
39
39
  .line2 .tg { flex: none; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #b4b4bb; }
40
40
  .line2 .tg b { color: var(--fg); font-weight: 600; }
41
41
  .line2 .tg.none { color: #6b6b72; }
42
- .line2 .note { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #9a9aa2; cursor: text; outline: 0; border-radius: 4px; padding: 0 4px; margin: 0 -4px; }
43
- .line2 .note.empty { color: #55555c; font-style: italic; }
44
- .line2 .note:hover { color: #fff; }
45
42
  /* 编辑态就地变成可输入,尺寸/位置与只读态完全一致,不发生位移 */
46
- .line2 .note.editing { color: var(--fg); font-style: normal; background: #111113; box-shadow: 0 0 0 1px var(--accent); text-overflow: clip; }
47
43
  .line2 .ip { flex: none; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; border-radius: 999px; background: var(--head); color: #b4b4bb; font: 11px ui-monospace, monospace; line-height: 16px; cursor: pointer; }
48
44
  .line2 .ip.none { color: #6b6b72; font-family: inherit; }
49
45
  .line2 .ip.busy { color: #f0b429; }
@@ -229,7 +225,7 @@
229
225
  row.className = 'row'; row.dataset.id = String(p.accountIdx); row.title = `persist:sandbox-${p.accountIdx}`;
230
226
  row.innerHTML = `
231
227
  <div class="line1"><span class="dot"></span><span class="name">${esc(p.name)}</span><span class="chip">#${p.accountIdx}</span><span class="st"></span><button class="icon gear" title="代理设置">⚙</button><button class="icon reload" title="重新加载">⟳</button></div>
232
- <div class="line2"><span class="tg none">—</span><span class="note" data-role="note" title="点击编辑备注,Enter 保存 / Esc 取消" spellcheck="false"></span><span class="ip none" title="经该 Profile 的代理探测出口 IP / 地区">测 IP</span></div>
228
+ <div class="line2"><span class="tg none">—</span><span class="ip none" title="经该 Profile 的代理探测出口 IP / 地区">测 IP</span></div>
233
229
  <div class="cfg">
234
230
  <div class="f"><label>代理</label><input data-role="proxy" placeholder="留空 = 直连,例如 http://127.0.0.1:20001" spellcheck="false"><button class="sm save">保存</button><button class="sm ghost test">测 IP</button></div>
235
231
  <div class="hint">保存后已打开的会话会重新加载;<b>测 IP</b> 经该代理访问 IP 服务,结果显示在上方。</div>
@@ -238,35 +234,7 @@
238
234
  </div>
239
235
  <div class="row-err"></div>`;
240
236
  const errEl = row.querySelector('.row-err');
241
- const noteEl = row.querySelector('.note');
242
- const showNote = () => { noteEl.textContent = p.note || '添加备注'; noteEl.classList.toggle('empty', !p.note); };
243
- showNote();
244
- let editing = false;
245
- const startEdit = (e) => {
246
- e && e.stopPropagation();
247
- if (editing) return;
248
- editing = true;
249
- noteEl.classList.add('editing'); noteEl.classList.remove('empty');
250
- noteEl.textContent = p.note || '';
251
- noteEl.contentEditable = 'plaintext-only';
252
- noteEl.focus();
253
- const range = document.createRange(); range.selectNodeContents(noteEl);
254
- const sel = getSelection(); sel.removeAllRanges(); sel.addRange(range);
255
- };
256
- const stopEdit = () => { editing = false; noteEl.contentEditable = 'false'; noteEl.classList.remove('editing'); showNote(); };
257
- const saveNote = async () => {
258
- if (!editing) return;
259
- const value = noteEl.textContent.replace(/\s+/g, ' ').trim().slice(0, 500);
260
- stopEdit();
261
- if (value === (p.note || '')) return;
262
- try {
263
- const updated = await window.panelAPI.setProfileNote(p.accountIdx, value);
264
- p.note = updated.note; showNote();
265
- } catch (e) { errEl.textContent = e.message || String(e); errEl.classList.add('on'); }
266
- };
267
- noteEl.onclick = (e) => { e.stopPropagation(); startEdit(e); };
268
- noteEl.onkeydown = (e) => { e.stopPropagation(); if (e.key === 'Enter') { e.preventDefault(); saveNote(); } if (e.key === 'Escape') { e.preventDefault(); stopEdit(); } };
269
- noteEl.onblur = () => saveNote();
237
+ // 备注功能已按需求移除(列表只保留 名称 / @用户名 / 状态 / IP)
270
238
  // 代理设置抽屉(⚙):不常用,默认收起,列表保持干净。
271
239
  const proxyInput = row.querySelector('[data-role="proxy"]');
272
240
  const saveBtn = row.querySelector('.cfg .save');
@@ -80,7 +80,7 @@ test("reloading an unopened profile creates its cell instead of a bare reload",
80
80
  assert.match(reload, /if \(!fresh\)[^]*panelAPI\.reload/);
81
81
  });
82
82
 
83
- test("matrix page exposes profile table, phone preview, note, proxy drawer and ip probe", () => {
83
+ test("matrix page exposes profile table, phone preview, proxy drawer and ip probe", () => {
84
84
  const html = fs.readFileSync(path.join(__dirname, "..", "src", "tabbrowser", "telegram-matrix.html"), "utf8");
85
85
  assert.match(html, /id="rows"/);
86
86
  assert.match(html, /id="ov-error"/);
@@ -95,8 +95,6 @@ test("matrix page exposes profile table, phone preview, note, proxy drawer and i
95
95
  assert.match(html, /id="add-profile"/);
96
96
  assert.match(html, /class="cfg"[^]*data-role="proxy"/);
97
97
  assert.match(html, /\.row\.cfg-open \.cfg \{ display: block; \}/);
98
- assert.match(html, /panelAPI\.setProfileNote/);
99
- assert.match(html, /data-role="note"/);
100
98
  assert.match(html, /class="tg none"/);
101
99
  assert.match(html, /id="phone-preview"/);
102
100
  assert.match(html, /https:\/\/web\.telegram\.org\/k\//);