dsh-remote-plugin 0.8.7 → 0.9.0
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 +16 -5
- package/README.md +15 -4
- package/apk/dsh-remote.apk +0 -0
- package/gateway.cjs +659 -130
- package/index.mjs +33 -1
- package/package.json +8 -3
- package/public/activity.js +196 -52
- package/public/admin.html +34 -32
- package/public/admin.js +11 -2
- package/public/app.js +1341 -223
- package/public/bc-integration.css +81 -0
- package/public/build.json +2 -2
- package/public/composer-tools.css +184 -0
- package/public/composer-tools.js +888 -0
- package/public/desktop/desktop.html +104 -76
- package/public/desktop/desktop.js +668 -101
- package/public/diagnostics.js +30 -4
- package/public/e2ee-transport.js +154 -7
- package/public/file-inbox.js +77 -18
- package/public/genui.css +10 -0
- package/public/genui.js +22 -4
- package/public/history.js +15 -2
- package/public/host-queue.js +232 -0
- package/public/host-schedule.js +301 -0
- package/public/host-state.css +19 -0
- package/public/index.html +347 -140
- package/public/md.js +21 -1
- package/public/network.js +33 -1
- package/public/onboarding.js +3 -3
- package/public/operations.js +26 -12
- package/public/plan-review.css +297 -0
- package/public/plan-review.js +621 -0
- package/public/plugin.html +29 -27
- package/public/relay-autopair.js +25 -10
- package/public/relay-settings.css +11 -0
- package/public/relay-settings.js +350 -28
- package/public/session-management.css +61 -0
- package/public/session-management.js +742 -0
- package/public/session-search.css +137 -0
- package/public/session-search.js +977 -0
- package/public/skins/blue-fish/preview.html +3 -3
- package/public/skins/bocchi/preview.html +5 -5
- package/public/skins/kita/preview.html +6 -6
- package/public/skins/miku/SOURCES.json +10 -0
- package/public/skins/miku/chibi.png +0 -0
- package/public/skins/miku/preview.html +33 -0
- package/public/skins/miku/skin.css +82 -0
- package/public/skins/nijika/preview.html +6 -6
- package/public/skins/penguin/preview.html +3 -3
- package/public/skins/penguin-logistics/cargo.svg +4 -0
- package/public/skins/penguin-logistics/console.svg +4 -0
- package/public/skins/penguin-logistics/mark.svg +4 -0
- package/public/skins/penguin-logistics/radio.svg +4 -0
- package/public/skins/penguin-logistics/skin.css +292 -0
- package/public/skins/penguin-logistics/standing.png +0 -0
- package/public/skins/ryo/preview.html +6 -6
- package/public/slash-suggestions.css +43 -0
- package/public/slash-suggestions.js +196 -0
- package/public/sponsor-entry.js +11 -3
- package/public/styles.css +141 -21
- package/public/subagents.css +7 -0
- package/public/subagents.js +83 -10
- package/public/theme-vars.css +102 -3
- package/public/theme.js +7 -4
- package/public/turn-diff.css +323 -0
- package/public/turn-diff.js +778 -0
- package/public/update.json +12 -12
- package/public/version.json +1 -1
- package/public/workflow.css +322 -43
- package/public/workflow.js +148 -44
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="zh-CN" data-theme="ryo">
|
|
3
3
|
<head>
|
|
4
|
-
<meta name="dsh-remote-build" content="
|
|
4
|
+
<meta name="dsh-remote-build" content="62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979">
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
7
7
|
<title>山田凉 · 皮肤样板预览</title>
|
|
8
|
-
<link rel="stylesheet" href="../../styles.css?dsr-build=
|
|
9
|
-
<link rel="stylesheet" href="../../workflow.css?dsr-build=
|
|
10
|
-
<link rel="stylesheet" href="../kessoku/skin.css?dsr-build=
|
|
11
|
-
<link rel="stylesheet" href="skin.css?dsr-build=
|
|
8
|
+
<link rel="stylesheet" href="../../styles.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979">
|
|
9
|
+
<link rel="stylesheet" href="../../workflow.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979">
|
|
10
|
+
<link rel="stylesheet" href="../kessoku/skin.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979">
|
|
11
|
+
<link rel="stylesheet" href="skin.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979">
|
|
12
12
|
<style>
|
|
13
13
|
/* 只负责展示页排版;画框内完全复用实际组件样式,不重画玻璃或背景。 */
|
|
14
14
|
body{padding:28px 20px 40px}.preview-shell{max-width:980px;margin:auto}.preview-label{font:11px ui-monospace,monospace;letter-spacing:.15em;color:var(--dsr-muted)}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
<script>
|
|
52
52
|
const base=new URL('../../',location.href).href
|
|
53
|
-
document.getElementById('phone').srcdoc='<!doctype html><html lang="zh-CN" data-theme="ryo"><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=
|
|
53
|
+
document.getElementById('phone').srcdoc='<!doctype html><html lang="zh-CN" data-theme="ryo"><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=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979"><link rel="stylesheet" href="workflow.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979"><link rel="stylesheet" href="skins/kessoku/skin.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979"><link rel="stylesheet" href="skins/ryo/skin.css?dsr-build=62134119698eef6589b38ff6409a46d4160345043eb1aad1ba54e22b19d0b979"></head><body class="workflow-v8">'+document.getElementById('phone-components').innerHTML+'</body></html>'
|
|
54
54
|
</script>
|
|
55
55
|
</body>
|
|
56
56
|
</html>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.slash-suggestions {
|
|
2
|
+
position: absolute;
|
|
3
|
+
z-index: 5;
|
|
4
|
+
bottom: calc(100% + 6px);
|
|
5
|
+
inset-inline-start: 0;
|
|
6
|
+
width: min(100%, 28rem);
|
|
7
|
+
max-height: min(16rem, 35vh);
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
padding: 4px;
|
|
12
|
+
border: 1px solid var(--dsr-line);
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
background: var(--dsr-panel);
|
|
15
|
+
box-shadow: 0 8px 24px var(--dsr-shadow);
|
|
16
|
+
}
|
|
17
|
+
.slash-suggestions[hidden] { display: none; }
|
|
18
|
+
.slash-suggestions > button {
|
|
19
|
+
display: grid;
|
|
20
|
+
width: 100%;
|
|
21
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
22
|
+
align-items: center;
|
|
23
|
+
column-gap: 10px;
|
|
24
|
+
min-height: 44px;
|
|
25
|
+
padding: 7px 10px;
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: 8px;
|
|
28
|
+
background: transparent;
|
|
29
|
+
color: var(--dsr-text);
|
|
30
|
+
font: inherit;
|
|
31
|
+
text-align: start;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
.slash-suggestions > button:hover,
|
|
35
|
+
.slash-suggestions > button[aria-selected="true"] { background: var(--dsr-accent-soft); }
|
|
36
|
+
.slash-suggestion-title,
|
|
37
|
+
.slash-suggestion-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
38
|
+
.slash-suggestion-title { font-size: 13px; font-weight: 600; }
|
|
39
|
+
.slash-suggestion-kind,
|
|
40
|
+
.slash-suggestion-description { color: var(--dsr-muted); font-size: 12px; }
|
|
41
|
+
.slash-suggestion-description { grid-column: 1 / -1; }
|
|
42
|
+
.composer-wrap.fs .slash-suggestions { top: 44px; bottom: auto; }
|
|
43
|
+
.ds-composer-input { position: relative; display: flex; }
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
;(function (root) {
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
let closeMenu
|
|
5
|
+
let openPanel
|
|
6
|
+
|
|
7
|
+
function mount({ input, context, readSkills, t, panel, chipClass, chipAttribute }) {
|
|
8
|
+
const menu = document.createElement('div')
|
|
9
|
+
menu.id = input.id + '-suggestions'
|
|
10
|
+
menu.className = 'slash-suggestions'
|
|
11
|
+
menu.hidden = true
|
|
12
|
+
menu.setAttribute('role', 'listbox')
|
|
13
|
+
input.setAttribute('aria-autocomplete', 'list')
|
|
14
|
+
input.parentElement.prepend(menu)
|
|
15
|
+
|
|
16
|
+
let catalog = null, matches = [], selected = null
|
|
17
|
+
const query = () => /^[ \t]*\/([a-z0-9_-]*)$/i.exec(input.value)?.[1]?.toLowerCase()
|
|
18
|
+
|
|
19
|
+
function readCommands(scope) {
|
|
20
|
+
const path = '/remote/api/command?sessionId=' + encodeURIComponent(scope.sessionId)
|
|
21
|
+
return fetch(scope.url(path), { headers: scope.headers, signal: AbortSignal.timeout(5000) })
|
|
22
|
+
.then(response => response.ok ? response.json() : null)
|
|
23
|
+
.then(result => Array.isArray(result?.commands) ? result.commands : null)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const named = item => typeof item?.name === 'string' && /^[a-z0-9][a-z0-9_-]{0,199}$/.test(item.name)
|
|
27
|
+
let panelRequest = 0
|
|
28
|
+
const shortcuts = panel ? [...panel.querySelectorAll(`[${chipAttribute}]`)] : []
|
|
29
|
+
openPanel = async () => {
|
|
30
|
+
if (!panel) return
|
|
31
|
+
const request = ++panelRequest
|
|
32
|
+
const scope = context()
|
|
33
|
+
panel.replaceChildren(...shortcuts)
|
|
34
|
+
if (!scope) return
|
|
35
|
+
try {
|
|
36
|
+
const commands = await readCommands(scope)
|
|
37
|
+
if (request !== panelRequest || !scope.valid() || !commands) return
|
|
38
|
+
const entries = new Map(shortcuts.map(chip => [chip.getAttribute(chipAttribute).slice(1), chip]))
|
|
39
|
+
const names = new Set()
|
|
40
|
+
const chips = []
|
|
41
|
+
for (const item of commands) {
|
|
42
|
+
if (!named(item) || item.name === 'permission' || names.has(item.name)) continue
|
|
43
|
+
names.add(item.name)
|
|
44
|
+
const chip = entries.get(item.name) || document.createElement('button')
|
|
45
|
+
if (!entries.has(item.name)) {
|
|
46
|
+
chip.type = 'button'
|
|
47
|
+
chip.className = chipClass
|
|
48
|
+
chip.setAttribute(chipAttribute, '/' + item.name)
|
|
49
|
+
chip.textContent = '/' + item.name + (item.description ? ' ' + item.description : '')
|
|
50
|
+
}
|
|
51
|
+
chips.push(chip)
|
|
52
|
+
}
|
|
53
|
+
panel.replaceChildren(...chips)
|
|
54
|
+
} catch { /* Keep shortcuts available on gateways without a command directory. */ }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function close() {
|
|
58
|
+
const visible = !menu.hidden
|
|
59
|
+
catalog = null
|
|
60
|
+
matches = []
|
|
61
|
+
selected = null
|
|
62
|
+
menu.hidden = true
|
|
63
|
+
menu.replaceChildren()
|
|
64
|
+
releaseInputAria()
|
|
65
|
+
return visible
|
|
66
|
+
}
|
|
67
|
+
closeMenu = close
|
|
68
|
+
|
|
69
|
+
function releaseInputAria() {
|
|
70
|
+
if (input.getAttribute('aria-controls') !== menu.id) return
|
|
71
|
+
input.setAttribute('aria-expanded', 'false')
|
|
72
|
+
input.removeAttribute('aria-controls')
|
|
73
|
+
input.removeAttribute('aria-activedescendant')
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function highlight() {
|
|
77
|
+
const index = matches.findIndex(item => item.name === selected)
|
|
78
|
+
for (const [i, option] of [...menu.children].entries()) {
|
|
79
|
+
option.setAttribute('aria-selected', String(index === i))
|
|
80
|
+
}
|
|
81
|
+
const option = menu.children[index]
|
|
82
|
+
if (option) {
|
|
83
|
+
input.setAttribute('aria-activedescendant', option.id)
|
|
84
|
+
option.scrollIntoView({ block: 'nearest' })
|
|
85
|
+
} else if (input.getAttribute('aria-controls') === menu.id) input.removeAttribute('aria-activedescendant')
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function render() {
|
|
89
|
+
const prefix = query()
|
|
90
|
+
if (prefix === undefined || !catalog?.valid() || document.activeElement !== input) {
|
|
91
|
+
close()
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
const names = new Map()
|
|
95
|
+
for (const item of [...catalog.commands, ...catalog.skills]) {
|
|
96
|
+
if (!named(item)) continue
|
|
97
|
+
if (!names.has(item.name) && item.name.startsWith(prefix)) names.set(item.name, item)
|
|
98
|
+
}
|
|
99
|
+
matches = [...names.values()]
|
|
100
|
+
menu.setAttribute('aria-label', t('slash.suggestions'))
|
|
101
|
+
menu.replaceChildren(...matches.map((item, index) => {
|
|
102
|
+
const option = document.createElement('button')
|
|
103
|
+
option.type = 'button'
|
|
104
|
+
option.tabIndex = -1
|
|
105
|
+
option.id = menu.id + '-' + index
|
|
106
|
+
option.dataset.index = index
|
|
107
|
+
option.setAttribute('role', 'option')
|
|
108
|
+
const title = document.createElement('span')
|
|
109
|
+
title.className = 'slash-suggestion-title'
|
|
110
|
+
title.textContent = '/' + item.name + (item.hint ? ' ' + item.hint : '')
|
|
111
|
+
const kind = document.createElement('span')
|
|
112
|
+
kind.className = 'slash-suggestion-kind'
|
|
113
|
+
kind.textContent = t(item.kind === 'skill' ? 'slash.skill' : 'slash.command')
|
|
114
|
+
option.append(title, kind)
|
|
115
|
+
if (item.description) {
|
|
116
|
+
const description = document.createElement('span')
|
|
117
|
+
description.className = 'slash-suggestion-description'
|
|
118
|
+
description.textContent = item.description
|
|
119
|
+
option.append(description)
|
|
120
|
+
}
|
|
121
|
+
return option
|
|
122
|
+
}))
|
|
123
|
+
menu.hidden = !matches.length
|
|
124
|
+
if (menu.hidden) {
|
|
125
|
+
releaseInputAria()
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
input.setAttribute('aria-expanded', 'true')
|
|
129
|
+
input.setAttribute('aria-controls', menu.id)
|
|
130
|
+
highlight()
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function refresh(event) {
|
|
134
|
+
if (event.isComposing) return close()
|
|
135
|
+
if (query() === undefined) return close()
|
|
136
|
+
if (!catalog?.valid()) {
|
|
137
|
+
const scope = context()
|
|
138
|
+
if (!scope) return close()
|
|
139
|
+
const pending = { ...scope, commands: [], skills: [] }
|
|
140
|
+
catalog = pending
|
|
141
|
+
function receive(kind, rows) {
|
|
142
|
+
if (catalog !== pending) return
|
|
143
|
+
pending[kind] = Array.isArray(rows) ? rows.map(item => ({
|
|
144
|
+
...item, kind: kind === 'skills' ? 'skill' : 'command',
|
|
145
|
+
})) : []
|
|
146
|
+
render()
|
|
147
|
+
}
|
|
148
|
+
void readCommands(scope).then(rows => receive('commands', rows)).catch(() => {})
|
|
149
|
+
void readSkills(scope.sessionId).then(result => receive('skills', result?.skills)).catch(() => {})
|
|
150
|
+
}
|
|
151
|
+
selected = null
|
|
152
|
+
render()
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function choose(item) {
|
|
156
|
+
if (!item || !catalog?.valid() || query() === undefined) return close()
|
|
157
|
+
close()
|
|
158
|
+
input.value = '/' + item.name + ' '
|
|
159
|
+
input.focus()
|
|
160
|
+
input.setSelectionRange(input.value.length, input.value.length)
|
|
161
|
+
input.dispatchEvent(new Event('input', { bubbles: true }))
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
input.addEventListener('input', refresh)
|
|
165
|
+
input.addEventListener('compositionend', refresh)
|
|
166
|
+
input.addEventListener('focus', refresh)
|
|
167
|
+
input.addEventListener('blur', close)
|
|
168
|
+
menu.addEventListener('mousedown', event => event.preventDefault())
|
|
169
|
+
menu.addEventListener('click', event => {
|
|
170
|
+
const option = event.target.closest('[data-index]')
|
|
171
|
+
if (option) choose(matches[Number(option.dataset.index)])
|
|
172
|
+
})
|
|
173
|
+
input.addEventListener('keydown', event => {
|
|
174
|
+
if (event.isComposing || event.defaultPrevented || !catalog) return
|
|
175
|
+
if (event.key === 'Escape') {
|
|
176
|
+
event.preventDefault()
|
|
177
|
+
event.stopPropagation()
|
|
178
|
+
close()
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
if (menu.hidden || !catalog.valid() || query() === undefined || event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) return
|
|
182
|
+
const index = matches.findIndex(item => item.name === selected)
|
|
183
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
184
|
+
event.preventDefault()
|
|
185
|
+
const next = event.key === 'ArrowDown' ? index + 1 : index < 0 ? matches.length - 1 : index - 1
|
|
186
|
+
selected = matches[(next + matches.length) % matches.length].name
|
|
187
|
+
highlight()
|
|
188
|
+
} else if (event.key === 'Tab' || (event.key === 'Enter' && index >= 0)) {
|
|
189
|
+
event.preventDefault()
|
|
190
|
+
choose(matches[Math.max(0, index)])
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
root.DshSlashSuggestions = { mount, close: () => closeMenu?.(), openPanel: () => openPanel?.() }
|
|
196
|
+
})(window)
|
package/public/sponsor-entry.js
CHANGED
|
@@ -3,19 +3,27 @@
|
|
|
3
3
|
'use strict'
|
|
4
4
|
const applicationUrl='https://relay-pilot.blankalwaysgoeson.site/sponsor/'
|
|
5
5
|
const entries=new WeakMap()
|
|
6
|
+
let inAppEntry=null
|
|
7
|
+
function openPortal(manage=false) {
|
|
8
|
+
if(manage&&typeof root.NativeBackground?.openCloudRelayManagement==='function')root.NativeBackground.openCloudRelayManagement()
|
|
9
|
+
else if(typeof root.NativeBackground?.openCloudRelay==='function')root.NativeBackground.openCloudRelay()
|
|
10
|
+
else return false
|
|
11
|
+
return true
|
|
12
|
+
}
|
|
6
13
|
function mount(target) {
|
|
7
14
|
if(!target)return
|
|
8
15
|
let entry=entries.get(target)
|
|
9
16
|
if(!entry){
|
|
10
17
|
const line=document.createElement('p'),link=document.createElement('a'),note=document.createElement('span')
|
|
11
18
|
line.className='sponsor-entry';link.href=applicationUrl;link.target='_blank';link.rel='noopener noreferrer'
|
|
19
|
+
link.addEventListener('click',event=>{if(inAppEntry){event.preventDefault();inAppEntry()}})
|
|
12
20
|
line.append(link,note);target.append(line);entry={line,link,note};entries.set(target,entry)
|
|
13
21
|
}
|
|
14
22
|
const en=root.I18N?.lang==='en'
|
|
15
|
-
entry.link.textContent=en?'
|
|
16
|
-
entry.note.textContent=en?'
|
|
23
|
+
entry.link.textContent=en?'Cloud relay · Apply, check status or renew':'云中转 · 开通、查询与续费'
|
|
24
|
+
entry.note.textContent=en?'See the application page for pricing. The base plan includes 5GB per service month for one gateway.':'价格以办理页为准。基础档每服务月 5GB,绑定一台网关。'
|
|
17
25
|
return entry.line
|
|
18
26
|
}
|
|
19
|
-
root.DshSponsor={applicationUrl,mount}
|
|
27
|
+
root.DshSponsor={applicationUrl,mount,openPortal,setInAppEntry:entry=>{inAppEntry=entry}}
|
|
20
28
|
for(const body of document.querySelectorAll('.donate-body'))mount(body)
|
|
21
29
|
})(typeof window!=='undefined'?window:globalThis)
|
package/public/styles.css
CHANGED
|
@@ -47,8 +47,8 @@ body { padding-bottom: calc(92px + var(--dsr-safe-b)); }
|
|
|
47
47
|
.brand-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.14; }
|
|
48
48
|
.brand-name { white-space: nowrap; }
|
|
49
49
|
.brand-group-name { max-width: 16ch; overflow: hidden; color: var(--dsr-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .15px; text-overflow: ellipsis; white-space: nowrap; }
|
|
50
|
-
.brand-
|
|
51
|
-
.brand-trigger[aria-expanded="true"] .brand-
|
|
50
|
+
.brand-sidebar-icon { width: 19px; height: 19px; flex: none; color: var(--dsr-muted); }
|
|
51
|
+
.brand-trigger[aria-expanded="true"] .brand-sidebar-icon { color: var(--dsr-accent-strong); }
|
|
52
52
|
.brand-dot {
|
|
53
53
|
width: 10px; height: 10px; border-radius: 50%;
|
|
54
54
|
background: linear-gradient(135deg, var(--dsr-brand-a), var(--dsr-brand-b));
|
|
@@ -85,33 +85,153 @@ button {
|
|
|
85
85
|
.topbar-right .conn-badge:active { filter: brightness(.92); }
|
|
86
86
|
.topbar-right .topbar-btn.conn-badge { padding: 0 14px; border-radius: 999px; font-size: 12.5px; }
|
|
87
87
|
|
|
88
|
-
/* ----------
|
|
89
|
-
.group-drawer-backdrop {
|
|
90
|
-
|
|
88
|
+
/* ---------- 快捷侧栏 ---------- */
|
|
89
|
+
.group-drawer-backdrop {
|
|
90
|
+
position: fixed; inset: 0; z-index: 70; border: 0;
|
|
91
|
+
background: var(--dsr-overlay);
|
|
92
|
+
background: color-mix(in srgb, var(--dsr-overlay) 82%, transparent);
|
|
93
|
+
animation: group-drawer-dim .18s ease-out;
|
|
94
|
+
}
|
|
95
|
+
.group-drawer {
|
|
96
|
+
--drawer-rail-width: 64px;
|
|
97
|
+
--drawer-open-width: min(352px, calc(100vw - 24px));
|
|
98
|
+
--drawer-radius: 22px;
|
|
99
|
+
--drawer-ease: cubic-bezier(.2, .7, .25, 1);
|
|
100
|
+
--drawer-tint: var(--dsr-accent-soft);
|
|
101
|
+
--drawer-row: var(--dsr-bg-2);
|
|
102
|
+
position: fixed; inset: max(8px, var(--dsr-safe-top)) auto max(8px, var(--dsr-safe-b)) 8px;
|
|
103
|
+
z-index: 71; display: flex; width: var(--drawer-rail-width); overflow: hidden;
|
|
104
|
+
border-radius: var(--drawer-radius); background: var(--dsr-panel);
|
|
105
|
+
box-shadow: 0 14px 44px var(--dsr-shadow);
|
|
106
|
+
transition: width .24s var(--drawer-ease);
|
|
107
|
+
animation: group-drawer-in .22s var(--drawer-ease);
|
|
108
|
+
}
|
|
109
|
+
.group-drawer[data-panel]:not([data-panel=""]) { width: var(--drawer-open-width); }
|
|
91
110
|
.group-drawer.hidden, .group-drawer-backdrop.hidden { display: none; }
|
|
92
|
-
@keyframes group-drawer-in { from { opacity: .
|
|
111
|
+
@keyframes group-drawer-in { from { opacity: .55; transform: translateX(-18px); } }
|
|
112
|
+
@keyframes group-drawer-dim { from { opacity: 0; } }
|
|
113
|
+
@keyframes group-drawer-content-in { from { opacity: 0; transform: translateX(-5px); } }
|
|
93
114
|
body.group-drawer-open { overflow: hidden; }
|
|
94
|
-
.group-drawer-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
.group-drawer-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
.group-drawer-rail {
|
|
116
|
+
display: flex; flex: 0 0 var(--drawer-rail-width); flex-direction: column; align-items: center; gap: 8px;
|
|
117
|
+
padding-block: 8px;
|
|
118
|
+
background: linear-gradient(165deg, var(--drawer-tint), transparent 75%);
|
|
119
|
+
}
|
|
120
|
+
.group-drawer-icons {
|
|
121
|
+
display: flex; flex: 1; flex-direction: column; align-items: center; gap: 4px;
|
|
122
|
+
width: 100%; min-height: 0; padding: 4px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
|
|
123
|
+
}
|
|
124
|
+
.group-drawer-icon {
|
|
125
|
+
position: relative; display: grid; flex: none; place-items: center; width: 44px; height: 44px;
|
|
126
|
+
padding: 0; border-radius: 15px; color: var(--dsr-muted);
|
|
127
|
+
transition: background-color .16s ease, color .16s ease, transform .16s var(--drawer-ease);
|
|
128
|
+
}
|
|
129
|
+
.group-drawer-icon[hidden] { display: none; }
|
|
130
|
+
.group-drawer-icon svg { width: 22px; height: 22px; }
|
|
131
|
+
.group-drawer-icon[aria-expanded="true"], .group-drawer-create { background: var(--dsr-accent-soft); color: var(--dsr-accent-strong); }
|
|
132
|
+
.group-drawer :is(.group-drawer-icon,.group-drawer-session):active { background: var(--dsr-bg-2); }
|
|
133
|
+
.group-drawer-icon:active { transform: scale(.94); }
|
|
134
|
+
.group-drawer-pending { position: absolute; top: 0; inset-inline-end: 0; min-width: 18px; padding: 1px 4px; border-radius: 999px; background: var(--dsr-warning-soft); color: var(--dsr-warning); font-size: 10px; font-weight: 650; }
|
|
135
|
+
.group-drawer-panel {
|
|
136
|
+
display: flex; flex: 0 0 calc(var(--drawer-open-width) - var(--drawer-rail-width)); flex-direction: column; min-width: 0;
|
|
137
|
+
background: linear-gradient(155deg, var(--drawer-tint), transparent 100px);
|
|
138
|
+
}
|
|
139
|
+
.group-drawer-panel[hidden], .group-drawer-panel [hidden] { display: none; }
|
|
140
|
+
.group-drawer-head, .group-drawer-body { padding-inline: var(--mobile-page-gutter, 16px); }
|
|
141
|
+
.group-drawer-head { display: grid; grid-template-columns: var(--drawer-heading-columns, minmax(0, 1fr) 44px); align-items: center; gap: 7px; padding-block: 8px 4px; }
|
|
142
|
+
.group-drawer-head::before {
|
|
143
|
+
content: ''; display: var(--drawer-mark-display, none); width: 28px; height: 28px; border-radius: 10px;
|
|
144
|
+
background: var(--drawer-avatar, none), var(--dsr-accent-soft);
|
|
145
|
+
}
|
|
146
|
+
.group-drawer-head h3 { margin: 0; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
|
|
147
|
+
.group-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding-block: 8px 16px; overscroll-behavior: contain; }
|
|
148
|
+
.group-drawer-body > [data-drawer-panel]:not([hidden]) { animation: group-drawer-content-in .20s var(--drawer-ease); }
|
|
149
|
+
#group-drawer #session-search-host { margin: 0; }
|
|
150
|
+
#session-search-host .dr-search-query-field { flex: none; }
|
|
151
|
+
#session-search-host .dr-search-input { font-size: 16px; }
|
|
152
|
+
.group-drawer-host { display: grid; gap: 3px; width: 100%; min-height: 44px; margin-bottom: 12px; padding: 8px 12px; border-radius: 14px; background: var(--drawer-row, var(--dsr-bg-2)); color: var(--dsr-muted); font-size: 12px; text-align: start; }
|
|
153
|
+
#group-drawer-connection { color: var(--dsr-accent-strong); font-weight: 650; overflow-wrap: anywhere; }
|
|
154
|
+
.group-drawer-empty { margin: 8px 0 12px; color: var(--dsr-muted); font-size: 13px; }
|
|
155
|
+
.group-drawer-list { display: flex; flex-direction: column; gap: 4px; }
|
|
156
|
+
.group-drawer-preview-row {
|
|
157
|
+
display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
|
|
158
|
+
padding: 7px 10px; border-radius: 12px; background: var(--drawer-row, var(--dsr-bg-2)); text-align: start;
|
|
159
|
+
}
|
|
160
|
+
.group-drawer-preview-row > svg { width: 20px; height: 20px; flex: none; color: var(--dsr-muted); }
|
|
161
|
+
button.group-drawer-preview-row:active { background: var(--dsr-accent-soft); }
|
|
162
|
+
#group-drawer-new .modal-card {
|
|
163
|
+
width: auto; max-width: none; max-height: none; overflow: visible;
|
|
164
|
+
padding: 0; border: 0; background: transparent; box-shadow: none;
|
|
165
|
+
}
|
|
166
|
+
#group-drawer-new .modal-title { display: none; }
|
|
167
|
+
.group-drawer-session { display: grid; gap: 1px; align-content: center; min-height: 48px; padding: 6px 12px; border-radius: 14px; background: var(--drawer-row, var(--dsr-bg-2)); text-align: start; }
|
|
168
|
+
.group-drawer-session.current { background: var(--dsr-accent-soft); }
|
|
169
|
+
.group-drawer-session-title, .group-drawer-session-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
170
|
+
.group-drawer-session-title { font-size: 14px; font-weight: 600; }
|
|
171
|
+
.group-drawer-session-meta { font-size: 12px; color: var(--dsr-muted); }
|
|
172
|
+
.group-drawer-option { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 6px 12px; border-radius: 14px; color: var(--dsr-text); text-align: start; }
|
|
103
173
|
.group-drawer-option:active { background: var(--dsr-bg-2); }
|
|
104
|
-
.group-drawer-option.current {
|
|
174
|
+
.group-drawer-option.current { background: var(--dsr-accent-soft); }
|
|
105
175
|
.group-drawer-option-mark { width: 10px; height: 10px; flex: none; border: 2px solid var(--dsr-line); border-radius: 50%; }
|
|
106
176
|
.group-drawer-option.current .group-drawer-option-mark { border-color: var(--dsr-accent); background: var(--dsr-accent); box-shadow: 0 0 0 4px var(--dsr-accent-soft); }
|
|
107
177
|
.group-drawer-option-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
|
|
108
178
|
.group-drawer-option-name { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
|
|
109
179
|
.group-drawer-option-meta { overflow: hidden; color: var(--dsr-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
|
|
110
180
|
.group-drawer-option-check { flex: none; color: var(--dsr-accent-strong); font-size: 18px; font-weight: 750; }
|
|
111
|
-
.group-drawer-
|
|
112
|
-
.group-drawer-
|
|
113
|
-
.group-drawer-
|
|
114
|
-
.group-drawer-
|
|
181
|
+
.group-drawer-version { display: grid; gap: 4px; padding: 8px 12px; border-radius: 14px; background: var(--drawer-row, var(--dsr-bg-2)); font-size: 13px; color: var(--dsr-muted); overflow-wrap: anywhere; }
|
|
182
|
+
.group-drawer-version strong { color: var(--dsr-text); font-variant-numeric: tabular-nums; }
|
|
183
|
+
.group-drawer-panel .group-drawer-panel-action { width: 100%; min-height: 44px; margin-top: 12px; border: 0; border-radius: 14px; background: var(--dsr-accent-soft); white-space: normal; overflow-wrap: anywhere; }
|
|
184
|
+
.group-drawer-panel .group-drawer-panel-action:active { background: var(--dsr-panel-2); }
|
|
185
|
+
.group-drawer-edit-help { margin: 0 2px 10px; color: var(--dsr-muted); font-size: 13px; }
|
|
186
|
+
.group-drawer-toggle { display: grid; grid-template-columns: 20px minmax(0, 1fr) 34px; align-items: center; gap: 8px; min-height: 48px; padding: 7px 9px; border-radius: 13px; background: var(--drawer-row, var(--dsr-bg-2)); font-size: 14px; line-height: 1.4; cursor: pointer; }
|
|
187
|
+
.group-drawer-toggle svg { width: 20px; height: 20px; color: var(--dsr-muted); }
|
|
188
|
+
.group-drawer-toggle input {
|
|
189
|
+
appearance: none; display: grid; align-items: center; width: 34px; height: 20px; margin: 0; padding: 2px;
|
|
190
|
+
border: 1px solid var(--dsr-line); border-radius: 999px; background: var(--dsr-panel);
|
|
191
|
+
color: var(--dsr-muted); cursor: pointer; transition: background-color .16s ease, border-color .16s ease;
|
|
192
|
+
}
|
|
193
|
+
.group-drawer-toggle input::after {
|
|
194
|
+
content: ''; width: 12px; height: 12px; border-radius: 50%;
|
|
195
|
+
background: currentColor; transform: translateX(0); transition: transform .18s var(--drawer-ease);
|
|
196
|
+
}
|
|
197
|
+
.group-drawer-toggle input:checked { background: var(--dsr-accent-soft); border-color: var(--dsr-accent-line); color: var(--dsr-accent-strong); }
|
|
198
|
+
.group-drawer-toggle input:checked::after { transform: translateX(14px); }
|
|
199
|
+
@media (forced-colors: active) {
|
|
200
|
+
.group-drawer-toggle input { appearance: auto; }
|
|
201
|
+
.group-drawer-toggle input::after { display: none; }
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* 卡通主题把原有头像和纸面色带进标题,功能图标仍用一致的线条。 */
|
|
205
|
+
html:is([data-theme="bocchi"],[data-theme="nijika"],[data-theme="ryo"],[data-theme="kita"]) .group-drawer {
|
|
206
|
+
--drawer-tint: var(--btr-wash);
|
|
207
|
+
--drawer-row: var(--btr-paper);
|
|
208
|
+
--drawer-avatar: var(--drawer-avatar-image) center / contain no-repeat;
|
|
209
|
+
}
|
|
210
|
+
html[data-theme="bocchi"] .group-drawer { --drawer-avatar-image: url("skins/bocchi/face.png"); }
|
|
211
|
+
html[data-theme="nijika"] .group-drawer { --drawer-avatar-image: url("skins/nijika/face.png"); }
|
|
212
|
+
html[data-theme="ryo"] .group-drawer { --drawer-avatar-image: url("skins/ryo/face.png"); }
|
|
213
|
+
html[data-theme="kita"] .group-drawer { --drawer-avatar-image: url("skins/kita/face.png"); }
|
|
214
|
+
html[data-theme="fish"] .group-drawer {
|
|
215
|
+
--drawer-tint: #DFEEFF;
|
|
216
|
+
--drawer-row: var(--fish-paper);
|
|
217
|
+
--drawer-avatar: url("skins/blue-fish/face.png") center / contain no-repeat;
|
|
218
|
+
}
|
|
219
|
+
html[data-theme="miku"] .group-drawer {
|
|
220
|
+
--drawer-tint: var(--miku-tint);
|
|
221
|
+
--drawer-row: var(--miku-paper);
|
|
222
|
+
--drawer-avatar: url("skins/miku/chibi.png") center 8% / auto 68px no-repeat;
|
|
223
|
+
}
|
|
224
|
+
html:is([data-theme="penguin"],[data-theme="penguin-night"]) .group-drawer {
|
|
225
|
+
--drawer-row: var(--pgn-soft-surface);
|
|
226
|
+
--drawer-avatar: url("skins/penguin/face.png") center / contain no-repeat;
|
|
227
|
+
}
|
|
228
|
+
html[data-theme="penguin-logistics"] .group-drawer {
|
|
229
|
+
--drawer-avatar: url("skins/penguin-logistics/mark.svg") center / 19px no-repeat;
|
|
230
|
+
}
|
|
231
|
+
html:is([data-theme="bocchi"],[data-theme="nijika"],[data-theme="ryo"],[data-theme="kita"],[data-theme="fish"],[data-theme="miku"],[data-theme="penguin"],[data-theme="penguin-night"],[data-theme="penguin-logistics"]) .group-drawer {
|
|
232
|
+
--drawer-heading-columns: 28px minmax(0, 1fr) 44px;
|
|
233
|
+
--drawer-mark-display: block;
|
|
234
|
+
}
|
|
115
235
|
.mini-btn {
|
|
116
236
|
padding: 5px 11px; border-radius: 9px; font-size: 13px;
|
|
117
237
|
background: var(--dsr-panel); border: 1px solid var(--dsr-line); color: var(--dsr-accent-strong);
|
|
@@ -1470,4 +1590,4 @@ body.in-session #session-sub { min-height:32px; padding:4px 2px; }
|
|
|
1470
1590
|
@media (min-width: 1400px) {
|
|
1471
1591
|
.main { max-width: 1320px; }
|
|
1472
1592
|
.composer-wrap { max-width: 1320px; }
|
|
1473
|
-
}
|
|
1593
|
+
}
|
package/public/subagents.css
CHANGED
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
.subtree-detail{position:sticky;top:0;min-width:0;padding:21px;border:1px solid var(--dsr-line);border-radius:16px;background:var(--dsr-panel)}
|
|
37
37
|
.subtree-eyebrow{font-size:11px;color:var(--dsr-muted);letter-spacing:.06em}.subtree-detail h3{font-size:18px;line-height:1.4;margin:9px 0 12px;overflow-wrap:anywhere}
|
|
38
38
|
.subtree-detail-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:20px}.subtree-kind{font-size:11px;color:var(--dsr-muted)}
|
|
39
|
+
.subtree-agent-name{font-size:11px;color:var(--dsr-muted);overflow-wrap:anywhere}
|
|
40
|
+
.subtree-badge[data-activity="completed"]{color:var(--dsr-success)}
|
|
39
41
|
.subtree-field-label{margin-top:16px;font-size:11px;color:var(--dsr-muted)}.subtree-path{font-size:12px;line-height:1.7;margin:5px 0 0;overflow-wrap:anywhere}
|
|
40
42
|
.subtree-id{display:block;font-size:11px;line-height:1.6;margin-top:6px;padding:8px;border-radius:7px;background:var(--dsr-code-bg);overflow-wrap:anywhere;user-select:text}
|
|
41
43
|
.subtree-parent{max-width:100%;min-width:44px;min-height:44px;text-align:start;overflow-wrap:anywhere;padding:4px 0;border:0;background:transparent;color:var(--dsr-accent-strong)!important;font-size:12px!important}
|
|
@@ -59,3 +61,8 @@ body.viewing-subagent .composer-wrap,body.viewing-subagent .ds-composer,body.vie
|
|
|
59
61
|
@media(max-width:800px){.subtree-search{font-size:16px}}
|
|
60
62
|
.subtree-list .subtree-list .subtree-list .subtree-list .subtree-list .subtree-list{padding-inline-start:0;margin-inline-start:10px;border-color:transparent}
|
|
61
63
|
.subtree-list .subtree-list .subtree-list .subtree-list .subtree-list .subtree-list>li::before{display:none}
|
|
64
|
+
.subtree-team{margin-top:20px;padding-top:15px;border-top:1px solid var(--dsr-line)}
|
|
65
|
+
.subtree-team h4{margin:0 0 10px;font-size:14px}
|
|
66
|
+
.subtree-team-tasks{list-style:none;margin:0;padding:0;display:grid;gap:8px}
|
|
67
|
+
.subtree-team-tasks>li{min-width:0;padding:10px;border:1px solid var(--dsr-line);border-radius:8px;overflow-wrap:anywhere}
|
|
68
|
+
.subtree-team-tasks .subtree-note{margin-top:6px}
|