@goodandready/dsh-remote-workspace 0.3.3 → 0.3.4
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/lib/client.js +29 -6
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7,6 +7,9 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
const React = require('react')
|
|
8
8
|
|
|
9
9
|
const NS = 'dsh-remote-workspace'
|
|
10
|
+
// Plugins page row seat (DSH 0.1.6-alpha.2): key = '<package name>#<row id>'.
|
|
11
|
+
const ROW_ID = 'dsh-remote-workspace'
|
|
12
|
+
const ROW_CONFIG_KEY = '@goodandready/dsh-remote-workspace#' + ROW_ID
|
|
10
13
|
|
|
11
14
|
function ensureCss() {
|
|
12
15
|
if (typeof document === 'undefined') return
|
|
@@ -2191,16 +2194,23 @@ window.__ModuleLoader__.load({
|
|
|
2191
2194
|
}
|
|
2192
2195
|
|
|
2193
2196
|
function PluginCard(props) {
|
|
2194
|
-
const
|
|
2197
|
+
const page = !!(props && props.view === 'page')
|
|
2198
|
+
const [open, setOpen] = React.useState(!!page)
|
|
2195
2199
|
const t = props.t || (props.locale === 'zh' ? makeT(zh, en) : makeT(en, zh))
|
|
2196
2200
|
|
|
2197
2201
|
React.useEffect(() => {
|
|
2198
2202
|
ensureCss()
|
|
2199
2203
|
}, [])
|
|
2200
2204
|
|
|
2205
|
+
// Row seat (plugins.row.config): the host page draws title/icon/crumb and the
|
|
2206
|
+
// padding, so the summary is a one-liner and the page drops our card chrome.
|
|
2207
|
+
if (props && props.view === 'summary') {
|
|
2208
|
+
return React.createElement('span', { style: { fontSize: '13px', color: 'var(--dsw-alias-label-secondary)' } }, t('subtitle'))
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2201
2211
|
return React.createElement(
|
|
2202
|
-
'li',
|
|
2203
|
-
{ className: 'drw-card', style: { listStyle: 'none', marginBottom: '12px' } },
|
|
2212
|
+
page ? 'div' : 'li',
|
|
2213
|
+
{ className: page ? 'drw-page' : 'drw-card', style: page ? undefined : { listStyle: 'none', marginBottom: '12px' } },
|
|
2204
2214
|
React.createElement(
|
|
2205
2215
|
'button',
|
|
2206
2216
|
{
|
|
@@ -2209,13 +2219,13 @@ window.__ModuleLoader__.load({
|
|
|
2209
2219
|
background: 'none',
|
|
2210
2220
|
border: 'none',
|
|
2211
2221
|
cursor: 'pointer',
|
|
2212
|
-
display: 'flex',
|
|
2222
|
+
display: page ? 'none' : 'flex',
|
|
2213
2223
|
alignItems: 'center',
|
|
2214
2224
|
width: '100%',
|
|
2215
2225
|
padding: 0,
|
|
2216
2226
|
textAlign: 'left',
|
|
2217
2227
|
},
|
|
2218
|
-
'aria-expanded': open,
|
|
2228
|
+
'aria-expanded': page ? true : open,
|
|
2219
2229
|
onClick: () => setOpen((v) => !v),
|
|
2220
2230
|
},
|
|
2221
2231
|
React.createElement('span', { style: { fontSize: '20px', marginRight: '12px' } }, '🌐'),
|
|
@@ -2232,7 +2242,7 @@ window.__ModuleLoader__.load({
|
|
|
2232
2242
|
React.createElement(FallbackChevron)
|
|
2233
2243
|
)
|
|
2234
2244
|
),
|
|
2235
|
-
open
|
|
2245
|
+
(page || open)
|
|
2236
2246
|
? React.createElement(
|
|
2237
2247
|
'div',
|
|
2238
2248
|
{ style: { marginTop: '16px', borderTop: '1px solid var(--dsw-alias-border-l2)', paddingTop: '16px' } },
|
|
@@ -2290,6 +2300,19 @@ window.__ModuleLoader__.load({
|
|
|
2290
2300
|
}
|
|
2291
2301
|
|
|
2292
2302
|
if (ctx.slots && typeof ctx.slots.inject === 'function') {
|
|
2303
|
+
// Row seat first (the seat the current core renders), legacy seat after it.
|
|
2304
|
+
ctx.slots.inject('plugins.row.config', () =>
|
|
2305
|
+
ctx.slots.register(
|
|
2306
|
+
{
|
|
2307
|
+
name: 'plugins.row.config',
|
|
2308
|
+
key: ROW_CONFIG_KEY,
|
|
2309
|
+
locale: NS,
|
|
2310
|
+
inject: () => ({ ctx })
|
|
2311
|
+
},
|
|
2312
|
+
(props) => React.createElement(PluginCard, Object.assign({}, props, { ctx }))
|
|
2313
|
+
)
|
|
2314
|
+
)
|
|
2315
|
+
|
|
2293
2316
|
ctx.slots.inject('settings.plugin.item', () =>
|
|
2294
2317
|
ctx.slots.register(
|
|
2295
2318
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-remote-workspace",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Enterprise Remote Workspace Plugin for DeepSeek Harness: SSH2 connection pool, SFTP operations, 3-way conflict-aware mirror sync, port forwarding, and native DSH UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|