dsh-remote-plugin 0.8.1 → 0.8.2
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/apk/dsh-remote.apk +0 -0
- package/cordis.patch.yml +2 -1
- package/gateway.cjs +259 -12
- package/index.mjs +2 -2
- package/package.json +1 -1
- package/public/admin.html +8 -0
- package/public/admin.js +60 -0
- package/public/announcements.json +192 -0
- package/public/app.js +129 -23
- package/public/build.json +2 -2
- package/public/desktop/desktop.html +4 -4
- package/public/desktop/desktop.js +17 -9
- package/public/diagnostics.js +115 -21
- package/public/history.js +5 -4
- package/public/index.html +17 -13
- package/public/lan-discovery.js +94 -0
- package/public/styles.css +3 -0
- package/public/update.json +8 -8
- package/public/version.json +1 -1
- package/skills/dsh-remote-doctor/references/wiki/notifications.md +4 -0
|
@@ -195,6 +195,198 @@
|
|
|
195
195
|
"publishedAt": "2026-10-24T08:42:27.788Z",
|
|
196
196
|
"actionUrl": "https://github.com/Blank-not-black/dsh-Remote/releases/tag/v0.8.0",
|
|
197
197
|
"actionText": "下载 0.8.0 正式版"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "2026-10-26-community-cloud-development-skin-poll-reopened",
|
|
201
|
+
"title": "问卷重新开放|请再次填写,预算按三个月计算",
|
|
202
|
+
"content": "此前问卷发布后,部分设备因旧版会话缓存占满本地存储,出现公告反复弹出、历史公告和已填写状态无法保存的问题。给大家带来困扰,我们很抱歉。旧问卷已撤回,本次重新开放填写。\n\n请已经参与过的朋友也重新填写一次。本轮以重新开放后的填写结果为统计依据,之前收到的回答保留作参考,不与新一轮直接累加。\n\n预算题询问的是一个季度(三个月)的总价,每个价格选项都标注了平均每月价格;这仍是意向调查,尚未定价、不收款。旧缓存迁移、清理及公告保存异常的修复将放入下个版本。\n\n【仍反复弹出或无法保存时怎么处理?】\n\n如果仍遇到公告反复弹出或填写状态无法保存,请先打开「更多 → 关于 → 本地数据 → 清除历史缓存」,确认后重新打开问卷填写。该操作清除手机上的会话历史缓存,主机上的对话记录保留,连接地址和令牌无需重新配置。\n\n目前的清理说明是临时处理办法。下个版本将补上旧缓存迁移与回收、缓存总量控制,以及公告已读和填写状态保存失败时的兜底。当前已发布的 0.8.1 尚未包含这些修复。\n\n【云中转有什么优势?为什么调查季度预算?】\n\n我们正在筹备可选的云中转服务,目标是让不方便配置公网访问的朋友,也能在外面用手机连接自己电脑上的 DSH,查看任务、处理审批、收发消息和传输少量文件。\n\n相比额外配置组网,云中转希望提供更省心的开通和配对方式:手机通过配对地址连接,减少网络配置步骤;对于连接绕路的网络,也有机会改善响应延迟。\n\n此前一次从云服务器访问同一台电脑的对比测试中,健康检查请求的延迟中位数,Tailscale 路径约为 584ms,云中转约为 55ms,约降至原来的十分之一。 当时 Tailscale 未建立直连,而是经境外 DERP 中继;这个结果来自特定测试链路,不代表所有网络或手机端的实际体验。\n\n服务计划优先按季度(三个月)收费。预算选项是三个月合计金额,括号中的月价仅用于平均折算和比较,不代表已确定价格或支持按月付费。电脑仍需开机,DSH 和 Remote 网关仍需保持运行;云中转负责连接,不会替你运行 DSH。现有的局域网、Tailscale 和自建连接方式仍可继续使用。\n\n目前还在核实云产品的用途限制、测试方案和成本,价格、流量额度及开放时间都没有确定。本次仅收集意向,不收款,也不需要提前购买服务器。\n\n【本轮填写安排与结果公布】\n\n本轮问卷自本公告重新开放起,至 2026/11/02 11:00 截止(北京时间)。共 7 题,标有 * 的题目必填,其余可跳过。\n\n投票结束后一周内,即 2026/11/09 11:00 前公布本轮结果及后续安排。请以此次重新填写为准;旧轮回答保留作参考,统计时不会与本轮直接累加。\n\nQQ 交流群:1106138825。",
|
|
203
|
+
"summary": "此前问卷发布后,部分设备因旧版会话缓存占满本地存储,出现公告反复弹出、历史公告和已填写状态无法保存的问题。给大家带来困扰,我们很抱歉。旧问卷已撤回,本次重新开放填写。\n\n请已经参与过的朋友也重新填写一次。本轮以重新开放后的填写结果为统计依据,之前收到的回答保留作参考,不与新一轮直接累加。\n\n预算题询问的是一个季度(三个月)的总价,每个价格选项都标注了平均每月价格;这仍是意向调查,尚未定价、不收款。旧缓存迁移、清理及公告保存异常的修复将放入下个版本。",
|
|
204
|
+
"sections": [
|
|
205
|
+
{
|
|
206
|
+
"title": "仍反复弹出或无法保存时怎么处理?",
|
|
207
|
+
"content": "如果仍遇到公告反复弹出或填写状态无法保存,请先打开「更多 → 关于 → 本地数据 → 清除历史缓存」,确认后重新打开问卷填写。该操作清除手机上的会话历史缓存,主机上的对话记录保留,连接地址和令牌无需重新配置。\n\n目前的清理说明是临时处理办法。下个版本将补上旧缓存迁移与回收、缓存总量控制,以及公告已读和填写状态保存失败时的兜底。当前已发布的 0.8.1 尚未包含这些修复。",
|
|
208
|
+
"expanded": false
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"title": "云中转有什么优势?为什么调查季度预算?",
|
|
212
|
+
"content": "我们正在筹备可选的云中转服务,目标是让不方便配置公网访问的朋友,也能在外面用手机连接自己电脑上的 DSH,查看任务、处理审批、收发消息和传输少量文件。\n\n相比额外配置组网,云中转希望提供更省心的开通和配对方式:手机通过配对地址连接,减少网络配置步骤;对于连接绕路的网络,也有机会改善响应延迟。\n\n此前一次从云服务器访问同一台电脑的对比测试中,健康检查请求的延迟中位数,Tailscale 路径约为 584ms,云中转约为 55ms,约降至原来的十分之一。 当时 Tailscale 未建立直连,而是经境外 DERP 中继;这个结果来自特定测试链路,不代表所有网络或手机端的实际体验。\n\n服务计划优先按季度(三个月)收费。预算选项是三个月合计金额,括号中的月价仅用于平均折算和比较,不代表已确定价格或支持按月付费。电脑仍需开机,DSH 和 Remote 网关仍需保持运行;云中转负责连接,不会替你运行 DSH。现有的局域网、Tailscale 和自建连接方式仍可继续使用。\n\n目前还在核实云产品的用途限制、测试方案和成本,价格、流量额度及开放时间都没有确定。本次仅收集意向,不收款,也不需要提前购买服务器。",
|
|
213
|
+
"expanded": false
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"title": "本轮填写安排与结果公布",
|
|
217
|
+
"content": "本轮问卷自本公告重新开放起,至 2026/11/02 11:00 截止(北京时间)。共 7 题,标有 * 的题目必填,其余可跳过。\n\n投票结束后一周内,即 2026/11/09 11:00 前公布本轮结果及后续安排。请以此次重新填写为准;旧轮回答保留作参考,统计时不会与本轮直接累加。\n\nQQ 交流群:1106138825。",
|
|
218
|
+
"expanded": false
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"poll": {
|
|
222
|
+
"id": "community-cloud-development-skin-20261026-reopened",
|
|
223
|
+
"question": "云中转、开发方向与新皮肤意向调查(重新开放)",
|
|
224
|
+
"questions": [
|
|
225
|
+
{
|
|
226
|
+
"id": "server",
|
|
227
|
+
"type": "single",
|
|
228
|
+
"question": "1. 你是否已经拥有或可长期使用一台云服务器?",
|
|
229
|
+
"options": [
|
|
230
|
+
{
|
|
231
|
+
"id": "s1",
|
|
232
|
+
"label": "有,已经用来连接自己的 DSH。"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "s2",
|
|
236
|
+
"label": "有,但还没用来连接自己的 DSH。"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "s3",
|
|
240
|
+
"label": "没有。"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "s4",
|
|
244
|
+
"label": "不确定现有服务器是否适合。"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"id": "demand",
|
|
250
|
+
"type": "single",
|
|
251
|
+
"question": "2. 你对云中转服务的需求是?",
|
|
252
|
+
"options": [
|
|
253
|
+
{
|
|
254
|
+
"id": "d1",
|
|
255
|
+
"label": "有需求,愿意付费尝试。"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"id": "d2",
|
|
259
|
+
"label": "有需求,想先了解价格和测试体验。"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"id": "d3",
|
|
263
|
+
"label": "现在的连接方式够用,暂时不需要。"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"id": "d4",
|
|
267
|
+
"label": "还不了解,希望先看使用演示和说明。"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "budget",
|
|
273
|
+
"type": "single",
|
|
274
|
+
"required": false,
|
|
275
|
+
"question": "3. 按季度(三个月)收费,你能接受的最高季度总价在哪个范围?(括号为平均每月价格)",
|
|
276
|
+
"options": [
|
|
277
|
+
{
|
|
278
|
+
"id": "b1",
|
|
279
|
+
"label": "季度总价低于 20 元(平均每月低于约 6.67 元)"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"id": "b2",
|
|
283
|
+
"label": "季度总价 20 元至不足 30 元(平均每月约 6.67 元至不足 10 元)"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "b3",
|
|
287
|
+
"label": "季度总价 30 元至不足 40 元(平均每月 10 元至不足约 13.33 元)"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "b4",
|
|
291
|
+
"label": "季度总价 40 元及以上(平均每月约 13.33 元起)"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "b5",
|
|
295
|
+
"label": "暂不考虑付费。"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"id": "b6",
|
|
299
|
+
"label": "要先了解流量、速度和稳定性,暂时无法判断。"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"id": "direction",
|
|
305
|
+
"type": "multiple",
|
|
306
|
+
"question": "4. 下一步最希望优先改进什么?",
|
|
307
|
+
"minSelections": 1,
|
|
308
|
+
"maxSelections": 3,
|
|
309
|
+
"options": [
|
|
310
|
+
{
|
|
311
|
+
"id": "f1",
|
|
312
|
+
"label": "连接稳定性:断线恢复、切网重连和故障提示。"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "f2",
|
|
316
|
+
"label": "对话与阅读体验:长记录、流式输出、搜索和消息操作。"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"id": "f3",
|
|
320
|
+
"label": "文件使用体验:预览、上传下载、续传和传输进度。"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "f4",
|
|
324
|
+
"label": "更多 DSH 插件适配:把常用插件的功能带到手机上。"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"id": "f5",
|
|
328
|
+
"label": "后台通知:审批、提问和任务状态提醒。"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"id": "f6",
|
|
332
|
+
"label": "云中转服务:开通、连接和用量管理。"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "f7",
|
|
336
|
+
"label": "界面与交互:入口、操作效率和不同屏幕排版。"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"id": "f8",
|
|
340
|
+
"label": "其他方向,请在最后的建议栏补充。"
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"id": "skin",
|
|
346
|
+
"type": "single",
|
|
347
|
+
"required": false,
|
|
348
|
+
"question": "5. 下一款皮肤最期待哪个 IP?",
|
|
349
|
+
"options": [
|
|
350
|
+
{
|
|
351
|
+
"id": "p1",
|
|
352
|
+
"label": "《孤独摇滚!》"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"id": "p2",
|
|
356
|
+
"label": "《明日方舟》"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"id": "p3",
|
|
360
|
+
"label": "《明日方舟:终末地》"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"id": "p4",
|
|
364
|
+
"label": "其他 IP,请在下一题填写。"
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"id": "other-ip",
|
|
370
|
+
"type": "text",
|
|
371
|
+
"required": false,
|
|
372
|
+
"maxLength": 100,
|
|
373
|
+
"question": "6. 还有哪个 IP 是你想看到的?",
|
|
374
|
+
"placeholder": "选择“其他 IP”的朋友,可填写作品名称+期待的角色。"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"id": "suggestion",
|
|
378
|
+
"type": "text",
|
|
379
|
+
"required": false,
|
|
380
|
+
"maxLength": 300,
|
|
381
|
+
"question": "7. 还有什么想告诉我们?",
|
|
382
|
+
"placeholder": "想适配的插件与功能、皮肤配色建议,或最影响使用的问题。"
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
"minVersion": "0.8.0",
|
|
387
|
+
"maxVersion": "",
|
|
388
|
+
"publishedAt": "2026-10-26T06:28:38.293Z",
|
|
389
|
+
"expiresAt": "2026-11-02T03:00:00.000Z"
|
|
198
390
|
}
|
|
199
391
|
]
|
|
200
392
|
}
|
package/public/app.js
CHANGED
|
@@ -11,7 +11,7 @@ const DIRECT_POLL_FEEDBACK_URL = 'https://vm-0-2-ubuntu.tail1f6fc4.ts.net/submit
|
|
|
11
11
|
/* ---------------- 状态 ---------------- */
|
|
12
12
|
const LS = {
|
|
13
13
|
get(k, d) { try { return localStorage.getItem(k) ?? d } catch { return d } },
|
|
14
|
-
set(k, v) { try { localStorage.setItem(k, v) } catch {} },
|
|
14
|
+
set(k, v) { try { localStorage.setItem(k, v); return true } catch(error) { try { globalThis.DshDiagnostics?.storageFailure(k,error) } catch {} return false } },
|
|
15
15
|
del(k) { try { localStorage.removeItem(k) } catch {} }
|
|
16
16
|
}
|
|
17
17
|
const CLIENT_ID = (() => {
|
|
@@ -407,14 +407,16 @@ function closeFeedbackSuccess() {
|
|
|
407
407
|
$('btn-feedback')?.focus()
|
|
408
408
|
}
|
|
409
409
|
async function loadCrashPreview() {
|
|
410
|
+
const generation=loadCrashPreview.generation=(loadCrashPreview.generation||0)+1
|
|
410
411
|
const connection=captureConnection(),preview=$('fb-crash-preview')
|
|
411
412
|
preview.textContent=t('feedback.crashLoading')
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
413
|
+
const selected=$('fb-include-diagnostics').checked,crashes=$('fb-include-crashes').checked
|
|
414
|
+
if(!selected&&!crashes){preview.textContent=I18N.lang==='en'?'Select a log option above to preview the attachment.':'勾选上方日志选项后,可在这里预览拟上传的附件。';return}
|
|
415
|
+
const read=async route=>{try{const response=await fetch(updateBase()+route,{headers:{authorization:'Bearer '+connection.token},signal:AbortSignal.timeout(5000),cache:'no-store'});if(!response.ok)throw Error();return await response.json()}catch{return {unavailable:true}}}
|
|
416
|
+
const evidence={}
|
|
417
|
+
if(selected){evidence.client=globalThis.DshDiagnostics?.report();evidence.gateway=await read('/diagnostics')}
|
|
418
|
+
if(crashes){const data=await read('/crash-logs');evidence.crashes=data.upload||data}
|
|
419
|
+
if(connection.valid()&&generation===loadCrashPreview.generation)preview.textContent=JSON.stringify(evidence,null,2)
|
|
418
420
|
}
|
|
419
421
|
async function submitFeedback() {
|
|
420
422
|
const type = state.feedbackType || 'bug'
|
|
@@ -422,6 +424,7 @@ async function submitFeedback() {
|
|
|
422
424
|
const contact = $('fb-contact').value.trim()
|
|
423
425
|
const includeDiagnostics = $('fb-include-diagnostics').checked
|
|
424
426
|
const includeCrashLogs = $('fb-include-crashes').checked
|
|
427
|
+
const clientDiagnostics=includeDiagnostics?globalThis.DshDiagnostics?.report():null
|
|
425
428
|
if (!message) { toast(t('feedback.empty'), 'err'); return }
|
|
426
429
|
if (message.length > 2000) { toast(t('feedback.tooLong'), 'err'); return }
|
|
427
430
|
const btn = $('fb-submit')
|
|
@@ -433,12 +436,16 @@ async function submitFeedback() {
|
|
|
433
436
|
const res = await fetch(base + '/feedback', {
|
|
434
437
|
method: 'POST',
|
|
435
438
|
headers: { 'content-type': 'application/json', authorization: 'Bearer ' + state.token },
|
|
436
|
-
body: JSON.stringify({ type, message, contact, appVersion: state.localVersion, includeDiagnostics, includeCrashLogs })
|
|
439
|
+
body: JSON.stringify({ type, message, contact, appVersion: state.localVersion, includeDiagnostics, includeCrashLogs,...(clientDiagnostics?{clientDiagnostics}:{}) })
|
|
437
440
|
})
|
|
438
441
|
diagnostic?.end({phase:res.ok?'complete':'failed',httpStatus:res.status})
|
|
439
442
|
let json = {}
|
|
440
443
|
try { json = await res.json() } catch {}
|
|
441
|
-
if (res.ok && json.ok) { closeFeedbackModal(); openFeedbackSuccess()
|
|
444
|
+
if (res.ok && json.ok) { closeFeedbackModal(); openFeedbackSuccess()
|
|
445
|
+
const status=$('feedback-diagnostics-status'),saved=json.diagnostics?.saved===true&&json.diagnostics.reportId===clientDiagnostics?.reportId
|
|
446
|
+
status.textContent=clientDiagnostics?(saved?(I18N.lang==='en'?'Diagnostic report saved. ID: ':'诊断日志已保存,编号:')+clientDiagnostics.reportId:(I18N.lang==='en'?'Feedback received, but the server did not confirm the complete diagnostic report. Copy or export the local log to supplement it.':'反馈已收到,但服务器未确认完整诊断日志已保存。请复制或导出本地日志补充。')):''
|
|
447
|
+
status.classList.toggle('hidden',!clientDiagnostics)
|
|
448
|
+
}
|
|
442
449
|
else if (res.status === 429) { toast(json.retryAfter ? t('feedback.rateLimitedAt', { n: json.retryAfter }) : t('feedback.rateLimited'), 'err') }
|
|
443
450
|
else { toast(t('feedback.submitFailed', { msg: json.error || res.status }), 'err') }
|
|
444
451
|
} catch(error) {
|
|
@@ -1533,6 +1540,16 @@ async function pollKind(kind, cancellation) {
|
|
|
1533
1540
|
if (state.current) void resyncCurrentSession()
|
|
1534
1541
|
}
|
|
1535
1542
|
if (data.epoch) cursors[kind + 'Epoch'] = data.epoch
|
|
1543
|
+
// The fallback poll may contain a request and its resolution together. Seed
|
|
1544
|
+
// native tombstones first, including before the pending baseline is replayed.
|
|
1545
|
+
if (kind === 'mux' && typeof window !== 'undefined' && window.NativeBackground?.handlePendingEvent) {
|
|
1546
|
+
for (const item of data.events) {
|
|
1547
|
+
const payload = item.event?.payload
|
|
1548
|
+
if (item.seq > (reset ? 0 : since) && ['approval/resolved', 'question/resolved'].includes(payload?.type)) {
|
|
1549
|
+
window.NativeBackground.handlePendingEvent(bgBase(), state.token || '', JSON.stringify(item.event), false)
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1536
1553
|
for (const frame of data.baseline || []) { if (kind === 'mux') onMuxFrame(frame); else onHostFrame(frame) }
|
|
1537
1554
|
for (const item of data.events) {
|
|
1538
1555
|
if (item.seq > (state.pollSeq[kind] || 0)) {
|
|
@@ -1654,6 +1671,7 @@ function onMuxFrame(full) {
|
|
|
1654
1671
|
function onHostFrame(full) {
|
|
1655
1672
|
const f = full.payload
|
|
1656
1673
|
if (!f) return
|
|
1674
|
+
if (['host/session-status', 'host/agent-error'].includes(f.type) && typeof window !== 'undefined' && window.NativeBackground?.handleTaskEvent) window.NativeBackground.handleTaskEvent(bgBase(), state.token || '', JSON.stringify(full), f.replay === true)
|
|
1657
1675
|
if (['host/session-added', 'host/session-removed', 'host/workspace-changed', 'host/workspace-removed', 'host/workspace-order-changed', 'host/archived-sessions-changed'].includes(f.type)) return scheduleRefresh()
|
|
1658
1676
|
if (f.type === 'host/session-activity') {
|
|
1659
1677
|
const session = state.byId.get(f.sessionId)
|
|
@@ -1799,6 +1817,7 @@ function observeCompactionEvent(sessionId, event, meta = {}) {
|
|
|
1799
1817
|
|
|
1800
1818
|
function onSessionEvent(sessionId, event, meta = {}) {
|
|
1801
1819
|
if (!event) return
|
|
1820
|
+
if (['agent/status', 'agent/error', 'turn/start', 'turn/end', 'goal/completed'].includes(event.type) && typeof window !== 'undefined' && window.NativeBackground?.handleTaskEvent) window.NativeBackground.handleTaskEvent(bgBase(), state.token || '', JSON.stringify({ payload: { sessionId, event } }), meta.replay === true)
|
|
1802
1821
|
const s = state.byId.get(sessionId)
|
|
1803
1822
|
observeCompactionEvent(sessionId, event, meta)
|
|
1804
1823
|
if (event.type === 'turn/start' || event.type === 'turn/end') {
|
|
@@ -5408,9 +5427,61 @@ const ANNOUNCEMENTS_POLL_MS = 30 * 1000
|
|
|
5408
5427
|
let announcementCheckPromise = null
|
|
5409
5428
|
let announcementPollTimer = null
|
|
5410
5429
|
let announcementPollingStarted = false
|
|
5430
|
+
// LS.set silently tolerates quota/security errors. Keep failed writes available to
|
|
5431
|
+
// the UI, and use sessionStorage so a page reload can retain the acknowledgement.
|
|
5432
|
+
const announcementStorageFallback = new Map()
|
|
5433
|
+
function clearAnnouncementFallback(key) {
|
|
5434
|
+
announcementStorageFallback.delete(key)
|
|
5435
|
+
try { sessionStorage.removeItem(key) } catch {}
|
|
5436
|
+
}
|
|
5437
|
+
function readAnnouncementStorage(key, fallback) {
|
|
5438
|
+
const saved = LS.get(key, null)
|
|
5439
|
+
let pending = announcementStorageFallback.get(key)
|
|
5440
|
+
if (!pending) {
|
|
5441
|
+
try { pending = JSON.parse(sessionStorage.getItem(key) || 'null') } catch {}
|
|
5442
|
+
if (!pending || typeof pending.value !== 'string' || !(pending.previous === null || typeof pending.previous === 'string')) pending = null
|
|
5443
|
+
}
|
|
5444
|
+
if (pending) {
|
|
5445
|
+
// Honor a newer persistent value written by another page, including recovery
|
|
5446
|
+
// of our own failed write. A blocked read may still return null.
|
|
5447
|
+
if (saved !== null && saved !== pending.previous) {
|
|
5448
|
+
clearAnnouncementFallback(key)
|
|
5449
|
+
return saved
|
|
5450
|
+
}
|
|
5451
|
+
announcementStorageFallback.set(key, pending)
|
|
5452
|
+
return pending.value
|
|
5453
|
+
}
|
|
5454
|
+
return saved ?? fallback
|
|
5455
|
+
}
|
|
5456
|
+
function writeAnnouncementStorage(key, value) {
|
|
5457
|
+
try { LS.set(key, value) } catch {}
|
|
5458
|
+
const saved = LS.get(key, null)
|
|
5459
|
+
if (saved === value) {
|
|
5460
|
+
clearAnnouncementFallback(key)
|
|
5461
|
+
return
|
|
5462
|
+
}
|
|
5463
|
+
const pending = { previous: saved, value }
|
|
5464
|
+
const alreadyFailed = announcementStorageFallback.has(key)
|
|
5465
|
+
announcementStorageFallback.set(key, pending)
|
|
5466
|
+
let backend = 'memory'
|
|
5467
|
+
try {
|
|
5468
|
+
sessionStorage.setItem(key, JSON.stringify(pending))
|
|
5469
|
+
backend = 'session'
|
|
5470
|
+
} catch {}
|
|
5471
|
+
if (!alreadyFailed) globalThis.DshDiagnostics?.record('announcement.storage', {
|
|
5472
|
+
phase: 'failed', storageBackend: backend,
|
|
5473
|
+
storageKey: key === ANNOUNCEMENTS_KEY ? 'seen' : key === ANNOUNCEMENT_HISTORY_KEY ? 'history' : 'votes'
|
|
5474
|
+
})
|
|
5475
|
+
}
|
|
5476
|
+
function resetAnnouncementStorage() {
|
|
5477
|
+
for (const key of [ANNOUNCEMENTS_KEY, ANNOUNCEMENT_HISTORY_KEY, ANNOUNCEMENT_VOTES_KEY]) {
|
|
5478
|
+
LS.del(key)
|
|
5479
|
+
clearAnnouncementFallback(key)
|
|
5480
|
+
}
|
|
5481
|
+
}
|
|
5411
5482
|
function readSeenAnnouncements() {
|
|
5412
5483
|
try {
|
|
5413
|
-
const value = JSON.parse(
|
|
5484
|
+
const value = JSON.parse(readAnnouncementStorage(ANNOUNCEMENTS_KEY, '{}'))
|
|
5414
5485
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : {}
|
|
5415
5486
|
} catch { return {} }
|
|
5416
5487
|
}
|
|
@@ -5425,13 +5496,13 @@ function markAnnouncementsSeen(items) {
|
|
|
5425
5496
|
keys.sort((a, b) => Number(seen[a]) - Number(seen[b]))
|
|
5426
5497
|
for (const key of keys.slice(0, keys.length - 100)) delete seen[key]
|
|
5427
5498
|
}
|
|
5428
|
-
|
|
5499
|
+
writeAnnouncementStorage(ANNOUNCEMENTS_KEY, JSON.stringify(seen))
|
|
5429
5500
|
renderAnnouncementBoard()
|
|
5430
5501
|
}
|
|
5431
5502
|
function markAnnouncementSeen(id) { markAnnouncementsSeen([id]) }
|
|
5432
5503
|
function readAnnouncementVotes() {
|
|
5433
5504
|
try {
|
|
5434
|
-
const value = JSON.parse(
|
|
5505
|
+
const value = JSON.parse(readAnnouncementStorage(ANNOUNCEMENT_VOTES_KEY, '{}'))
|
|
5435
5506
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : {}
|
|
5436
5507
|
} catch { return {} }
|
|
5437
5508
|
}
|
|
@@ -5446,7 +5517,7 @@ function storeAnnouncementVote(announcementId, pollId, optionId) {
|
|
|
5446
5517
|
keys.sort((a, b) => Number(votes[a]?.votedAt || 0) - Number(votes[b]?.votedAt || 0))
|
|
5447
5518
|
for (const key of keys.slice(0, keys.length - 100)) delete votes[key]
|
|
5448
5519
|
}
|
|
5449
|
-
|
|
5520
|
+
writeAnnouncementStorage(ANNOUNCEMENT_VOTES_KEY, JSON.stringify(votes))
|
|
5450
5521
|
renderAnnouncementBoard()
|
|
5451
5522
|
}
|
|
5452
5523
|
function announcementVote(item) {
|
|
@@ -5461,7 +5532,7 @@ function announcementVote(item) {
|
|
|
5461
5532
|
}
|
|
5462
5533
|
function readAnnouncementHistory() {
|
|
5463
5534
|
try {
|
|
5464
|
-
const value = JSON.parse(
|
|
5535
|
+
const value = JSON.parse(readAnnouncementStorage(ANNOUNCEMENT_HISTORY_KEY, '[]'))
|
|
5465
5536
|
return Array.isArray(value) ? value.filter(item => item && typeof item.id === 'string') : []
|
|
5466
5537
|
} catch { return [] }
|
|
5467
5538
|
}
|
|
@@ -5469,7 +5540,7 @@ function storeAnnouncementHistory(items) {
|
|
|
5469
5540
|
const merged = new Map(readAnnouncementHistory().map(item => [item.id, item]))
|
|
5470
5541
|
for (const item of items) if (item?.id) merged.set(item.id, item)
|
|
5471
5542
|
const list = [...merged.values()].sort((a, b) => Number(b.publishedAt || 0) - Number(a.publishedAt || 0)).slice(0, 50)
|
|
5472
|
-
|
|
5543
|
+
writeAnnouncementStorage(ANNOUNCEMENT_HISTORY_KEY, JSON.stringify(list))
|
|
5473
5544
|
return list
|
|
5474
5545
|
}
|
|
5475
5546
|
function announcementBoardItems() {
|
|
@@ -5664,6 +5735,7 @@ function openAnnouncementModal(items, index = 0) {
|
|
|
5664
5735
|
state.announcementIndex = Math.max(0, Math.min(Number(index) || 0, list.length - 1))
|
|
5665
5736
|
renderAnnouncementModal()
|
|
5666
5737
|
$('modal-announcement').classList.remove('hidden')
|
|
5738
|
+
globalThis.DshDiagnostics?.record('announcement.show',{phase:'shown',announcementId:state.announcement?.id,count:list.length})
|
|
5667
5739
|
}
|
|
5668
5740
|
function showAnnouncementAt(index) {
|
|
5669
5741
|
if (!state.announcementItems.length) return
|
|
@@ -5685,6 +5757,7 @@ async function submitAnnouncementVote() {
|
|
|
5685
5757
|
const message = forms ? forms.encode(item.id, poll.id, answer) : `Poll ${poll.id}: ${option.id}`
|
|
5686
5758
|
if (!message) return toast(I18N.lang === 'en' ? 'Answers are too long. Please shorten them.' : '回答总长度过长,请适当精简。', 'err')
|
|
5687
5759
|
const button = $('announcement-poll-submit')
|
|
5760
|
+
const diagnostic=globalThis.DshDiagnostics?.start('announcement.vote',{announcementId:item.id,count:poll.questions?.length||1})
|
|
5688
5761
|
button.disabled = true
|
|
5689
5762
|
const connection = captureConnection(), valid = () => connection.valid() && state.announcement === item
|
|
5690
5763
|
state.announcementSubmitting = true
|
|
@@ -5717,21 +5790,25 @@ async function submitAnnouncementVote() {
|
|
|
5717
5790
|
})
|
|
5718
5791
|
data = await res.json().catch(() => ({}))
|
|
5719
5792
|
}
|
|
5720
|
-
if (!connection.valid()) return
|
|
5793
|
+
if (!connection.valid()) { diagnostic?.end({phase:'skipped',reason:'unavailable'}); return }
|
|
5721
5794
|
if (res?.ok && data.ok) {
|
|
5722
5795
|
storeAnnouncementVote(item.id, poll.id, answer.optionId || '')
|
|
5723
5796
|
markAnnouncementSeen(item.id)
|
|
5797
|
+
diagnostic?.end({phase:'complete',httpStatus:res.status})
|
|
5724
5798
|
if (valid()) renderAnnouncementPoll(item)
|
|
5725
5799
|
renderAnnouncementHistory()
|
|
5726
5800
|
toast(poll.legacy === false ? (I18N.lang === 'en' ? 'Submitted successfully' : '已成功提交') : t('announcement.voteThanks', { option: option.label }), 'ok')
|
|
5727
5801
|
} else if (res?.status === 429) {
|
|
5802
|
+
diagnostic?.end({phase:'failed',httpStatus:res.status})
|
|
5728
5803
|
toast(t('announcement.voteAgainLater'), 'err')
|
|
5729
5804
|
button.disabled = false
|
|
5730
5805
|
} else {
|
|
5806
|
+
diagnostic?.end({phase:'failed',httpStatus:res?.status||0})
|
|
5731
5807
|
toast(t('announcement.voteFailed', { msg: data.error || res?.status || t('announcement.voteNetworkError') }), 'err')
|
|
5732
5808
|
button.disabled = false
|
|
5733
5809
|
}
|
|
5734
5810
|
} catch (e) {
|
|
5811
|
+
diagnostic?.fail(e)
|
|
5735
5812
|
if (valid()) toast(t('announcement.voteFailed', { msg: e.message || t('announcement.voteNetworkError') }), 'err')
|
|
5736
5813
|
button.disabled = false
|
|
5737
5814
|
} finally {
|
|
@@ -5744,6 +5821,7 @@ async function submitAnnouncementVote() {
|
|
|
5744
5821
|
}
|
|
5745
5822
|
function closeAnnouncement(markSeen) {
|
|
5746
5823
|
if (markSeen) markAnnouncementsSeen(state.announcementItems)
|
|
5824
|
+
globalThis.DshDiagnostics?.record('announcement.close',{phase:markSeen?'acknowledged':'dismissed',announcementId:state.announcement?.id,count:state.announcementItems.length})
|
|
5747
5825
|
state.announcement = null
|
|
5748
5826
|
state.announcementItems = []
|
|
5749
5827
|
state.announcementIndex = 0
|
|
@@ -5752,13 +5830,14 @@ function closeAnnouncement(markSeen) {
|
|
|
5752
5830
|
async function fetchAnnouncements() {
|
|
5753
5831
|
const base = updateBase()
|
|
5754
5832
|
if (!base || !state.localVersion || isAppVersionWarningOpen()) return false
|
|
5833
|
+
const diagnostic=globalThis.DshDiagnostics?.start('announcement.fetch')
|
|
5755
5834
|
try {
|
|
5756
5835
|
const signal = typeof AbortSignal?.timeout === 'function' ? AbortSignal.timeout(8000) : undefined
|
|
5757
5836
|
const url = base + '/announcements.json?t=' + Date.now()
|
|
5758
5837
|
const res = signal ? await fetch(url, { cache: 'no-store', signal }) : await fetch(url, { cache: 'no-store' })
|
|
5759
|
-
if (!res.ok) return false
|
|
5838
|
+
if (!res.ok) { diagnostic?.end({phase:'failed',httpStatus:res.status,reason:'http'}); return false }
|
|
5760
5839
|
const raw = await res.text()
|
|
5761
|
-
if (raw.length > 512 * 1024) return false
|
|
5840
|
+
if (raw.length > 512 * 1024) { diagnostic?.end({phase:'failed',reason:'too-large'}); return false }
|
|
5762
5841
|
const data = JSON.parse(raw)
|
|
5763
5842
|
const source = Array.isArray(data) ? data : (Array.isArray(data?.items) ? data.items : [data])
|
|
5764
5843
|
const normalized = source.map(item => normalizeAnnouncement(item, base)).filter(Boolean)
|
|
@@ -5769,10 +5848,11 @@ async function fetchAnnouncements() {
|
|
|
5769
5848
|
const items = normalized.filter(item => !seen[item.id])
|
|
5770
5849
|
.sort((a, b) => b.publishedAt - a.publishedAt)
|
|
5771
5850
|
// 新旧界面均提示未读公告;拉取期间新出现的版本提醒仍优先展示。
|
|
5772
|
-
if (!items.length || state.announcement || isAppVersionWarningOpen()) return false
|
|
5851
|
+
if (!items.length || state.announcement || isAppVersionWarningOpen()) { diagnostic?.end({phase:'skipped',count:items.length,reason:state.announcement?'already-open':isAppVersionWarningOpen()?'version-warning':'already-read'}); return false }
|
|
5773
5852
|
openAnnouncementModal(items)
|
|
5853
|
+
diagnostic?.end({phase:'received',count:items.length,httpStatus:res.status})
|
|
5774
5854
|
return true
|
|
5775
|
-
} catch { return false }
|
|
5855
|
+
} catch(error) { diagnostic?.fail(error); return false }
|
|
5776
5856
|
}
|
|
5777
5857
|
|
|
5778
5858
|
function checkAnnouncements() {
|
|
@@ -6153,6 +6233,14 @@ function notify(title, body) {
|
|
|
6153
6233
|
}
|
|
6154
6234
|
|
|
6155
6235
|
async function sendTestNotification() {
|
|
6236
|
+
if (window.NativeBackground?.testNotification) {
|
|
6237
|
+
if (!await ensureNotify()) return toast(t('settings.notifyDenied'), 'err')
|
|
6238
|
+
const kind = $('test-notify-kind')?.value || 'approval'
|
|
6239
|
+
const sent = window.NativeBackground.testNotification(kind)
|
|
6240
|
+
applyBgConfigFromNative()
|
|
6241
|
+
toast(sent ? (I18N.lang === 'en' ? 'Test notification submitted. Check the selected system channel.' : '测试通知已提交,请检查所选系统通知渠道。') : t('settings.notifyDenied'), sent ? 'ok' : 'err')
|
|
6242
|
+
return
|
|
6243
|
+
}
|
|
6156
6244
|
if (!CAP?.isNativePlatform?.()) {
|
|
6157
6245
|
toast(t('settings.testNotifyUnavailable'), 'err')
|
|
6158
6246
|
return
|
|
@@ -6199,6 +6287,11 @@ function applyBgConfigFromNative() {
|
|
|
6199
6287
|
status.textContent = cfg.loginExpired ? t('settings.bgAuthFailed') : cfg.enabled && cfg.serviceRunning === false
|
|
6200
6288
|
? (I18N.lang === 'en' ? 'Background receiver is not running. Reopen the app or toggle to retry. ' : '后台接收未运行,返回应用或重新开关后重试。') + (cfg.serviceState || '')
|
|
6201
6289
|
: cfg.enabled && cfg.serviceRunning === true ? (I18N.lang === 'en' ? 'Background receiver is running.' : '后台接收运行中。') + (cfg.lastSuccessAt ? ' ' + new Date(cfg.lastSuccessAt).toLocaleTimeString() : '') : ''
|
|
6290
|
+
const blocked = []
|
|
6291
|
+
if (cfg.notificationsEnabled === false) blocked.push(I18N.lang === 'en' ? 'System notifications disabled' : '系统通知已关闭')
|
|
6292
|
+
if (cfg.attentionChannelEnabled === false) blocked.push(I18N.lang === 'en' ? 'Approval channel disabled' : '审批提醒渠道已关闭')
|
|
6293
|
+
if (cfg.taskChannelEnabled === false) blocked.push(I18N.lang === 'en' ? 'Task result channel disabled' : '任务结果渠道已关闭')
|
|
6294
|
+
if (blocked.length) status.textContent = [status.textContent, ...blocked].filter(Boolean).join(' · ')
|
|
6202
6295
|
status.classList.toggle('hidden', !status.textContent)
|
|
6203
6296
|
}
|
|
6204
6297
|
} catch {}
|
|
@@ -6214,7 +6307,7 @@ function saveBgConfig(enabled) {
|
|
|
6214
6307
|
return saved
|
|
6215
6308
|
}
|
|
6216
6309
|
function syncBgConfig() {
|
|
6217
|
-
if (
|
|
6310
|
+
if (state.token && bgBridge()?.saveBackgroundConfig) saveBgConfig(!!$('opt-bg-poll')?.checked)
|
|
6218
6311
|
void syncPeakReminders()
|
|
6219
6312
|
}
|
|
6220
6313
|
|
|
@@ -7871,6 +7964,8 @@ function bindUi() {
|
|
|
7871
7964
|
$('home-doctor').addEventListener('click', openDoctor)
|
|
7872
7965
|
$('fb-cancel').addEventListener('click', closeFeedbackModal)
|
|
7873
7966
|
$('fb-submit').addEventListener('click', submitFeedback)
|
|
7967
|
+
$('fb-include-diagnostics').addEventListener('change',()=>{void loadCrashPreview()})
|
|
7968
|
+
$('fb-include-crashes').addEventListener('change',()=>{void loadCrashPreview()})
|
|
7874
7969
|
$('feedback-success-confirm').addEventListener('click', closeFeedbackSuccess)
|
|
7875
7970
|
$('modal-feedback-success').addEventListener('click', (e) => {
|
|
7876
7971
|
if (e.target === $('modal-feedback-success')) closeFeedbackSuccess()
|
|
@@ -8075,6 +8170,14 @@ function bindUi() {
|
|
|
8075
8170
|
})
|
|
8076
8171
|
$('btn-server-speed').addEventListener('click', () => selectFastestServer({ silent: false }))
|
|
8077
8172
|
$('btn-server-add').addEventListener('click', addServer)
|
|
8173
|
+
window.DshLanDiscovery?.mount($('btn-lan-discover'), result => {
|
|
8174
|
+
const url = new URL('dshremote://pair')
|
|
8175
|
+
url.searchParams.set('server', result.server); url.searchParams.set('token', result.token)
|
|
8176
|
+
if (!applyPairUrl(url.href)) return toast(t('send.failed'), 'err')
|
|
8177
|
+
const server = state.servers.find(entry => entry.url === result.server && entry.token === result.token)
|
|
8178
|
+
if (server) { server.note = String(result.name || '').slice(0, 40); saveServers(); renderServers() }
|
|
8179
|
+
openStreams(); toast(t('scan.paired'), 'ok')
|
|
8180
|
+
})
|
|
8078
8181
|
$('btn-group-add').addEventListener('click', addGroup)
|
|
8079
8182
|
$('group-select-btn').addEventListener('click', (e) => { e.stopPropagation(); toggleGroupMenu() })
|
|
8080
8183
|
$('group-drawer-trigger').addEventListener('click', () => { groupDrawerOpen() ? closeGroupDrawer() : openGroupDrawer() })
|
|
@@ -8117,7 +8220,7 @@ function bindUi() {
|
|
|
8117
8220
|
if (!confirm(t('settings.confirmReset'))) return
|
|
8118
8221
|
clearTimeout(scheduleHistoryCacheSave._t)
|
|
8119
8222
|
await window.DshHistory.cacheClear()
|
|
8120
|
-
LS.del('token'); LS.del('notify'); LS.del('server'); LS.del('mobileEnterAction'); LS.del('steerSendingEnabled'); LS.del('busySendMode');
|
|
8223
|
+
LS.del('token'); LS.del('notify'); LS.del('server'); LS.del('mobileEnterAction'); LS.del('steerSendingEnabled'); LS.del('busySendMode'); resetAnnouncementStorage()
|
|
8121
8224
|
if (bgBridge()?.saveBackgroundConfig) saveBgConfig(false)
|
|
8122
8225
|
location.reload()
|
|
8123
8226
|
})
|
|
@@ -8187,7 +8290,8 @@ function bindUi() {
|
|
|
8187
8290
|
$('bg-interval').addEventListener('change', () => {
|
|
8188
8291
|
if ($('opt-bg-poll')?.checked) saveBgConfig(true)
|
|
8189
8292
|
})
|
|
8190
|
-
$('opt-task-done')?.addEventListener('change',
|
|
8293
|
+
$('opt-task-done')?.addEventListener('change', async event => {
|
|
8294
|
+
if (event.target.checked && !await ensureNotify()) { event.target.checked = false; toast(t('settings.notifyDenied'), 'err') }
|
|
8191
8295
|
if (bgBridge()?.saveBackgroundConfig) saveBgConfig($('opt-bg-poll')?.checked)
|
|
8192
8296
|
})
|
|
8193
8297
|
renderPresets()
|
|
@@ -8245,6 +8349,7 @@ window.addEventListener('dsh-native-insets', applyNativeInsets)
|
|
|
8245
8349
|
async function boot() {
|
|
8246
8350
|
initToken()
|
|
8247
8351
|
bindUi()
|
|
8352
|
+
syncBgConfig()
|
|
8248
8353
|
renderAnnouncementBoard()
|
|
8249
8354
|
renderLangBtn()
|
|
8250
8355
|
bindNativeBack()
|
|
@@ -8385,6 +8490,7 @@ async function clearWorkflowData(kind) {
|
|
|
8385
8490
|
await cancelPeakReminders()
|
|
8386
8491
|
clearTimeout(scheduleHistoryCacheSave._t)
|
|
8387
8492
|
await window.DshHistory.cacheClear()
|
|
8493
|
+
resetAnnouncementStorage()
|
|
8388
8494
|
window.DshWorkflow.clearStorage()
|
|
8389
8495
|
location.reload()
|
|
8390
8496
|
}
|
package/public/build.json
CHANGED
|
@@ -437,10 +437,10 @@
|
|
|
437
437
|
</div>
|
|
438
438
|
<textarea id="fb-msg" class="ds-fb-textarea" rows="5" maxlength="2000" data-i18n-placeholder="ds.feedbackMessagePlaceholder" placeholder="请描述遇到的问题或建议(必填,≤2000 字)"></textarea>
|
|
439
439
|
<input id="fb-contact" class="ds-fb-input" maxlength="200" data-i18n-placeholder="ds.feedbackContactPlaceholder" placeholder="联系方式(可选):邮箱 / 微信 / B站 ID">
|
|
440
|
-
<label class="ds-fb-diagnostics"><input id="fb-include-diagnostics" type="checkbox"> <span data-i18n="ds.feedbackIncludeDiagnostics"
|
|
440
|
+
<label class="ds-fb-diagnostics"><input id="fb-include-diagnostics" type="checkbox"> <span data-i18n="ds.feedbackIncludeDiagnostics">附带客户端与网关诊断(可选)</span><small data-i18n="ds.feedbackDiagnosticsPrivacy">上传客户端操作与错误位置、存储占用、版本和网关链路状态;不含令牌、Cookie、对话正文、答案或完整路径。可在下方预览。</small></label>
|
|
441
441
|
<label class="ds-fb-diagnostics"><input id="fb-include-crashes" type="checkbox"> <span data-i18n="ds.feedbackIncludeCrashes">附带崩溃日志摘要(可选)</span><small data-i18n="ds.feedbackCrashPrivacy">默认仅在本机记录。勾选后上传最近 3 条退出、重启和错误位置摘要,不含对话、密钥或完整路径。</small></label>
|
|
442
442
|
<section class="client-diagnostics" aria-label="操作诊断日志">
|
|
443
|
-
<p data-log-label="privacy"
|
|
443
|
+
<p data-log-label="privacy">操作日志默认保存在此设备。提交反馈时勾选诊断选项可附带脱敏日志,也可复制或导出。</p>
|
|
444
444
|
<details id="fb-client-log-details"><summary data-log-label="details">查看操作诊断日志</summary><pre id="fb-client-log-preview"></pre></details>
|
|
445
445
|
<div class="client-log-actions"><button id="fb-log-preview" type="button" data-log-label="refresh">刷新预览</button><button id="fb-log-copy" type="button" data-log-label="copy">复制日志</button><button id="fb-log-export" type="button" data-log-label="export">导出日志</button><button id="fb-log-clear" type="button" data-log-label="clear">清除日志</button></div>
|
|
446
446
|
<p id="fb-client-log-status" role="status" aria-live="polite"></p>
|
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
'ds.feedbackDoctor': 'AI 排查问题', 'ds.feedbackDoctorDesc': '使用你的 DSH 和模型,只读诊断',
|
|
625
625
|
'ds.feedbackBiliDesc': 'UP 动态页交流', 'ds.feedbackCopyLink': '复制项目链接', 'ds.feedbackCopyDesc': '手动分享给朋友',
|
|
626
626
|
'ds.feedbackCopied': '项目链接已复制', 'ds.feedbackCopyFailed': '复制失败,请手动复制',
|
|
627
|
-
'ds.feedbackWrite': '写反馈', 'ds.feedbackWriteDesc': 'App 内直接提交', 'ds.feedbackModalTitle': '写反馈', 'ds.feedbackIncludeDiagnostics': '
|
|
627
|
+
'ds.feedbackWrite': '写反馈', 'ds.feedbackWriteDesc': 'App 内直接提交', 'ds.feedbackModalTitle': '写反馈', 'ds.feedbackIncludeDiagnostics': '附带客户端与网关诊断(可选)', 'ds.feedbackDiagnosticsPrivacy': '上传客户端操作与错误位置、存储占用、版本和网关链路状态;不含令牌、Cookie、对话正文、答案或完整路径。可在下方预览。', 'ds.feedbackIncludeCrashes': '附带崩溃日志摘要(可选)', 'ds.feedbackCrashPrivacy': '默认仅在本机记录。勾选后上传最近 3 条退出、重启和错误位置摘要,不含对话、密钥或完整路径。', 'ds.feedbackCrashPreview': '查看拟上传的日志摘要', 'ds.feedbackCrashLoading': '读取本机日志…', 'ds.feedbackCrashUnavailable': '当前网关暂时无法读取日志,请更新网关或稍后重试。',
|
|
628
628
|
'ds.feedbackTypeBug': 'Bug', 'ds.feedbackTypeSuggestion': '建议', 'ds.feedbackTypeOther': '其他',
|
|
629
629
|
'ds.feedbackMessagePlaceholder': '请描述遇到的问题或建议(必填,≤2000 字)',
|
|
630
630
|
'ds.feedbackContactPlaceholder': '联系方式(可选):邮箱 / 微信 / B站 ID',
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
'ds.feedbackBiliDesc': 'Chat on the UP\'s Bilibili page', 'ds.feedbackCopyLink': 'Copy project link', 'ds.feedbackCopyDesc': 'Share it manually',
|
|
755
755
|
'ds.feedbackCopied': 'Project link copied', 'ds.feedbackCopyFailed': 'Copy failed, copy manually',
|
|
756
756
|
'ds.contributors': 'Contributors', 'ds.contributorsThanks': 'Thank you to everyone who helps make DSH Remote better.', 'ds.contributorsAll': 'View all contributions ↗',
|
|
757
|
-
'ds.feedbackWrite': 'Write feedback', 'ds.feedbackWriteDesc': 'Submit from the app', 'ds.feedbackModalTitle': 'Write feedback', 'ds.feedbackIncludeDiagnostics': 'Include
|
|
757
|
+
'ds.feedbackWrite': 'Write feedback', 'ds.feedbackWriteDesc': 'Submit from the app', 'ds.feedbackModalTitle': 'Write feedback', 'ds.feedbackIncludeDiagnostics': 'Include client and gateway diagnostics (optional)', 'ds.feedbackDiagnosticsPrivacy': 'Uploads operation stages, error locations, storage sizes, versions and gateway status. No credentials, conversation bodies, answers or full paths. Preview below.', 'ds.feedbackIncludeCrashes': 'Include crash summary (optional)', 'ds.feedbackCrashPrivacy': 'Recorded locally by default. Opt in to upload up to 3 recent exit, restart and error-location records. No conversations, credentials or full paths.', 'ds.feedbackCrashPreview': 'Preview the log summary to upload', 'ds.feedbackCrashLoading': 'Reading local logs…', 'ds.feedbackCrashUnavailable': 'Logs are unavailable. Update the gateway or try again later.',
|
|
758
758
|
'ds.feedbackTypeBug': 'Bug', 'ds.feedbackTypeSuggestion': 'Suggestion', 'ds.feedbackTypeOther': 'Other',
|
|
759
759
|
'ds.feedbackMessagePlaceholder': 'Describe the bug or suggestion (required, ≤2000 chars)',
|
|
760
760
|
'ds.feedbackContactPlaceholder': 'Contact (optional): email / WeChat / Bilibili ID',
|