dsh-mesh-access 1.4.3 → 1.4.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/CHANGELOG.md +5 -0
- package/lib/client.js +22 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -387,15 +387,30 @@ window.__ModuleLoader__.load({
|
|
|
387
387
|
: mode === 'basic' ? '已切到账号密码模式:弹窗登录一次,24 小时内该设备免登录'
|
|
388
388
|
: '已关闭入口登录:任何知道地址的人都能打开,请确认你接受')
|
|
389
389
|
const firstUrl = (tn.url || tn.urlPlain) && a.key ? (tn.url || tn.urlPlain) + '?meshkey=' + encodeURIComponent(a.key) : null
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
const modes = [
|
|
391
|
+
{ m: 'key', label: '密钥' },
|
|
392
|
+
{ m: 'basic', label: '账号密码' },
|
|
393
|
+
{ m: 'off', label: '关闭' },
|
|
394
|
+
]
|
|
395
|
+
const segItem = (m, label, active) => h('div', {
|
|
396
|
+
style: {
|
|
397
|
+
padding: '6px 16px', borderRadius: 999, cursor: 'pointer', fontSize: 13,
|
|
398
|
+
background: active ? 'rgba(88,166,255,.9)' : 'transparent',
|
|
399
|
+
color: active ? '#fff' : 'inherit',
|
|
400
|
+
fontWeight: active ? 600 : 400,
|
|
401
|
+
transition: 'all .15s ease', userSelect: 'none',
|
|
402
|
+
},
|
|
403
|
+
onClick: () => { if (!authBusy && !active) setMode(m) },
|
|
393
404
|
}, label)
|
|
394
405
|
return h('div', null,
|
|
395
|
-
h('div', {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
406
|
+
h('div', {
|
|
407
|
+
style: {
|
|
408
|
+
display: 'inline-flex', gap: 4, padding: 4, borderRadius: 999,
|
|
409
|
+
border: '1px solid rgba(127,127,127,.4)', background: 'rgba(127,127,127,.12)',
|
|
410
|
+
marginBottom: 4,
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
modes.map(x => segItem(x.m, x.label, a.mode === x.m)),
|
|
399
414
|
),
|
|
400
415
|
authMsg ? h('div', { style: { ...S.hint, color: '#7ee787', marginTop: 8 } }, authMsg) : null,
|
|
401
416
|
a.mode === 'key'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mesh-access",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Control your DSH from your phone: opens a port on the mesh/VPN interface from inside the running server process, so a phone browser gets the same instance and the same session list — no SSH, no second dsh. Also reachable from another PC, a GUI NAS, or a TV box.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|