dsh-session-guard 4.1.5 → 4.1.15

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.
@@ -1,69 +0,0 @@
1
- /**
2
- * dsh-session-guard — 无设置页宿主(0.1.0/0.1.1)的兜底配置入口。
3
- *
4
- * 壳级 `shell.overlay` 席位渲染:右下角固定齿轮钮,点开固定定位浮层承载
5
- * SessionGuardCard(page 形态,默认展开)。配置存储全在 host 侧(settings
6
- * 服务),浮层与宿主设置页解耦——壳再老也不影响读写。有设置页的宿主上
7
- * 该齿轮与行配置卡/家族 tab 并存,作为全局快捷入口。
8
- */
9
- import { useState } from 'react'
10
- import { SessionGuardCard } from './settings-card'
11
- import type { SessionGuardConfig } from './settings-card'
12
- import type { SettingsScope } from './scope-face'
13
-
14
- export function ShellSettingsEntry(props: {
15
- scope: SettingsScope<SessionGuardConfig>
16
- }): JSX.Element {
17
- const [open, setOpen] = useState(false)
18
- return (
19
- <div style={{ position: 'fixed', right: 16, bottom: 64, zIndex: 10000 }}>
20
- {open && (
21
- <div
22
- onClick={() => setOpen(false)}
23
- style={{ position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, background: 'rgba(0,0,0,.45)', zIndex: 10000 }}
24
- />
25
- )}
26
- {open && (
27
- <div
28
- style={{
29
- position: 'fixed',
30
- top: '6vh',
31
- left: '50%',
32
- transform: 'translateX(-50%)',
33
- width: 'min(760px, 92vw)',
34
- maxHeight: '84vh',
35
- overflowY: 'auto',
36
- zIndex: 10001,
37
- }}
38
- >
39
- <button
40
- type="button"
41
- onClick={() => setOpen(false)}
42
- style={{ position: 'sticky', top: 6, float: 'right', marginRight: 8, zIndex: 2 }}
43
- >
44
- ✕ 关闭
45
- </button>
46
- <SessionGuardCard scope={props.scope} />
47
- </div>
48
- )}
49
- <button
50
- type="button"
51
- title="会话守护设置"
52
- onClick={() => setOpen(state => !state)}
53
- style={{
54
- width: 40,
55
- height: 40,
56
- borderRadius: '50%',
57
- border: '1px solid rgba(127,127,127,.4)',
58
- background: 'rgba(30,30,32,.85)',
59
- color: 'inherit',
60
- cursor: 'pointer',
61
- fontSize: 16,
62
- boxShadow: '0 4px 16px rgba(0,0,0,.35)',
63
- }}
64
- >
65
- 🛡
66
- </button>
67
- </div>
68
- )
69
- }