@hyprnos/dsh-remote-plugin 0.0.0-stage → 0.8.8
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/README.en.md +61 -0
- package/README.md +60 -2
- package/apk/dsh-remote.apk +0 -0
- package/approval-summary.mjs +115 -0
- package/client.js +197 -0
- package/cordis.patch.yml +5 -0
- package/doctor-skill.mjs +99 -0
- package/doctor-target.mjs +24 -0
- package/file-delivery.mjs +84 -0
- package/gateway-stats.cjs +501 -0
- package/gateway.cjs +8451 -0
- package/index.mjs +1784 -0
- package/insights.mjs +111 -0
- package/market.mjs +86 -0
- package/package.json +71 -4
- package/peak-reminders.mjs +50 -0
- package/plugin-center.mjs +777 -0
- package/plugin-transaction.mjs +300 -0
- package/public/activity.js +188 -0
- package/public/admin.html +820 -0
- package/public/admin.js +1167 -0
- package/public/announcement-forms.js +89 -0
- package/public/announcements.json +464 -0
- package/public/app.js +8826 -0
- package/public/approval-records.js +301 -0
- package/public/approval-summary.js +78 -0
- package/public/build.json +5 -0
- package/public/cache-upgrade.js +51 -0
- package/public/chat-copy.js +59 -0
- package/public/chat-files.js +87 -0
- package/public/desktop/desktop.css +816 -0
- package/public/desktop/desktop.html +871 -0
- package/public/desktop/desktop.js +4548 -0
- package/public/desktop/i18n.js +85 -0
- package/public/diagnostics.js +203 -0
- package/public/doctor-entry.js +94 -0
- package/public/doctor.css +205 -0
- package/public/doctor.js +769 -0
- package/public/donate.png +0 -0
- package/public/e2ee-transport.js +219 -0
- package/public/extensions.css +109 -0
- package/public/extensions.js +215 -0
- package/public/file-inbox.css +66 -0
- package/public/file-inbox.js +289 -0
- package/public/genui.css +8 -0
- package/public/genui.js +254 -0
- package/public/history.js +304 -0
- package/public/i18n.js +57 -0
- package/public/icon.svg +12 -0
- package/public/image-cache.js +141 -0
- package/public/image-preview.js +290 -0
- package/public/index.html +1548 -0
- package/public/insights.css +28 -0
- package/public/insights.js +290 -0
- package/public/jsqr.min.js +10104 -0
- package/public/lan-discovery.js +94 -0
- package/public/link-check.js +109 -0
- package/public/manifest.webmanifest +16 -0
- package/public/md.js +333 -0
- package/public/morphicons-init.js +41 -0
- package/public/motion.js +557 -0
- package/public/network.js +100 -0
- package/public/onboarding.css +36 -0
- package/public/onboarding.js +253 -0
- package/public/operations.js +141 -0
- package/public/permission-presets.js +159 -0
- package/public/plugin-center.css +120 -0
- package/public/plugin-center.js +666 -0
- package/public/plugin-icon.svg +5 -0
- package/public/plugin.html +68 -0
- package/public/plugin.js +211 -0
- package/public/qrcode.min.js +2297 -0
- package/public/relay-autopair.js +251 -0
- package/public/relay-devices.js +80 -0
- package/public/relay-settings.css +24 -0
- package/public/relay-settings.js +194 -0
- package/public/remote-state.js +27 -0
- package/public/remote-ui.css +148 -0
- package/public/remote-ui.js +243 -0
- package/public/session-deck.css +79 -0
- package/public/session-deck.js +180 -0
- package/public/session-presets.js +47 -0
- package/public/setup.css +18 -0
- package/public/setup.js +213 -0
- package/public/sha256.js +119 -0
- package/public/skills.css +81 -0
- package/public/skills.js +202 -0
- package/public/skins/blue-fish/DESIGN.md +24 -0
- package/public/skins/blue-fish/face.png +0 -0
- package/public/skins/blue-fish/icon-blush.png +0 -0
- package/public/skins/blue-fish/icon-sleep.png +0 -0
- package/public/skins/blue-fish/icon-smile.png +0 -0
- package/public/skins/blue-fish/icon-star.png +0 -0
- package/public/skins/blue-fish/icon-wink.png +0 -0
- package/public/skins/blue-fish/icon.png +0 -0
- package/public/skins/blue-fish/mascot.png +0 -0
- package/public/skins/blue-fish/pattern.png +0 -0
- package/public/skins/blue-fish/preview.html +12 -0
- package/public/skins/blue-fish/skin.css +122 -0
- package/public/skins/blue-fish/sparkles.svg +18 -0
- package/public/skins/bocchi/DESIGN.md +99 -0
- package/public/skins/bocchi/face.png +0 -0
- package/public/skins/bocchi/grain.png +0 -0
- package/public/skins/bocchi/icon-blush.png +0 -0
- package/public/skins/bocchi/icon-sleep.png +0 -0
- package/public/skins/bocchi/icon-smile.png +0 -0
- package/public/skins/bocchi/icon-star.png +0 -0
- package/public/skins/bocchi/icon-wink.png +0 -0
- package/public/skins/bocchi/icon.png +0 -0
- package/public/skins/bocchi/pattern-soft.png +0 -0
- package/public/skins/bocchi/pattern.png +0 -0
- package/public/skins/bocchi/preview.html +55 -0
- package/public/skins/bocchi/skin.css +233 -0
- package/public/skins/bocchi/stage-bg.png +0 -0
- package/public/skins/bocchi/stage-soft.png +0 -0
- package/public/skins/bocchi/stand.png +0 -0
- package/public/skins/bocchi/sticker-guitar.png +0 -0
- package/public/skins/kessoku/DESIGN.md +38 -0
- package/public/skins/kessoku/grain.png +0 -0
- package/public/skins/kessoku/skin.css +212 -0
- package/public/skins/kita/SOURCES.json +51 -0
- package/public/skins/kita/face.png +0 -0
- package/public/skins/kita/icon-live.png +0 -0
- package/public/skins/kita/icon-reddress.png +0 -0
- package/public/skins/kita/icon-seifuku.png +0 -0
- package/public/skins/kita/pattern.png +0 -0
- package/public/skins/kita/preview.html +56 -0
- package/public/skins/kita/skin.css +26 -0
- package/public/skins/kita/stand.png +0 -0
- package/public/skins/kita/sticker-live.png +0 -0
- package/public/skins/nijika/SOURCES.json +51 -0
- package/public/skins/nijika/face.png +0 -0
- package/public/skins/nijika/icon-live.png +0 -0
- package/public/skins/nijika/icon-reddress.png +0 -0
- package/public/skins/nijika/icon-seifuku.png +0 -0
- package/public/skins/nijika/pattern.png +0 -0
- package/public/skins/nijika/preview.html +56 -0
- package/public/skins/nijika/skin.css +25 -0
- package/public/skins/nijika/stand.png +0 -0
- package/public/skins/nijika/sticker-live.png +0 -0
- package/public/skins/penguin/DESIGN.md +33 -0
- package/public/skins/penguin/SOURCES.json +22 -0
- package/public/skins/penguin/aic-blueprint.svg +24 -0
- package/public/skins/penguin/endfield-triangles.svg +4 -0
- package/public/skins/penguin/face.png +0 -0
- package/public/skins/penguin/icon-blush.png +0 -0
- package/public/skins/penguin/icon-dizzy.png +0 -0
- package/public/skins/penguin/icon-laugh.png +0 -0
- package/public/skins/penguin/icon-sleep.png +0 -0
- package/public/skins/penguin/icon-smile.png +0 -0
- package/public/skins/penguin/icon-star.png +0 -0
- package/public/skins/penguin/icon-wink.png +0 -0
- package/public/skins/penguin/icon.png +0 -0
- package/public/skins/penguin/mascot.png +0 -0
- package/public/skins/penguin/pattern-night.png +0 -0
- package/public/skins/penguin/pattern.png +0 -0
- package/public/skins/penguin/preview.html +12 -0
- package/public/skins/penguin/skin.css +212 -0
- package/public/skins/ryo/SOURCES.json +51 -0
- package/public/skins/ryo/face.png +0 -0
- package/public/skins/ryo/icon-live.png +0 -0
- package/public/skins/ryo/icon-reddress.png +0 -0
- package/public/skins/ryo/icon-seifuku.png +0 -0
- package/public/skins/ryo/pattern.png +0 -0
- package/public/skins/ryo/preview.html +56 -0
- package/public/skins/ryo/skin.css +25 -0
- package/public/skins/ryo/stand.png +0 -0
- package/public/skins/ryo/sticker-live.png +0 -0
- package/public/sponsor-entry.js +21 -0
- package/public/styles.css +1494 -0
- package/public/subagents.css +61 -0
- package/public/subagents.js +275 -0
- package/public/task-board.js +109 -0
- package/public/teams.js +98 -0
- package/public/theme-picker.css +58 -0
- package/public/theme-vars.css +1044 -0
- package/public/theme.js +166 -0
- package/public/transcribe-core.js +74 -0
- package/public/turn-results.js +121 -0
- package/public/update.json +49 -0
- package/public/vendor/gsap/NOTICE.md +10 -0
- package/public/vendor/gsap/gsap.min.js +11 -0
- package/public/vendor/morphicons/LICENSE +21 -0
- package/public/vendor/morphicons/README.md +10 -0
- package/public/vendor/morphicons/controller-CXZuwJ_M.js +152 -0
- package/public/vendor/morphicons/dom.js +206 -0
- package/public/vendor/morphicons/element.js +261 -0
- package/public/vendor/morphicons/normalize-CYnN3Npw.js +540 -0
- package/public/vendor/morphicons/spring-CFHloqPP.js +623 -0
- package/public/version.json +3 -0
- package/public/voice-input.js +739 -0
- package/public/workflow.css +365 -0
- package/public/workflow.js +409 -0
- package/session-file.mjs +39 -0
- package/skills/dsh-remote-doctor/SKILL.md +186 -0
- package/skills/dsh-remote-doctor/references/wiki/README.md +40 -0
- package/skills/dsh-remote-doctor/references/wiki/ai-guide.md +61 -0
- package/skills/dsh-remote-doctor/references/wiki/connection.md +76 -0
- package/skills/dsh-remote-doctor/references/wiki/errors.md +26 -0
- package/skills/dsh-remote-doctor/references/wiki/evidence.md +44 -0
- package/skills/dsh-remote-doctor/references/wiki/files.md +31 -0
- package/skills/dsh-remote-doctor/references/wiki/maintenance.md +30 -0
- package/skills/dsh-remote-doctor/references/wiki/notifications.md +33 -0
- package/skills/dsh-remote-doctor/references/wiki/operations.md +32 -0
- package/skills/dsh-remote-doctor/references/wiki/plugins.md +90 -0
- package/skills/dsh-remote-doctor/references/wiki/sessions.md +45 -0
- package/skills/dsh-remote-doctor/references/wiki/sources.md +27 -0
- package/skills.mjs +53 -0
- package/task-board.mjs +57 -0
- package/teams.mjs +58 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* Read-only library: shared theme and deliberate wrapping. */
|
|
2
|
+
.sc-shell { grid-column:1/-1; min-width:0; color:var(--dsr-text,#f0f6fc); container-type:inline-size; container-name:skills; }
|
|
3
|
+
.sc-heading { margin-bottom:20px; }
|
|
4
|
+
.sc-heading h3 { margin:0; font-size:22px; line-height:1.3; }
|
|
5
|
+
.sc-intro,.sc-updated,.sc-source,.sc-meta { color:var(--dsr-muted,#a7b0bc); font-size:13px; line-height:1.6; }
|
|
6
|
+
.sc-intro { margin:8px 0 0!important; }.sc-source { display:block; }
|
|
7
|
+
.sc-filters { display:grid; grid-template-columns:minmax(220px,1fr) minmax(130px,.5fr) minmax(155px,.6fr) auto; gap:10px; align-items:center; }
|
|
8
|
+
.sc-filters input,.sc-filters select,.sc-filters button,.sc-reading-tools input,.sc-reading-tools select,.sc-reading-tools button,.sc-page button {
|
|
9
|
+
box-sizing:border-box; min-width:0; min-height:46px; max-width:100%; margin:0; padding:11px 12px;
|
|
10
|
+
border:1px solid var(--dsr-line,#30363d); border-radius:12px; background:var(--dsr-panel,#161b22);
|
|
11
|
+
color:var(--dsr-text,#f0f6fc); font:inherit; font-size:14px; line-height:1.4;
|
|
12
|
+
}
|
|
13
|
+
.sc-filters input,.sc-filters select,.sc-reading-tools input,.sc-reading-tools select { width:100%; }
|
|
14
|
+
.sc-filters input::placeholder,.sc-reading-tools input::placeholder { color:var(--dsr-muted,#a7b0bc); opacity:1; }
|
|
15
|
+
.sc-filters select,.sc-reading-tools select { padding-right:28px; text-overflow:ellipsis; }
|
|
16
|
+
.sc-filters button,.sc-reading-tools button,.sc-page button { white-space:nowrap; cursor:pointer; }
|
|
17
|
+
.sc-filters button { min-width:88px; }
|
|
18
|
+
.sc-shell :is(input,select,button):focus-visible { outline:2px solid var(--dsr-accent,#58a6ff); outline-offset:3px; }
|
|
19
|
+
.sc-summary { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 16px; margin:20px 0 16px; font-size:13px; }
|
|
20
|
+
.sc-count,.sc-updated { white-space:nowrap; }
|
|
21
|
+
.sc-notice:not(:empty) { margin-top:12px!important; padding:12px 14px; border:1px solid var(--dsr-warning-line,#ff9e6466); border-radius:12px; font-size:13px; line-height:1.6; }
|
|
22
|
+
.sc-notice:empty { display:none; }
|
|
23
|
+
.sc-body { display:grid; grid-template-columns:minmax(240px,1fr) minmax(0,1.5fr); gap:20px; align-items:start; }
|
|
24
|
+
.sc-list { display:grid; gap:14px; max-height:68dvh; overflow:auto; }
|
|
25
|
+
.sc-card,.sc-detail { min-width:0; border:1px solid var(--dsr-line,#30363d); border-radius:18px; background:var(--dsr-panel,#161b22); padding:20px; overflow-wrap:break-word; word-break:normal; line-break:strict; }
|
|
26
|
+
.sc-card { display:flex; flex-direction:column; align-items:stretch; }
|
|
27
|
+
.sc-card.is-selected { border-color:var(--dsr-accent,#58a6ff); background:var(--dsr-accent-soft,#58a6ff1f); }
|
|
28
|
+
.sc-card h3 { margin:8px 0 10px!important; font-size:18px; line-height:1.45; overflow-wrap:break-word; word-break:normal; }
|
|
29
|
+
.sc-description { margin:0!important; font-size:14px; line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
|
|
30
|
+
.sc-description,.sc-intro,.sc-detail p { text-wrap:pretty; }
|
|
31
|
+
.sc-flags { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; margin:16px 0; }
|
|
32
|
+
.sc-flags .pc-badge { max-width:100%; min-width:0; white-space:normal; line-height:1.5; overflow-wrap:break-word; }
|
|
33
|
+
.sc-flags .sc-status { white-space:nowrap; }
|
|
34
|
+
.sc-card > button { min-height:44px; width:100%; margin-top:auto; border-radius:12px; font-size:14px; }
|
|
35
|
+
.sc-detail { position:sticky; top:12px; }.sc-detail[hidden] { display:none; }
|
|
36
|
+
.sc-card .sc-detail { margin-top:16px; padding:16px 0 0; border:0; border-top:1px solid var(--dsr-line,#30363d); border-radius:0; background:transparent; }
|
|
37
|
+
.sc-detail h3 { font-size:20px; line-height:1.4; margin:16px 0 10px; }
|
|
38
|
+
.sc-detail h4 { margin:24px 0 10px; font-size:15px; line-height:1.5; }
|
|
39
|
+
.sc-detail p { margin-top:10px!important; font-size:14px; line-height:1.75; }
|
|
40
|
+
.sc-detail .sc-content { max-height:58dvh; margin:0; padding:16px; border:1px solid var(--dsr-line,#30363d); border-radius:14px; white-space:pre-wrap; overflow-wrap:break-word; word-break:normal; overflow:auto; font:13px/1.8 ui-monospace,monospace; background:var(--dsr-bg,#0d1117); }
|
|
41
|
+
.sc-page .sc-filters { grid-template-columns:minmax(220px,1fr) minmax(130px,.45fr) minmax(155px,.55fr) minmax(105px,.35fr) auto; }
|
|
42
|
+
.sc-page .sc-body { display:block; }
|
|
43
|
+
.sc-page .sc-list { max-height:none; overflow:visible; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); align-items:stretch; }
|
|
44
|
+
.sc-page .sc-detail { position:static; padding:24px; }.sc-page .sc-content { max-height:none; overflow:visible; }
|
|
45
|
+
.sc-reading-tools { display:grid; grid-template-columns:minmax(200px,1fr) minmax(150px,auto) auto; gap:10px; margin:18px 0 10px; align-items:center; }
|
|
46
|
+
.sc-markdown { font-family:inherit!important; white-space:normal!important; line-height:1.8; }
|
|
47
|
+
.sc-markdown :is(p,li) { max-width:75ch; }
|
|
48
|
+
.sc-markdown :is(h1,h2,h3,h4) { line-height:1.4; overflow-wrap:break-word; }
|
|
49
|
+
.sc-markdown h1 { font-size:23px; }.sc-markdown h2 { font-size:20px; }
|
|
50
|
+
.sc-markdown pre { max-width:100%; overflow-x:auto; white-space:pre; }
|
|
51
|
+
.sc-markdown table { display:block; max-width:100%; overflow-x:auto; }
|
|
52
|
+
.sc-content mark { background:var(--dsr-accent-soft,#ffd16670); color:inherit; }.sc-page [hidden] { display:none!important; }
|
|
53
|
+
@media(max-width:1100px) {
|
|
54
|
+
.sc-filters,.sc-page .sc-filters { grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
|
|
55
|
+
.sc-filters input { grid-column:1/-1; }
|
|
56
|
+
}
|
|
57
|
+
@media(max-width:620px) {
|
|
58
|
+
.sc-heading { margin-bottom:16px; }.sc-heading h3 { font-size:21px; }
|
|
59
|
+
.sc-filters,.sc-page .sc-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.sc-filters input { grid-column:1/-1; }
|
|
60
|
+
.sc-body { grid-template-columns:1fr; }.sc-detail { position:static; }.sc-list { max-height:none; overflow-anchor:none; }
|
|
61
|
+
.sc-page .sc-list { grid-template-columns:1fr; }.sc-card { padding:18px; }.sc-page .sc-detail { padding:18px; }
|
|
62
|
+
.sc-detail .sc-content { max-height:45dvh; padding:14px; }.sc-page .sc-content { max-height:none; }
|
|
63
|
+
.sc-reading-tools { grid-template-columns:minmax(0,1fr) auto; }.sc-reading-tools input { grid-column:1/-1; }
|
|
64
|
+
.sc-summary { margin:16px 0; }.sc-updated { font-size:12px; }
|
|
65
|
+
}
|
|
66
|
+
@media(max-width:360px) {
|
|
67
|
+
.sc-card,.sc-page .sc-detail { padding:16px; }.sc-filters { gap:8px; }
|
|
68
|
+
.sc-filters :is(input,select,button),.sc-reading-tools :is(input,select,button) { font-size:13px; }
|
|
69
|
+
.sc-card h3 { font-size:17px; }.sc-detail h3 { font-size:19px; }
|
|
70
|
+
}
|
|
71
|
+
/* A wide window can still contain a narrow reading pane. */
|
|
72
|
+
@container skills (max-width:1000px) {
|
|
73
|
+
.sc-filters,.sc-page .sc-filters { grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
|
|
74
|
+
.sc-filters input { grid-column:1/-1; }
|
|
75
|
+
}
|
|
76
|
+
@container skills (max-width:620px) {
|
|
77
|
+
.sc-filters,.sc-page .sc-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
|
|
78
|
+
.sc-page .sc-list { grid-template-columns:1fr; }
|
|
79
|
+
.sc-reading-tools { grid-template-columns:minmax(0,1fr) auto; }
|
|
80
|
+
.sc-reading-tools input { grid-column:1/-1; }
|
|
81
|
+
}
|
package/public/skills.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* Shared read-only skill center. Skill text is displayed as text, never executed. */
|
|
2
|
+
'use strict';
|
|
3
|
+
window.DshSkillsCenter = (() => {
|
|
4
|
+
let current
|
|
5
|
+
const sourceNames = { 'project-dsh': '项目 · DSH', 'project-agents': '项目 · Agents', custom: '自定义目录', 'user-dsh': '用户 · DSH', 'user-agents': '用户 · Agents', runtime: '插件注册', bundled: '内置技能' }
|
|
6
|
+
const errors = { 'not-installed': '当前主机暂未提供技能中心,请返回插件列表核对状态。', unsupported: '主机技能中心接口不兼容,请核对插件版本。', 'host-denied': '主机拒绝读取技能,请检查主机认证状态。', 'skill-changed': '技能已变化,请刷新列表后重新选择。', 'skills-unavailable': '暂时无法读取主机技能,请重试。' }
|
|
7
|
+
function node(tag, text, cls) { const el = document.createElement(tag); if (text != null) el.textContent = text; if (cls) el.className = cls; return el }
|
|
8
|
+
function button(label, fn) { const el = node('button', label); el.type = 'button'; el.addEventListener('click', fn); return el }
|
|
9
|
+
function close() { if (current) { current.controller.abort(); current = null } }
|
|
10
|
+
function live(s) { return current === s && s.connection.valid() }
|
|
11
|
+
function placeDetail(s) {
|
|
12
|
+
const selected = s.cards.get(s.selected)
|
|
13
|
+
if (s.dedicated) {
|
|
14
|
+
s.detail.hidden = !s.detailOpen
|
|
15
|
+
s.body.hidden = s.detailOpen
|
|
16
|
+
for (const part of s.listParts) part.hidden = s.detailOpen
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
s.detail.hidden = s.mobile.matches && !selected
|
|
20
|
+
const parent = s.mobile.matches && selected ? selected.card : s.body
|
|
21
|
+
if (s.detail.parentNode !== parent) parent.append(s.detail)
|
|
22
|
+
for (const [id, { card, action }] of s.cards) {
|
|
23
|
+
const open = id === s.selected
|
|
24
|
+
card.className = 'sc-card' + (open ? ' is-selected' : '')
|
|
25
|
+
action.textContent = open ? '收起技能' : '查看技能'
|
|
26
|
+
action.setAttribute('aria-pressed', String(open))
|
|
27
|
+
action.setAttribute('aria-expanded', String(open))
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function scrollParent(el) {
|
|
31
|
+
for (let parent = el.parentElement; parent; parent = parent.parentElement) {
|
|
32
|
+
if (parent.scrollHeight > parent.clientHeight && /auto|scroll/.test(getComputedStyle(parent).overflowY)) return parent
|
|
33
|
+
}
|
|
34
|
+
return document.scrollingElement
|
|
35
|
+
}
|
|
36
|
+
async function api(s, route) {
|
|
37
|
+
if (!live(s)) throw new Error('连接已切换,请重新打开技能中心。')
|
|
38
|
+
const response = await fetch(s.connection.url('/remote/api/skills' + route), { headers: s.connection.headers,
|
|
39
|
+
signal: AbortSignal.any([s.controller.signal, AbortSignal.timeout(25000)]) })
|
|
40
|
+
if (!live(s)) throw new Error('连接已切换,请重新打开技能中心。')
|
|
41
|
+
let data
|
|
42
|
+
try { data = await response.json() } catch { throw Object.assign(new Error('主机 Remote 尚不支持技能中心,请更新主机插件。'), { code: 'unsupported' }) }
|
|
43
|
+
if (!live(s)) throw new Error('连接已切换,请重新打开技能中心。')
|
|
44
|
+
if (!response.ok || data.ok === false || data.available === false) {
|
|
45
|
+
throw Object.assign(new Error(errors[data.code] || '请求失败,请检查连接后重试。'), { code: response.status === 401 || response.status === 403 ? 'host-denied' : data.code || (response.status === 404 ? 'not-installed' : 'read-failed') })
|
|
46
|
+
}
|
|
47
|
+
return data
|
|
48
|
+
}
|
|
49
|
+
function renderList(s) {
|
|
50
|
+
const q = s.search.value.trim().toLowerCase(), source = s.sources.value, status = s.status.value
|
|
51
|
+
const rows = s.items.filter(row => (!source || row.source === source) && (!status || (status === 'on' ? row.modelInvocable === true : row.modelInvocable === false)))
|
|
52
|
+
.filter(row => [row.name, row.description, row.whenToUse, row.workspace].join(' ').toLowerCase().includes(q))
|
|
53
|
+
if (s.sort) rows.sort((a,b) => (s.sort.value === 'source' ? a.source.localeCompare(b.source) : 0) || a.name.localeCompare(b.name))
|
|
54
|
+
if (s.selected && !rows.some(row => row.id === s.selected)) {
|
|
55
|
+
s.selected = ''; ++s.detailSequence
|
|
56
|
+
s.detail.replaceChildren(node('h3', '技能详情'), node('p', '选择一个技能,查看适用场景和正文。'))
|
|
57
|
+
}
|
|
58
|
+
s.count.textContent = rows.length + ' / ' + s.items.length + ' 个技能'
|
|
59
|
+
s.list.replaceChildren()
|
|
60
|
+
s.cards.clear()
|
|
61
|
+
if (!rows.length) s.list.append(node('p', s.items.length ? '没有匹配的技能,试试更改筛选条件。' : '主机没有提供可显示的技能。', 'sc-empty'))
|
|
62
|
+
for (const row of rows) {
|
|
63
|
+
const card = node('article', null, 'sc-card' + (s.selected === row.id ? ' is-selected' : ''))
|
|
64
|
+
card.append(node('small', sourceNames[row.source] || row.source, 'sc-source'), node('h3', row.name), node('p', row.description || '未提供说明', 'sc-description'))
|
|
65
|
+
const flags = node('div', null, 'sc-flags')
|
|
66
|
+
flags.append(node('span', row.modelInvocable == null ? '模型调用状态未知' : row.modelInvocable ? '模型可调用' : '模型调用已停用', 'pc-badge sc-status' + (row.modelInvocable ? ' is-active' : '')))
|
|
67
|
+
if (row.workspace) flags.append(node('span', row.workspace, 'pc-badge'))
|
|
68
|
+
card.append(flags)
|
|
69
|
+
const action = button('查看技能', () => select(s, row)); card.append(action)
|
|
70
|
+
s.cards.set(row.id, { card, action })
|
|
71
|
+
s.list.append(card)
|
|
72
|
+
}
|
|
73
|
+
placeDetail(s)
|
|
74
|
+
}
|
|
75
|
+
async function select(s, row) {
|
|
76
|
+
if (!live(s)) return
|
|
77
|
+
const action = s.cards.get(row.id)?.action
|
|
78
|
+
const scroller = !s.dedicated && s.mobile.matches && action ? scrollParent(action) : null
|
|
79
|
+
const top = scroller ? action.getBoundingClientRect().top : 0
|
|
80
|
+
const collapse = !s.dedicated && s.selected === row.id
|
|
81
|
+
if (s.dedicated) {
|
|
82
|
+
if (!s.detailOpen) { s.returnScroller = scrollParent(s.shell); s.returnScroll = s.returnScroller?.scrollTop || 0 }
|
|
83
|
+
s.detailOpen = true
|
|
84
|
+
}
|
|
85
|
+
s.selected = collapse ? '' : row.id; const sequence = ++s.detailSequence
|
|
86
|
+
s.detail.replaceChildren(node('h3', collapse ? '技能详情' : row.name), node('p', collapse ? '选择一个技能,查看适用场景和正文。' : '正在读取技能…'))
|
|
87
|
+
placeDetail(s)
|
|
88
|
+
if (s.dedicated && s.returnScroller) s.returnScroller.scrollTop = 0
|
|
89
|
+
if (s.dedicated) s.detail.prepend(button('← 返回技能列表', () => back(s)))
|
|
90
|
+
if (scroller) scroller.scrollTop += action.getBoundingClientRect().top - top
|
|
91
|
+
if (collapse) return
|
|
92
|
+
try {
|
|
93
|
+
const data = await api(s, '/read?id=' + encodeURIComponent(row.id))
|
|
94
|
+
if (!live(s) || sequence !== s.detailSequence) return
|
|
95
|
+
if (data.content != null && typeof data.content !== 'string') throw Object.assign(new Error(errors.unsupported), { code:'unsupported' })
|
|
96
|
+
window.DshExtensions?.reportAvailability?.(s.connection, 'skills', { ok: true })
|
|
97
|
+
const item = data.item || row
|
|
98
|
+
s.detail.replaceChildren(node('small', sourceNames[item.source] || item.source, 'sc-source'), node('h3', item.name), node('p', item.description || '未提供说明'))
|
|
99
|
+
if (item.whenToUse) s.detail.append(node('h4', '适用场景'), node('p', item.whenToUse))
|
|
100
|
+
s.detail.append(node('p', '模型调用:' + (item.modelInvocable == null ? '未知' : item.modelInvocable ? '允许' : '已停用') + ' · 手动调用:' + (item.userInvocable == null ? '未知' : item.userInvocable ? '允许' : '已停用'), 'sc-meta'), node('h4', '技能正文'))
|
|
101
|
+
s.detail.append(data.content == null ? node('p', '此技能未提供可读取的文件正文。') : node('pre', data.content || '正文为空。', 'sc-content'))
|
|
102
|
+
if (data.truncated) s.detail.append(node('p', '正文较长,当前显示前 100,000 个字符。', 'sc-notice'))
|
|
103
|
+
if (s.dedicated) {
|
|
104
|
+
s.detail.prepend(button('← 返回技能列表', () => back(s)))
|
|
105
|
+
if (data.content != null) readingTools(s, data.content)
|
|
106
|
+
s.detail.querySelector('button')?.focus({ preventScroll: true })
|
|
107
|
+
}
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (live(s) && sequence === s.detailSequence) {
|
|
110
|
+
window.DshExtensions?.reportAvailability?.(s.connection, 'skills', { code: error.code || (error.name === 'TimeoutError' ? 'timeout' : 'read-failed') })
|
|
111
|
+
s.detail.replaceChildren(node('h3', row.name), node('p', error.message), button('重试读取', () => { s.selected = ''; void select(s, row) }))
|
|
112
|
+
}
|
|
113
|
+
if (live(s) && s.dedicated && sequence === s.detailSequence) s.detail.prepend(button('← 返回技能列表', () => back(s)))
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function back(s = current) {
|
|
117
|
+
if (!s || !live(s) || !s.detailOpen) return false
|
|
118
|
+
++s.detailSequence; s.detailOpen = false; placeDetail(s)
|
|
119
|
+
if (s.returnScroller) s.returnScroller.scrollTop = s.returnScroll
|
|
120
|
+
s.cards.get(s.selected)?.action.focus({ preventScroll: true })
|
|
121
|
+
return true
|
|
122
|
+
}
|
|
123
|
+
function readingTools(s, content) {
|
|
124
|
+
const tools = node('div', null, 'sc-reading-tools'), search = node('input'), mode = node('select'), feedback = node('p', '', 'sc-meta')
|
|
125
|
+
search.placeholder = '搜索技能正文'; search.setAttribute('aria-label', '搜索技能正文')
|
|
126
|
+
for (const [value,label] of [['text','纯文本'],['markdown','Markdown 阅读']]) { const option=node('option',label); option.value=value; mode.append(option) }
|
|
127
|
+
mode.value = 'text'; mode.setAttribute('aria-label','正文显示方式')
|
|
128
|
+
const body = s.detail.querySelector('.sc-content')
|
|
129
|
+
const render = () => {
|
|
130
|
+
const query = search.value.trim()
|
|
131
|
+
if (!query && mode.value === 'markdown' && typeof window.mdToHtml === 'function') { body.className = 'sc-content sc-markdown'; body.innerHTML = window.mdToHtml(content); feedback.textContent=''; return }
|
|
132
|
+
body.className = 'sc-content'; body.replaceChildren()
|
|
133
|
+
let cursor=0,count=0,index; const lower=content.toLowerCase(),needle=query.toLowerCase()
|
|
134
|
+
while (needle && count<500 && (index=lower.indexOf(needle,cursor))>=0) {
|
|
135
|
+
body.append(document.createTextNode(content.slice(cursor,index)),node('mark',content.slice(index,index+query.length)));cursor=index+query.length;count++
|
|
136
|
+
}
|
|
137
|
+
body.append(document.createTextNode(content.slice(cursor))); feedback.textContent = query ? `找到 ${count}${count===500?'+' : ''} 处匹配 · 搜索时显示纯文本` : ''
|
|
138
|
+
}
|
|
139
|
+
search.addEventListener('input',render); mode.addEventListener('change',render)
|
|
140
|
+
const copy = button('复制正文',async()=>{ try { if (typeof window.copyText === 'function') { if (!await window.copyText(content)) throw new Error() } else await navigator.clipboard.writeText(content);feedback.textContent='正文已复制' } catch {feedback.textContent='复制失败,请选择正文后复制。'} })
|
|
141
|
+
tools.append(search,mode,copy); body.before(tools,feedback)
|
|
142
|
+
}
|
|
143
|
+
async function refresh() {
|
|
144
|
+
const s = current
|
|
145
|
+
if (!s || !live(s)) return
|
|
146
|
+
const sequence = ++s.listSequence; ++s.detailSequence
|
|
147
|
+
s.message.textContent = '正在读取主机技能…'; s.reload.disabled = true
|
|
148
|
+
try {
|
|
149
|
+
const data = await api(s, '/list')
|
|
150
|
+
if (!live(s) || sequence !== s.listSequence) return
|
|
151
|
+
if (data.schema !== 1 || !Array.isArray(data.items)) throw Object.assign(new Error(errors.unsupported), { code: 'unsupported' })
|
|
152
|
+
window.DshExtensions?.reportAvailability?.(s.connection, 'skills', { ok: true })
|
|
153
|
+
s.items = data.items; s.selected = ''
|
|
154
|
+
const previous = s.sources.value
|
|
155
|
+
s.sources.replaceChildren(node('option', '全部来源'))
|
|
156
|
+
s.sources.children[0].value = ''
|
|
157
|
+
for (const key of [...new Set(s.items.map(row => row.source))]) { const option = node('option', (sourceNames[key] || key) + ' · ' + s.items.filter(row=>row.source===key).length); option.value = key; s.sources.append(option) }
|
|
158
|
+
s.sources.value = [...s.sources.children].some(option => option.value === previous) ? previous : ''
|
|
159
|
+
s.message.textContent = (data.complete === false ? '主机技能扫描尚不完整。' : '') + (data.truncated ? '当前显示前 500 个技能。' : '')
|
|
160
|
+
s.updated.textContent = '更新于 ' + new Date(data.generatedAt).toLocaleTimeString()
|
|
161
|
+
s.detail.replaceChildren(node('h3', '技能详情'), node('p', '选择一个技能,查看适用场景和正文。'))
|
|
162
|
+
renderList(s)
|
|
163
|
+
} catch (error) {
|
|
164
|
+
if (live(s) && sequence === s.listSequence) {
|
|
165
|
+
window.DshExtensions?.reportAvailability?.(s.connection, 'skills', { code: error.code || (error.name === 'TimeoutError' ? 'timeout' : 'read-failed') })
|
|
166
|
+
s.message.textContent = error.message; s.updated.textContent = s.items.length ? '保留上次读取结果' : ''; if (!s.items.length) s.list.replaceChildren()
|
|
167
|
+
}
|
|
168
|
+
} finally { if (live(s) && sequence === s.listSequence) s.reload.disabled = false }
|
|
169
|
+
}
|
|
170
|
+
async function mount(connection, target, options = {}) {
|
|
171
|
+
close()
|
|
172
|
+
const s = { connection, controller: new AbortController(), items: [], selected: '', cards: new Map(), listSequence: 0, detailSequence: 0,
|
|
173
|
+
dedicated: options.dedicated === true, detailOpen: false, mobile: window.matchMedia?.('(max-width:620px)') || { matches: false } }
|
|
174
|
+
current = s
|
|
175
|
+
const shell = node('section', null, 'sc-shell'), heading = node('div', null, 'sc-heading')
|
|
176
|
+
s.shell = shell; if (s.dedicated) shell.className += ' sc-page'
|
|
177
|
+
heading.append(node('h3', '技能中心'), node('p', '浏览主机技能、适用场景与调用状态。', 'sc-intro'))
|
|
178
|
+
const filters = node('div', null, 'sc-filters')
|
|
179
|
+
s.search = node('input'); s.search.value = ''; s.search.placeholder = '搜索技能名称、说明或适用场景'; s.search.setAttribute('aria-label', '搜索技能')
|
|
180
|
+
s.sources = node('select'); s.sources.setAttribute('aria-label', '技能来源')
|
|
181
|
+
s.status = node('select'); s.status.setAttribute('aria-label', '模型调用状态')
|
|
182
|
+
for (const [value, label] of [['', '全部调用状态'], ['on', '模型可调用'], ['off', '模型调用已停用']]) { const option = node('option', label); option.value = value; s.status.append(option) }
|
|
183
|
+
s.status.value = ''; s.sources.value = ''
|
|
184
|
+
for (const el of [s.search, s.sources, s.status]) el.addEventListener(el === s.search ? 'input' : 'change', () => { if (live(s)) renderList(s) })
|
|
185
|
+
s.reload = button('刷新技能', refresh); filters.append(s.search, s.sources, s.status)
|
|
186
|
+
if (s.dedicated) { s.sort=node('select');s.sort.setAttribute('aria-label','技能排序');for(const [value,label] of [['name','按名称'],['source','按来源']]){const option=node('option',label);option.value=value;s.sort.append(option)}s.sort.value='name';s.sort.addEventListener('change',()=>{if(live(s))renderList(s)});filters.append(s.sort) }
|
|
187
|
+
filters.append(s.reload)
|
|
188
|
+
s.message = node('p', '', 'sc-notice'); s.message.setAttribute('role', 'status')
|
|
189
|
+
s.count = node('strong', '', 'sc-count'); s.updated = node('small', '', 'sc-updated')
|
|
190
|
+
const summary = node('div', null, 'sc-summary'); summary.append(s.count, s.updated)
|
|
191
|
+
s.list = node('div', null, 'sc-list'); s.detail = node('section', null, 'sc-detail'); s.detail.setAttribute('aria-label', '技能详情')
|
|
192
|
+
const body = node('div', null, 'sc-body'); s.body = body; body.append(s.list); if(!s.dedicated) body.append(s.detail)
|
|
193
|
+
s.listParts = [heading, filters, s.message, summary]
|
|
194
|
+
const resize = () => { if (live(s)) placeDetail(s) }
|
|
195
|
+
s.mobile.addEventListener?.('change', resize)
|
|
196
|
+
s.controller.signal.addEventListener('abort', () => s.mobile.removeEventListener?.('change', resize), { once: true })
|
|
197
|
+
shell.append(heading, filters, s.message, summary, body); target.replaceChildren(shell)
|
|
198
|
+
if(s.dedicated)shell.append(s.detail)
|
|
199
|
+
await refresh()
|
|
200
|
+
}
|
|
201
|
+
return { mount, close, refresh, back }
|
|
202
|
+
})()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 蓝色大肥鱼:晴空海湾
|
|
2
|
+
|
|
3
|
+
保留原有鲸鱼娘立绘、表情与深海蓝主色,使用海浪留白、蓝白内容卡和表情导航,并补充爱心、星星、气泡与贴纸边框。角色图片沿用原文件,没有重新绘制五官。
|
|
4
|
+
|
|
5
|
+
## 视觉结构
|
|
6
|
+
|
|
7
|
+
- 晴空浅蓝纸面:根元素绘制柔和环境色,独立背景伪元素绘制海浪轮廓、淡表情底纹,以及 `sparkles.svg` 中的气泡、星星和爱心;装饰主要出现在留白处。
|
|
8
|
+
- 角色:品牌头像、标题左侧星星眼、标题右侧全身图、助手头像、侧栏与空状态。取消每条会话和每个分组反复叠加头像。
|
|
9
|
+
- 内容:会话列表和助手回复使用稳定白卡。诊断与工作区选择是中性入口,新会话使用实色深海蓝。
|
|
10
|
+
- 导航:会话、文件、更多分别使用默认脸、眨眼、星星眼;图片在原有图标位内,保留标签、未读徽标和点击区。
|
|
11
|
+
- 可爱点缀:立绘圆形贴纸框、选中导航的粉色小圆垫、新会话按钮的眨眼贴纸、第一张会话卡的小睡脸,以及桌面侧栏虚线贴纸框。它们不代表额外功能或状态。
|
|
12
|
+
- 动态:不持续上下摆动,不用动画争夺阅读注意力。
|
|
13
|
+
|
|
14
|
+
## 维护约定
|
|
15
|
+
|
|
16
|
+
`public/theme-vars.css` 仍负责语义配色;本目录的 `skin.css` 只匹配 `fish`,声明局部 `--fish-*` 表面与图片参数。不要修改其他角色的变量或选择器。
|
|
17
|
+
|
|
18
|
+
标题立绘挂在标题的伪元素上,标题预留右侧空间,不能再放回整个 `.workflow-start` 上压住连接条。手机 320/390px 和 English 标题需要分别检查。
|
|
19
|
+
|
|
20
|
+
导航、顶栏、输入区的定位由共用布局负责。不要覆盖它们的 position/top/bottom/transform,不对全页加 transform/filter。背景和装饰均不能拦截点击。
|
|
21
|
+
|
|
22
|
+
滑动归档消费既有 `--swipe-x` 与 `.revealed`;卡片有 1px 边框,收起位移包含 1px 补偿。检查关闭 0px、半滑、完整展开和确认框;不得只验静态预览。
|
|
23
|
+
|
|
24
|
+
`preview.html` 是不连接主机的静态组件样板,复用实际样式。改动后执行 `npm run sync-plugin`、主题专项与仓库检查,并以实际 WebUI 验收。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html><html lang="zh-CN" data-theme="fish"><head><meta name="dsh-remote-build" content="db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7">
|
|
2
|
+
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>蓝色大肥鱼 · 晴空海湾 · 组件预览</title><link rel="stylesheet" href="../../styles.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"><link rel="stylesheet" href="../../workflow.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"><link rel="stylesheet" href="skin.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"><style>body{padding:28px 20px 40px}.preview-shell{max-width:980px;margin:auto}.preview-header{margin-bottom:26px}.preview-header h1{font-size:29px;line-height:1.3;margin:10px 0}.preview-header p{font-size:14px;max-width:680px;color:var(--dsr-muted)}.preview-layout{display:grid;grid-template-columns:390px minmax(0,1fr);gap:26px;align-items:start}iframe{display:block;width:100%;height:844px;border:1px solid var(--dsr-line);border-radius:18px;background:var(--dsr-bg)}.preview-card{padding:22px;margin:0 0 18px;background:var(--dsr-panel);border:1px solid var(--dsr-line);border-radius:12px}.preview-card h2{font-size:17px;margin:0 0 14px}.preview-card p,.preview-card li{font-size:13px;line-height:1.8;color:var(--dsr-muted)}.preview-icons{display:flex;align-items:center;gap:18px}.preview-icons img{width:58px;height:54px;object-fit:contain}.preview-links,.preview-switch{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;margin:12px 0}.preview-links a{color:var(--dsr-accent-strong)}.preview-switch button{padding:8px 16px;border:1px solid var(--dsr-line);border-radius:8px;background:var(--dsr-panel);color:var(--dsr-text);font:inherit}.preview-switch button[aria-pressed=true]{background:var(--dsr-accent);color:var(--dsr-on-accent)}@media(max-width:760px){.preview-layout{grid-template-columns:minmax(0,390px);justify-content:center}.preview-header h1{font-size:25px}}</style></head><body><main class="preview-shell"><header class="preview-header"><h1>蓝色大肥鱼 · 晴空海湾</h1><p>气泡、爱心、星星与蓝白内容卡。表情导航保留文字,立绘增加柔和贴纸边框。</p><nav class="preview-links"><a href="DESIGN.md">皮肤维护说明</a><a href="../../index.html?layout=mobile">实际手机入口</a><a href="../../desktop/desktop.html">实际桌面入口</a></nav><div class="preview-switch" role="group" aria-label="预览配色"><button type="button" data-preview-theme="fish" aria-pressed="true">蓝色大肥鱼</button></div></header><section class="preview-layout"><iframe id="phone" title="手机组件预览"></iframe><aside><section class="preview-card"><h2>表情导航 · 文字保留</h2><div class="preview-icons"><img src="icon.png" alt="会话表情"><img src="icon-wink.png" alt="文件表情"><img src="icon-star.png" alt="更多表情"></div><p>表情在原有图标位内展示,不向列表上方额外挂一排头像。文字、未读徽标与原有点击区保留。</p></section><section class="preview-card"><h2>角色与阅读层级</h2><p>原有角色图片全部保留,加入眨眼贴纸、粉色导航小圆垫和虚线贴纸框。气泡与星星留在阅读留白处。</p></section><section class="preview-card"><h2>实际界面验收</h2><ol><li>320/390px 手机与桌面布局。</li><li>立绘不压住标题和连接入口。</li><li>导航、输入区保持既有固定定位。</li><li>归档关闭、半滑、展开与确认框。</li></ol><p>此页是无主机连接的静态组件样板;完整交互以实际 WebUI 验收为准。</p></section></aside></section></main><template id="phone-components">
|
|
3
|
+
<header class="topbar"><div class="brand"><span class="brand-dot"></span><span>DSH Remote</span></div><span class="pill">未连接</span></header>
|
|
4
|
+
<main class="main" id="main"><section class="view" id="view-home">
|
|
5
|
+
<section class="workflow-start"><div class="workflow-page-head"><h1>工作空间</h1><button type="button" class="workflow-connection">工作电脑 · 连接详情</button><button type="button" class="home-doctor"><span>AI 排查问题</span><small>使用你的 DSH 和模型,只读诊断</small><b>›</b></button></div><div class="workspace-nav"><span>DSH Remote</span><button type="button" class="mini-btn">查看文件</button></div><button type="button" id="btn-new-session" class="mini-btn workflow-new-session">+ 新会话</button></section>
|
|
6
|
+
<div class="section-head"><span>最近会话</span><span>按时间</span></div>
|
|
7
|
+
<div class="session-swipe"><div class="session-card"><div class="sc-title">整理本周开发计划</div><div class="sc-meta">1 分钟前</div><div class="sc-workspace">⌂ dsh-remote</div></div></div>
|
|
8
|
+
<div class="session-swipe"><div class="session-card"><div class="sc-title">检查会话同步</div><div class="sc-meta">2 分钟前 · 运行中</div><div class="sc-workspace">⌂ dsh-remote</div></div></div>
|
|
9
|
+
<div class="session-swipe"><div class="session-card"><div class="sc-title">准备版本更新说明</div><div class="sc-meta">3 分钟前</div><div class="sc-workspace">⌂ dsh-remote</div></div></div>
|
|
10
|
+
</section></main>
|
|
11
|
+
<nav class="bottom-nav"><button type="button" class="nav-btn active" data-view="view-home"><span class="nav-ico">▦</span><span class="nav-label">会话</span></button><button type="button" class="nav-btn" data-view="view-files"><span class="nav-ico">↕</span><span class="nav-label">文件</span></button><button type="button" class="nav-btn" data-view="view-settings"><span class="nav-ico">⚙</span><span class="nav-label">更多</span></button></nav>
|
|
12
|
+
</template><script>const base=new URL('../../',location.href).href;const frame=document.getElementById('phone');frame.srcdoc='<!doctype html><html lang="zh-CN" data-theme="fish"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><base href="'+base+'"><link rel="stylesheet" href="styles.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"><link rel="stylesheet" href="workflow.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"><link rel="stylesheet" href="skins/blue-fish/skin.css?dsr-build=db1965b1fd55b19b6b76fca1c6fbbce17629afaaf951617208205ff154140ea7"></head><body class="workflow-v8">'+document.getElementById('phone-components').innerHTML+'</body></html>';document.querySelectorAll('[data-preview-theme]').forEach(button=>button.addEventListener('click',()=>{document.documentElement.dataset.theme=button.dataset.previewTheme;if(frame.contentDocument?.documentElement)frame.contentDocument.documentElement.dataset.theme=button.dataset.previewTheme;document.querySelectorAll('[data-preview-theme]').forEach(b=>b.setAttribute('aria-pressed',String(b===button)))}));</script></body></html>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* DSH Remote × 蓝色大肥鱼(DeepSeek 娘)皮肤包 · 亮色系角色皮肤
|
|
2
|
+
* ---------------------------------------------------------------------------
|
|
3
|
+
* 角色:蓝发鲸鱼娘(蓝色大肥鱼)——深蓝渐变长发、白色荷叶边发带、鲸鳍耳、
|
|
4
|
+
* 藏青连衣裙 + 白围裙、鲸尾、金色小星星。素材由用户提供的角色立绘裁切;
|
|
5
|
+
* 小图标与背景瓦片均取自同一立绘,保证整套皮肤是同一个角色。
|
|
6
|
+
*
|
|
7
|
+
* 配色变量在 public/theme-vars.css 的 html[data-theme="fish"] 块;本文件只放
|
|
8
|
+
* 装饰图标、吉祥物、圆角与动效,不改任何布局结构,也不影响其他主题。
|
|
9
|
+
*
|
|
10
|
+
* 新建同类皮肤(模板用法):
|
|
11
|
+
* 1. 复制 public/skins/blue-fish/ 为 public/skins/<name>/,替换 png 素材与装饰规则;
|
|
12
|
+
* 2. 在 public/theme-vars.css 增加 html[data-theme="<name>"] 变量块(含 color-scheme);
|
|
13
|
+
* 3. 在 public/theme.js 的 VALID 登记 <name>,并同步三端 THEME_META / i18n 标签
|
|
14
|
+
* (public/app.js、public/admin.js、public/desktop/desktop.js 及对应 HTML);
|
|
15
|
+
* 4. 四端 HTML 首帧脚本条件追加 &&t!=='<name>',并引入本皮肤样式表;
|
|
16
|
+
* 5. scripts/sync-plugin.mjs 的 dirs 已包含 skins,无需逐文件登记。
|
|
17
|
+
*
|
|
18
|
+
* 资源(均为透明留白、底部渐隐,不会被裁边):
|
|
19
|
+
* icon.png 元气笑(默认小图标) icon-star.png 星星眼
|
|
20
|
+
* icon-wink.png 眨眼(文件入口/toast) icon-sleep.png 困困(会话卡/底纹)
|
|
21
|
+
* icon-smile.png 微笑(统计卡/弹窗标题) icon-blush.png 害羞(设置卡/空状态)
|
|
22
|
+
* face.png 头部+发带+鲸鳍耳(品牌位) mascot.png 全身立绘(空状态)
|
|
23
|
+
* pattern.png 背景表情瓦片(star/sleep/blush 混排)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* 晴空海湾:淡底纹、海浪留白、蓝白内容卡;角色不再反复盖在正文后。 */
|
|
28
|
+
html[data-theme="fish"] {
|
|
29
|
+
--dsr-radius: 18px; --fish-paper: #F5FBFF; --fish-card: #FFFFFF; --fish-line: #CEDFEF;
|
|
30
|
+
--fish-soft: #EDF5FF; --fish-shadow: rgba(37, 71, 117, .065);
|
|
31
|
+
--fish-nav-chat: url("icon.png"); --fish-nav-files: url("icon-wink.png"); --fish-nav-more: url("icon-star.png");
|
|
32
|
+
background-color: var(--fish-paper);
|
|
33
|
+
background-image: radial-gradient(ellipse at 100% 0, #DDEFFF, transparent 58%), radial-gradient(ellipse at 0 100%, #DCF6FF, transparent 62%), linear-gradient(145deg, #FFFFFF, var(--fish-paper));
|
|
34
|
+
background-attachment: fixed;
|
|
35
|
+
}
|
|
36
|
+
html[data-theme="fish"] body { background: transparent; isolation: isolate; }
|
|
37
|
+
html[data-theme="fish"] body::after {
|
|
38
|
+
content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
|
|
39
|
+
background: url("pattern.png") left top / 520px 520px repeat; opacity: .32;
|
|
40
|
+
mask-image: linear-gradient(130deg, #000, transparent 50%, rgba(0, 0, 0, .55));
|
|
41
|
+
}
|
|
42
|
+
html[data-theme="fish"] body::before {
|
|
43
|
+
content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
|
|
44
|
+
background-image: url("sparkles.svg"), radial-gradient(ellipse at 100% 100%, transparent 59%, #9DD8F455 59.4% 59.7%, transparent 60.1%), radial-gradient(ellipse at 100% 100%, transparent 65%, #ADD5EC55 65.4% 65.7%, transparent 66.1%);
|
|
45
|
+
background-size: 480px 720px, 640px 300px, 740px 340px; background-position: center top, right -180px bottom 30px, right -180px bottom 30px; background-repeat: no-repeat;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* 品牌与首页立绘有各自留白,连接入口不再被全身图压住。 */
|
|
49
|
+
html[data-theme="fish"] :is(.brand-dot, .ds-logo, .plugin-brand-mark) { width: 35px; height: 30px; flex: none; border-radius: 0; background: url("face.png") center / contain no-repeat; box-shadow: none; }
|
|
50
|
+
html[data-theme="fish"] .ds-logo { font-size: 0; line-height: 0; overflow: hidden; }
|
|
51
|
+
html[data-theme="fish"] :is(.topbar, .ds-topbar) { background: #F8FCFF; border-color: var(--fish-line); box-shadow: inset 0 -2px #B8DEF3; }
|
|
52
|
+
html[data-theme="fish"] .workflow-start { background: none; border: 0; border-radius: 0; box-shadow: none; }
|
|
53
|
+
html[data-theme="fish"] .workflow-start::after { content: none; }
|
|
54
|
+
html[data-theme="fish"] .workflow-start .workflow-page-head::before { content: 'BLUE WHALE / LITTLE OCEAN'; display: block; margin-bottom: 9px; color: var(--dsr-muted); font: 9px/1.5 ui-monospace, monospace; letter-spacing: .08em; }
|
|
55
|
+
html[data-theme="fish"] .workflow-page-head h1 { color: var(--dsr-text); font-weight: 750; letter-spacing: -.03em; }
|
|
56
|
+
html[data-theme="fish"] .workflow-page-head h1::before { content: ''; display: inline-block; width: 30px; height: 27px; margin-right: 9px; vertical-align: -5px; background: url("icon-star.png") center / contain no-repeat; pointer-events: none; }
|
|
57
|
+
html[data-theme="fish"] .workflow-start .workflow-page-head h1 { position: relative; box-sizing: border-box; min-height: 64px; padding-right: 100px; display: flex; align-items: center; font-size: clamp(20px, 6vw, 24px); }
|
|
58
|
+
html[data-theme="fish"] .workflow-start .workflow-page-head h1::before { flex: none; }
|
|
59
|
+
html[data-theme="fish"] .workflow-start .workflow-page-head h1::after { content: ''; position: absolute; right: 0; top: -13px; width: 86px; height: 86px; border-radius: 48% 52% 46% 54%; background: url("mascot.png") center / contain no-repeat, #EDF6FF; box-shadow: 0 0 0 4px #FFFFFFC7, 3px 4px 0 #F8DCE8; pointer-events: none; }
|
|
60
|
+
html[data-theme="fish"] :is(.section-head > span:first-child, .overview-section-head > span:first-child, .workflow-settings-section > h2, .workflow-more-group > h2, .workflow-attention > h2, .ds-section-label)::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; vertical-align: 2px; border-radius: 50%; background: #72B8DF; pointer-events: none; }
|
|
61
|
+
|
|
62
|
+
/* 内容独立为白卡,主要操作为深海蓝;诊断与工作区选择保持中性。 */
|
|
63
|
+
html[data-theme="fish"] .workflow-v8 :is(.ds-main, #view-home .workflow-start, .queue-dock, .session-pending, .history-wrap) { background: transparent; }
|
|
64
|
+
html[data-theme="fish"] :is(.workflow-connection, .home-doctor, .workspace-nav, .workflow-settings-card, .settings-group, .stat, .teams-card, .task-card, .ext-toolbar) { background: var(--fish-card); border: 1px solid var(--fish-line); border-radius: 16px; box-shadow: 0 3px 12px var(--fish-shadow); }
|
|
65
|
+
html[data-theme="fish"] .home-doctor > span { color: var(--dsr-text); }
|
|
66
|
+
html[data-theme="fish"] .home-doctor > b { color: var(--dsr-muted); }
|
|
67
|
+
html[data-theme="fish"] .workflow-v8 :is(#btn-new-session.workflow-new-session, .ds-new-session #btn-new-session) { background: var(--dsr-accent); color: var(--dsr-on-accent); border-color: var(--dsr-accent); border-radius: 14px; font-weight: 650; box-shadow: 0 5px 14px #2F52D022; background-image: radial-gradient(circle at 95% 135%, #FFFFFF18 0 52px, transparent 53px), radial-gradient(circle at 100% 100%, #FFFFFF10 0 90px, transparent 91px); }
|
|
68
|
+
html[data-theme="fish"] .workflow-v8 :is(#btn-new-session.workflow-new-session, .ds-new-session #btn-new-session) { position: relative; }
|
|
69
|
+
html[data-theme="fish"] .workflow-v8 :is(#btn-new-session.workflow-new-session, .ds-new-session #btn-new-session)::after { content: ''; position: absolute; right: 12px; top: 8px; width: 34px; height: 29px; border: 1px solid #FFFFFF88; border-radius: 11px; background: url("icon-wink.png") center / auto 26px no-repeat, #FFFFFFEB; transform: rotate(5deg); pointer-events: none; }
|
|
70
|
+
html[data-theme="fish"] .workflow-v8 .session-swipe { margin-bottom: 8px; border: 1px solid var(--fish-line); border-radius: 15px; background: transparent; box-shadow: 0 2px 8px var(--fish-shadow); }
|
|
71
|
+
html[data-theme="fish"] .workflow-v8 .session-card { background: var(--fish-card); padding-inline: 14px; border: 0; border-radius: 13px; }
|
|
72
|
+
html[data-theme="fish"] .workflow-v8 .session-swipe:first-child .session-card::after { content: ''; position: absolute; right: 30px; bottom: 9px; width: 28px; height: 23px; background: url("icon-sleep.png") center / contain no-repeat; opacity: .78; transform: rotate(-7deg); pointer-events: none; }
|
|
73
|
+
html[data-theme="fish"] .session-card.current { background: var(--fish-soft); box-shadow: inset 3px 0 var(--dsr-accent); }
|
|
74
|
+
html[data-theme="fish"] .session-swipe .sc-archive-btn { transform: translateX(calc(100% + var(--swipe-x, 0px) + 1px)); transition: transform .18s ease; }
|
|
75
|
+
html[data-theme="fish"] .session-swipe.revealed .sc-archive-btn { transform: translateX(0); }
|
|
76
|
+
html[data-theme="fish"] .workflow-v8 #history { background: #F5FBFF url("sparkles.svg") right bottom / 480px 720px no-repeat; }
|
|
77
|
+
html[data-theme="fish"] .workflow-v8 :is(.msg.assistant, .ds-msg.assistant) { max-width: min(100%, 760px); padding: 14px 16px; background: var(--fish-card); border: 1px solid var(--fish-line); border-radius: 16px; color: var(--dsr-text); box-shadow: 0 2px 10px var(--fish-shadow); }
|
|
78
|
+
html[data-theme="fish"] :is(.msg.assistant, .ds-msg.assistant) .role::before { content: ''; display: inline-block; width: 26px; height: 23px; margin-right: 5px; vertical-align: -5px; background: url("icon.png") center / contain no-repeat; }
|
|
79
|
+
html[data-theme="fish"] .msg.user { background: var(--dsr-accent); color: var(--dsr-on-accent); border-radius: 15px; }
|
|
80
|
+
html[data-theme="fish"] .ds-msg.user { background: var(--fish-soft); color: var(--dsr-text); border-color: var(--dsr-accent-line); border-radius: 15px; }
|
|
81
|
+
html[data-theme="fish"] :is(.team-member, .team-task, .task-outcomes) { background: var(--fish-soft); border-color: var(--fish-line); }
|
|
82
|
+
|
|
83
|
+
/* 表情在原有图标位内呈现,不再在导航上方额外挂一排头像。 */
|
|
84
|
+
html[data-theme="fish"] :is(.bottom-nav, .composer-wrap, .ds-composer) { background: #FFFFFFF5; border-color: var(--fish-line); box-shadow: 0 4px 18px var(--fish-shadow); }
|
|
85
|
+
html[data-theme="fish"] .bottom-nav { border-radius: 22px; border-top: 2px solid #B7DCF1; }
|
|
86
|
+
html[data-theme="fish"] .bottom-nav::before { content: ''; position: absolute; width: 44px; height: 7px; border-radius: 0 0 50% 50%; background: #93CBEA; left: calc(50% - 22px); top: -2px; pointer-events: none; }
|
|
87
|
+
html[data-theme="fish"] .workflow-v8 .bottom-nav .nav-btn::before { content: none; }
|
|
88
|
+
html[data-theme="fish"] :is(.nav-btn, .ds-nav-item):is([data-view="view-home"], [data-view="view-sessions"], [data-view="view-overview"]) { --fish-nav-image: var(--fish-nav-chat); }
|
|
89
|
+
html[data-theme="fish"] :is(.nav-btn, .ds-nav-item)[data-view="view-files"] { --fish-nav-image: var(--fish-nav-files); }
|
|
90
|
+
html[data-theme="fish"] :is(.nav-btn, .ds-nav-item)[data-view="view-settings"] { --fish-nav-image: var(--fish-nav-more); }
|
|
91
|
+
html[data-theme="fish"] .workflow-v8 .bottom-nav .nav-btn .nav-ico { width: 48px; height: 32px; border-radius: 50%; background: var(--fish-nav-image) center / auto 29px no-repeat, #EEF7FF; opacity: .82; font-size: 0; }
|
|
92
|
+
html[data-theme="fish"] .workflow-v8 .bottom-nav .nav-btn.active .nav-ico { background: var(--fish-nav-image) center / auto 32px no-repeat, #FFF0F6; opacity: 1; box-shadow: 0 0 0 2px #FFFFFF, 0 2px 0 #F2CCDE; }
|
|
93
|
+
html[data-theme="fish"] .workflow-v8 .bottom-nav .nav-btn.active { border-radius: 15px; background: #EBF2FF; }
|
|
94
|
+
html[data-theme="fish"] :is(.bottom-nav .nav-ico, .ds-nav-ico) svg { display: none; }
|
|
95
|
+
html[data-theme="fish"] .ds-nav-item .ds-nav-ico { width: 32px; height: 28px; flex: none; background: var(--fish-nav-image) center / contain no-repeat; opacity: .82; font-size: 0; }
|
|
96
|
+
html[data-theme="fish"] .ds-nav-item.active .ds-nav-ico { opacity: 1; }
|
|
97
|
+
html[data-theme="fish"] .nav-wave-fill { fill: #FFFFFF; }
|
|
98
|
+
html[data-theme="fish"] .nav-wave-line { stroke: #B7DCF1; }
|
|
99
|
+
|
|
100
|
+
/* 桌面与辅助场景:贴纸留给侧栏和空状态,不重复盖在每条会话上。 */
|
|
101
|
+
html[data-theme="fish"] .ds-sidebar { background-color: #F8FCFF; background-image: linear-gradient(#FFFFFFE8, #F1F9FFE8), url("pattern.png"); background-size: auto, 360px 360px; border-color: var(--fish-line); }
|
|
102
|
+
html[data-theme="fish"] .ds-brand { border-top: 3px solid #9ACFEA; }
|
|
103
|
+
html[data-theme="fish"] .ds-session-item { border-radius: 12px; border-left: 2px solid #CFE5F5; }
|
|
104
|
+
html[data-theme="fish"] .ds-session-item.current { border-left-color: var(--dsr-accent); }
|
|
105
|
+
html[data-theme="fish"] .ds-session-list::after { content: '♡ BLUE WHALE ♡'; display: block; flex: none; min-height: 142px; margin: auto 12px 16px; padding: 124px 6px 10px; border: 1px dashed #AFD1E9; border-radius: 22px 18px 24px 18px; background: url("mascot.png") center 8px / auto 106px no-repeat, linear-gradient(150deg, #FFF6FB, #EDF9FF); color: var(--dsr-muted); font: 9px/1.5 ui-monospace, monospace; letter-spacing: .10em; text-align: center; pointer-events: none; }
|
|
106
|
+
html[data-theme="fish"] :is(.empty, .ds-empty)::before { content: ''; display: block; width: 128px; height: 132px; margin: 0 auto 10px; background: url("mascot.png") center / contain no-repeat; pointer-events: none; }
|
|
107
|
+
html[data-theme="fish"] .overview-empty::before { content: ''; display: inline-block; width: 25px; height: 22px; margin-right: 6px; vertical-align: -4px; background: url("icon-sleep.png") center / contain no-repeat; }
|
|
108
|
+
html[data-theme="fish"] .workflow-subpage-identity .workflow-setting-icon { position: relative; }
|
|
109
|
+
html[data-theme="fish"] .workflow-subpage-identity .workflow-setting-icon::after { content: ''; position: absolute; right: -5px; bottom: -4px; width: 25px; height: 22px; background: url("icon-blush.png") center / contain no-repeat; pointer-events: none; }
|
|
110
|
+
html[data-theme="fish"] :is(.modal-title, .ds-modal-title, .admin-title h1)::before { content: ''; display: inline-block; width: 25px; height: 22px; margin-right: 7px; vertical-align: -4px; background: url("icon-smile.png") center / contain no-repeat; }
|
|
111
|
+
html[data-theme="fish"] .toast::before { content: ''; display: inline-block; width: 25px; height: 22px; margin-right: 6px; vertical-align: -4px; background: url("icon-wink.png") center / contain no-repeat; }
|
|
112
|
+
html[data-theme="fish"] .ext-eyebrow::before { content: ''; display: inline-block; width: 24px; height: 22px; margin-right: 6px; vertical-align: -4px; background: url("icon-star.png") center / contain no-repeat; }
|
|
113
|
+
html[data-theme="fish"] .onboarding-restart-icon { background: var(--fish-soft); border-radius: 11px; }
|
|
114
|
+
html[data-theme="fish"] .onboarding-restart-icon::before { content: ''; width: 27px; height: 23px; background: url("icon-smile.png") center / contain no-repeat; }
|
|
115
|
+
html[data-theme] .theme-option[data-theme="fish"] { background: linear-gradient(135deg, #FFFFFF, #EAF6FF); border-color: #B9D7F2; color: #17284F; }
|
|
116
|
+
html[data-theme] .theme-option[data-theme="fish"] .theme-name { color: #17284F; }
|
|
117
|
+
html[data-theme] .theme-option[data-theme="fish"] .theme-check { color: #2440B0; }
|
|
118
|
+
html[data-theme] .theme-option[data-theme="fish"] .theme-swatches { position: relative; }
|
|
119
|
+
html[data-theme] .theme-option[data-theme="fish"] .theme-swatches::after { content: ''; position: absolute; right: 3px; bottom: 2px; width: 36px; height: 30px; background: url("icon-star.png") center / contain no-repeat; pointer-events: none; }
|
|
120
|
+
@media (max-width: 360px) { html[data-theme="fish"] .workflow-start .workflow-page-head h1 { padding-right: 82px; } html[data-theme="fish"] .workflow-start .workflow-page-head h1::before { width: 25px; margin-right: 7px; } html[data-theme="fish"] .workflow-start .workflow-page-head h1::after { width: 72px; height: 78px; top: -5px; } }
|
|
121
|
+
@media (prefers-reduced-motion: reduce) { html[data-theme="fish"] .sc-archive-btn { transition: none; } }
|
|
122
|
+
@media (prefers-reduced-transparency: reduce) { html[data-theme="fish"] :is(.bottom-nav, .composer-wrap, .ds-composer) { background: #FFFFFF; backdrop-filter: none; -webkit-backdrop-filter: none; } }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="720" viewBox="0 0 480 720" fill="none">
|
|
2
|
+
<g stroke="#A3D6EF" stroke-width="1.8" opacity=".7">
|
|
3
|
+
<circle cx="34" cy="78" r="12"/><circle cx="46" cy="49" r="4"/>
|
|
4
|
+
<circle cx="432" cy="186" r="18"/><circle cx="453" cy="148" r="5"/>
|
|
5
|
+
<circle cx="48" cy="527" r="18"/><circle cx="74" cy="553" r="5"/>
|
|
6
|
+
<circle cx="408" cy="636" r="24"/><circle cx="437" cy="598" r="7"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g fill="#F3D88A" opacity=".8">
|
|
9
|
+
<path d="m94 173 3 10 10 3-10 3-3 10-3-10-10-3 10-3Z"/>
|
|
10
|
+
<path d="m395 361 4 13 13 4-13 4-4 13-4-13-13-4 13-4Z"/>
|
|
11
|
+
<path d="m117 653 2.5 8.5 8.5 2.5-8.5 2.5-2.5 8.5-2.5-8.5-8.5-2.5 8.5-2.5Z"/>
|
|
12
|
+
</g>
|
|
13
|
+
<g fill="#F3BDCF" opacity=".65">
|
|
14
|
+
<path d="M366 67c-10-8-18 6 0 17 18-11 10-25 0-17Z"/>
|
|
15
|
+
<path d="M69 352c-8-7-15 5 0 14 15-9 8-21 0-14Z"/>
|
|
16
|
+
</g>
|
|
17
|
+
<g fill="#B7DFF4" opacity=".6"><circle cx="119" cy="48" r="3"/><circle cx="371" cy="273" r="3"/><circle cx="100" cy="454" r="3"/><circle cx="347" cy="581" r="3"/></g>
|
|
18
|
+
</svg>
|