@ddtcorex/dsh-maestro-config 0.2.0 → 0.2.1
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 +27 -21
- package/lib/types/client/MaestroSettings.d.ts.map +1 -1
- package/lib/types/client/components/BrandMark.d.ts +9 -0
- package/lib/types/client/components/BrandMark.d.ts.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/client/MaestroSettings.tsx +16 -16
- package/src/client/components/BrandMark.tsx +22 -0
- package/src/client/index.tsx +7 -5
package/lib/client.js
CHANGED
|
@@ -3006,7 +3006,7 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3006
3006
|
[data-maestro-tab][data-active="true"]:hover { background:var(--dsw-specific-sidebar-nav-item-active, #EBEEF2); }
|
|
3007
3007
|
[data-maestro-tab]:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary, #4f6ef7); outline-offset:1px; }
|
|
3008
3008
|
[data-maestro-panel] { width:100%; min-width:0; box-sizing:border-box; }
|
|
3009
|
-
/* label
|
|
3009
|
+
/* label/input overlap fix: flex column gap + full width */
|
|
3010
3010
|
[data-maestro-panel] label { gap:6px !important; }
|
|
3011
3011
|
[data-maestro-row]:last-child { border-bottom:none !important; }
|
|
3012
3012
|
[data-maestro-panel] label > span { width:100% !important; box-sizing:border-box !important; }
|
|
@@ -3114,6 +3114,7 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3114
3114
|
const next = { ...prev };
|
|
3115
3115
|
for (const [k, v] of Object.entries(patch)) {
|
|
3116
3116
|
if (k === "telegram" && typeof v === "object" && v !== null) next.telegram = { ...prev.telegram ?? {}, ...v };
|
|
3117
|
+
else if (k === "policy" && typeof v === "object" && v !== null) next.policy = { ...prev.policy ?? {}, ...v };
|
|
3117
3118
|
else next[k] = v;
|
|
3118
3119
|
}
|
|
3119
3120
|
return next;
|
|
@@ -3265,7 +3266,6 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3265
3266
|
};
|
|
3266
3267
|
const TABS = [
|
|
3267
3268
|
{ id: "tunnel", label: "Tunnel" },
|
|
3268
|
-
{ id: "notify", label: "Notify" },
|
|
3269
3269
|
{ id: "gitlab", label: "GitLab" },
|
|
3270
3270
|
{ id: "review", label: "Review" },
|
|
3271
3271
|
{ id: "guard", label: "Guard" },
|
|
@@ -3290,14 +3290,6 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3290
3290
|
(0, import_react.createElement)("div", { style: { ...cardInsetStyle, marginTop: "12px" } }, (0, import_react.createElement)("div", { style: { fontSize: 13, fontWeight: 600, color: t.labelPrimary } }, "Remote access \u2014 LAN"), (0, import_react.createElement)(LanAccess, { proxyStatus, lanPin: lanPinEnabled === null ? null : { enabled: lanPinEnabled, pin: lanPin, show: showLanPin, onShow: revealLanPin, onHide: () => setShowLanPin(false), onRotate: rotateLanPin, onToggle: toggleLanPin } })),
|
|
3291
3291
|
(0, import_react.createElement)("div", { style: { ...cardInsetStyle, marginTop: "12px" } }, (0, import_react.createElement)("div", { style: { fontSize: 13, fontWeight: 600, color: t.labelPrimary } }, "Public access"), (0, import_react.createElement)(PublicAccess, { status, pin, showPin, onRevealPin: revealPin, onHidePin: () => setShowPin(false), onRotatePin: rotatePin }))
|
|
3292
3292
|
),
|
|
3293
|
-
notify: (0, import_react.createElement)(
|
|
3294
|
-
"div",
|
|
3295
|
-
{ style: { display: "flex", flexDirection: "column" } },
|
|
3296
|
-
(0, import_react.createElement)("div", { style: { padding: "12px 0", borderBottom: `1px solid ${t.borderL2}` } }, (0, import_react.createElement)("p", { style: captionStyle }, "Sends one protected startup update with the current public-access PIN to a single chat. Leave either credential blank to disable.")),
|
|
3297
|
-
(0, import_react.createElement)(SettingRow, { title: "Bot token", description: "Telegram bot token from @BotFather.", control: (0, import_react.createElement)("div", { style: { display: "flex", gap: 8, alignItems: "center" } }, (0, import_react.createElement)(FieldInput, { placeholder: "123456:ABC-DEF...", type: "password", autoComplete: "off", value: config.hasTelegramBotToken ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : "", onChange: (e) => saveField("telegramBotToken", e.target.value), style: { width: 220 } }), config.hasTelegramBotToken ? (0, import_react.createElement)(Button, { variant: "outline", size: "md", onClick: () => saveField("telegramBotToken", "") }, "Clear") : null) }),
|
|
3298
|
-
(0, import_react.createElement)(SettingRow, { title: "Chat ID", description: "Target chat, e.g. -1001234567890.", control: (0, import_react.createElement)(FieldInput, { placeholder: "-1001234567890", value: config.telegramChatId ?? "", onChange: (e) => saveField("telegramChatId", e.target.value), style: { width: 220 } }) }),
|
|
3299
|
-
(0, import_react.createElement)(ToggleRow, { title: "Also notify about reviews", description: "One message per review run with its outcome.", checked: config.telegramReviewNotifications === true, onChange: (v) => saveField("telegramReviewNotifications", v) })
|
|
3300
|
-
),
|
|
3301
3293
|
gitlab: (0, import_react.createElement)(
|
|
3302
3294
|
"div",
|
|
3303
3295
|
{ style: { display: "flex", flexDirection: "column" } },
|
|
@@ -3367,9 +3359,10 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3367
3359
|
notifier: (0, import_react.createElement)(
|
|
3368
3360
|
"div",
|
|
3369
3361
|
{ style: { display: "flex", flexDirection: "column" } },
|
|
3370
|
-
(0, import_react.createElement)(
|
|
3371
|
-
(0, import_react.createElement)(SettingRow, { title: "
|
|
3372
|
-
(0, import_react.createElement)(
|
|
3362
|
+
(0, import_react.createElement)("div", { style: { padding: "12px 0", borderBottom: `1px solid ${t.borderL2}` } }, (0, import_react.createElement)("p", { style: captionStyle }, "Telegram bot settings for notifications: startup PIN, review digests, PIN rotation. Leave blank to disable.")),
|
|
3363
|
+
(0, import_react.createElement)(SettingRow, { title: "Bot token", description: "Telegram bot token from @BotFather.", control: (0, import_react.createElement)("div", { style: { display: "flex", gap: 8, alignItems: "center" } }, (0, import_react.createElement)(FieldInput, { type: "password", autoComplete: "off", value: notifierCfg.telegram?.botToken ?? "", placeholder: "123456:ABC-DEF...", onChange: (e) => saveNotifierCfg({ telegram: { botToken: e.target.value } }), style: { width: 220 } }), notifierCfg.telegram?.botToken ? (0, import_react.createElement)(Button, { variant: "outline", size: "md", onClick: () => saveNotifierCfg({ telegram: { botToken: "" } }) }, "Clear") : null) }),
|
|
3364
|
+
(0, import_react.createElement)(SettingRow, { title: "Chat ID", description: "Target chat, e.g. -1001234567890.", control: (0, import_react.createElement)(FieldInput, { value: notifierCfg.telegram?.chatId ?? "", placeholder: "-1001234567890", onChange: (e) => saveNotifierCfg({ telegram: { chatId: e.target.value } }), style: { width: 220 } }) }),
|
|
3365
|
+
(0, import_react.createElement)(ToggleRow, { title: "Review notifications", description: "Also notify about finished reviews.", checked: notifierCfg.policy?.reviewNotifications === true, onChange: (v) => saveNotifierCfg({ policy: { reviewNotifications: v } }) })
|
|
3373
3366
|
)
|
|
3374
3367
|
};
|
|
3375
3368
|
return (0, import_react.createElement)(
|
|
@@ -3377,10 +3370,21 @@ function MaestroSettingsTab({ rpcCall, configRpcCall }) {
|
|
|
3377
3370
|
{ "data-maestro-settings-card": "", style: { display: "flex", flexDirection: "column", gap: 8, width: "100%", maxWidth: 640, minWidth: 0, boxSizing: "border-box" } },
|
|
3378
3371
|
(0, import_react.createElement)(
|
|
3379
3372
|
"div",
|
|
3380
|
-
{ style: { padding: "2px 2px 8px" } },
|
|
3381
|
-
|
|
3382
|
-
(0, import_react.createElement)(
|
|
3373
|
+
{ style: { padding: "2px 2px 8px", display: "flex", gap: 10, alignItems: "flex-start" } },
|
|
3374
|
+
// Shared BrandBadge — same as dashboard sidebar/popup (BrandMark #0A84FF)
|
|
3375
|
+
(0, import_react.createElement)(
|
|
3376
|
+
"span",
|
|
3377
|
+
{ "data-maestro-logo": "", style: { width: 28, height: 28, borderRadius: 8, display: "inline-flex", alignItems: "center", justifyContent: "center", background: "var(--dsw-alias-brand-primary, #0A84FF)", backgroundColor: "#0A84FF", color: "#fff", flex: "none", border: "1px solid rgba(0,0,0,0.08)", boxShadow: "0 0 0 1px var(--dsw-alias-border-l1)", boxSizing: "border-box", alignSelf: "flex-start", marginTop: 2 } },
|
|
3378
|
+
(0, import_react.createElement)("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, (0, import_react.createElement)("path", { d: "M2 11 L5 4 L8 9 L11 4 L14 11", stroke: "currentColor", strokeWidth: 1.6, strokeLinecap: "round", strokeLinejoin: "round" }))
|
|
3379
|
+
),
|
|
3380
|
+
(0, import_react.createElement)(
|
|
3381
|
+
"div",
|
|
3382
|
+
{ style: { display: "flex", flexDirection: "column", minWidth: 0 } },
|
|
3383
|
+
(0, import_react.createElement)("div", { style: { fontSize: 15, fontWeight: 600, color: t.labelPrimary, lineHeight: "22px" } }, "Maestro"),
|
|
3384
|
+
(0, import_react.createElement)("div", { style: { fontSize: 12, color: t.labelSecondary, lineHeight: "16px", marginTop: 2 } }, "Tunnel, access, review & guard \u2014 all via the shared Maestro store. Uses the same tokens and primitives as DSH settings.")
|
|
3385
|
+
)
|
|
3383
3386
|
),
|
|
3387
|
+
(0, import_react.createElement)("style", {}, "[data-maestro-logo]{background:#0A84FF !important; background-color:#0A84FF !important; color:#fff !important;}"),
|
|
3384
3388
|
(0, import_react.createElement)(
|
|
3385
3389
|
"div",
|
|
3386
3390
|
{ "data-maestro-tabs": "", role: "tablist", "aria-label": "Maestro settings sections" },
|
|
@@ -3430,9 +3434,10 @@ function registerSettingsNavIcon(label, root) {
|
|
|
3430
3434
|
// src/client/index.tsx
|
|
3431
3435
|
var SETTINGS_NAV_CSS = `
|
|
3432
3436
|
|
|
3433
|
-
/* maestro: replace the settings-nav fallback gear with the Maestro M-logo glyph */
|
|
3434
|
-
[${SETTINGS_NAV_MARKER}] > svg:first-child
|
|
3435
|
-
|
|
3437
|
+
/* maestro: replace the settings-nav fallback gear with the Maestro M-logo glyph \u2014 same mark as sidebar/popup BrandMark */
|
|
3438
|
+
[${SETTINGS_NAV_MARKER}] > svg:first-child,
|
|
3439
|
+
[${SETTINGS_NAV_MARKER}] > svg.zWKi1a_navIcon {
|
|
3440
|
+
display: none !important;
|
|
3436
3441
|
}
|
|
3437
3442
|
|
|
3438
3443
|
[${SETTINGS_NAV_MARKER}]::before {
|
|
@@ -3440,9 +3445,10 @@ var SETTINGS_NAV_CSS = `
|
|
|
3440
3445
|
flex: none;
|
|
3441
3446
|
width: 16px;
|
|
3442
3447
|
height: 16px;
|
|
3448
|
+
display: inline-block;
|
|
3443
3449
|
background: currentColor;
|
|
3444
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.
|
|
3445
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.
|
|
3450
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11 L5 4 L8 9 L11 4 L14 11'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
3451
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11 L5 4 L8 9 L11 4 L14 11'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
3446
3452
|
}
|
|
3447
3453
|
`;
|
|
3448
3454
|
var inject = ["slots", "connection"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../src/client/MaestroSettings.tsx"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AA0hCH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,aAAa,CAAC,EAAE,GAAG,CAAA;CAAE;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MaestroSettings.d.ts","sourceRoot":"","sources":["../../../src/client/MaestroSettings.tsx"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AA0hCH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,aAAa,CAAC,EAAE,GAAG,CAAA;CAAE;;;;;;;;;mBA+XmE,GAAG;;gBAoBzK"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function MaestroMark(props: {
|
|
2
|
+
size?: number;
|
|
3
|
+
}): import("react").ReactSVGElement;
|
|
4
|
+
export declare function BrandBadge(props: {
|
|
5
|
+
size?: number;
|
|
6
|
+
outer?: number;
|
|
7
|
+
radius?: number;
|
|
8
|
+
}): import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
|
9
|
+
//# sourceMappingURL=BrandMark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandMark.d.ts","sourceRoot":"","sources":["../../../../src/client/components/BrandMark.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,mCAKnD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,8DAYnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AA0CA,UAAU,SAAS;IACjB,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAC3B,MAAM,CAAC,EAAE,EAAE,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACtD;AAED,eAAO,MAAM,MAAM,kCAAmC,CAAA;AAatD,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CA+B1C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddtcorex/dsh-maestro-config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Maestro Config — shared settings service for the dsh-maestro-* suite over the single namespaced store (~/.dsh/maestro/settings.json)",
|
|
6
6
|
"type": "module",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
37
|
-
"@deepseek-ai/dsh-client-connection": "0.1.
|
|
37
|
+
"@deepseek-ai/dsh-client-connection": "0.1.2-alpha.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@ddtcorex/dsh-maestro-config-lib": "^0.1.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
44
|
-
"@deepseek-ai/dsh-client-connection": "0.1.
|
|
44
|
+
"@deepseek-ai/dsh-client-connection": "0.1.2-alpha.2",
|
|
45
45
|
"@types/node": "^22.0.0",
|
|
46
46
|
"@types/qrcode": "^1.5.6",
|
|
47
47
|
"@types/react": "~18.3.1",
|
|
@@ -1087,7 +1087,7 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1087
1087
|
[data-maestro-tab][data-active="true"]:hover { background:var(--dsw-specific-sidebar-nav-item-active, #EBEEF2); }
|
|
1088
1088
|
[data-maestro-tab]:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary, #4f6ef7); outline-offset:1px; }
|
|
1089
1089
|
[data-maestro-panel] { width:100%; min-width:0; box-sizing:border-box; }
|
|
1090
|
-
/* label
|
|
1090
|
+
/* label/input overlap fix: flex column gap + full width */
|
|
1091
1091
|
[data-maestro-panel] label { gap:6px !important; }
|
|
1092
1092
|
[data-maestro-row]:last-child { border-bottom:none !important; }
|
|
1093
1093
|
[data-maestro-panel] label > span { width:100% !important; box-sizing:border-box !important; }
|
|
@@ -1196,6 +1196,7 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1196
1196
|
const next = { ...prev }
|
|
1197
1197
|
for (const [k, v] of Object.entries(patch)) {
|
|
1198
1198
|
if (k === 'telegram' && typeof v === 'object' && v !== null) (next as any).telegram = { ...((prev as any).telegram ?? {}), ...(v as any) }
|
|
1199
|
+
else if (k === 'policy' && typeof v === 'object' && v !== null) (next as any).policy = { ...((prev as any).policy ?? {}), ...(v as any) }
|
|
1199
1200
|
else (next as any)[k] = v
|
|
1200
1201
|
}
|
|
1201
1202
|
return next
|
|
@@ -1351,7 +1352,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1351
1352
|
// Nested tabs like plugin marketplace — pill bar + single panel (market catsWrap catsRow pattern)
|
|
1352
1353
|
const TABS = [
|
|
1353
1354
|
{ id: 'tunnel', label: 'Tunnel' },
|
|
1354
|
-
{ id: 'notify', label: 'Notify' },
|
|
1355
1355
|
{ id: 'gitlab', label: 'GitLab' },
|
|
1356
1356
|
{ id: 'review', label: 'Review' },
|
|
1357
1357
|
{ id: 'guard', label: 'Guard' },
|
|
@@ -1377,14 +1377,6 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1377
1377
|
h('div', { style: { ...cardInsetStyle, marginTop: '12px' } }, h('div', { style: { fontSize: 13, fontWeight: 600, color: t.labelPrimary as string } }, 'Remote access — LAN'), h(LanAccess as any, { proxyStatus, lanPin: lanPinEnabled === null ? null : { enabled: lanPinEnabled, pin: lanPin, show: showLanPin, onShow: revealLanPin, onHide: () => setShowLanPin(false), onRotate: rotateLanPin, onToggle: toggleLanPin } })),
|
|
1378
1378
|
h('div', { style: { ...cardInsetStyle, marginTop: '12px' } }, h('div', { style: { fontSize: 13, fontWeight: 600, color: t.labelPrimary as string } }, 'Public access'), h(PublicAccess as any, { status, pin, showPin, onRevealPin: revealPin, onHidePin: () => setShowPin(false), onRotatePin: rotatePin })),
|
|
1379
1379
|
),
|
|
1380
|
-
notify: h(
|
|
1381
|
-
'div',
|
|
1382
|
-
{ style: { display: 'flex', flexDirection: 'column' } },
|
|
1383
|
-
h('div', { style: { padding: '12px 0', borderBottom: `1px solid ${t.borderL2}` } }, h('p', { style: captionStyle }, 'Sends one protected startup update with the current public-access PIN to a single chat. Leave either credential blank to disable.')),
|
|
1384
|
-
h(SettingRow as any, { title: 'Bot token', description: 'Telegram bot token from @BotFather.', control: h('div', { style: { display: 'flex', gap: 8, alignItems: 'center' } }, h(FieldInput as any, { placeholder: '123456:ABC-DEF...', type: 'password', autoComplete: 'off', value: config.hasTelegramBotToken ? '••••••••' : '', onChange: (e: any) => saveField('telegramBotToken', e.target.value), style: { width: 220 } as any }), config.hasTelegramBotToken ? h(Button as any, { variant: 'outline', size: 'md', onClick: () => saveField('telegramBotToken', '') }, 'Clear') : null) }),
|
|
1385
|
-
h(SettingRow as any, { title: 'Chat ID', description: 'Target chat, e.g. -1001234567890.', control: h(FieldInput as any, { placeholder: '-1001234567890', value: config.telegramChatId ?? '', onChange: (e: any) => saveField('telegramChatId', e.target.value), style: { width: 220 } as any }) }),
|
|
1386
|
-
h(ToggleRow as any, { title: 'Also notify about reviews', description: 'One message per review run with its outcome.', checked: config.telegramReviewNotifications === true, onChange: (v: boolean) => saveField('telegramReviewNotifications', v) }),
|
|
1387
|
-
),
|
|
1388
1380
|
gitlab: h(
|
|
1389
1381
|
'div',
|
|
1390
1382
|
{ style: { display: 'flex', flexDirection: 'column' } },
|
|
@@ -1439,9 +1431,10 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1439
1431
|
notifier: h(
|
|
1440
1432
|
'div',
|
|
1441
1433
|
{ style: { display: 'flex', flexDirection: 'column' } },
|
|
1442
|
-
h(
|
|
1443
|
-
h(SettingRow as any, { title: '
|
|
1444
|
-
h(
|
|
1434
|
+
h('div', { style: { padding: '12px 0', borderBottom: `1px solid ${t.borderL2}` } }, h('p', { style: captionStyle }, 'Telegram bot settings for notifications: startup PIN, review digests, PIN rotation. Leave blank to disable.')),
|
|
1435
|
+
h(SettingRow as any, { title: 'Bot token', description: 'Telegram bot token from @BotFather.', control: h('div', { style: { display: 'flex', gap: 8, alignItems: 'center' } }, h(FieldInput as any, { type: 'password', autoComplete: 'off', value: notifierCfg.telegram?.botToken ?? '', placeholder: '123456:ABC-DEF...', onChange: (e: any) => saveNotifierCfg({ telegram: { botToken: e.target.value } }), style: { width: 220 } as any }), notifierCfg.telegram?.botToken ? h(Button as any, { variant: 'outline', size: 'md', onClick: () => saveNotifierCfg({ telegram: { botToken: '' } }) }, 'Clear') : null) }),
|
|
1436
|
+
h(SettingRow as any, { title: 'Chat ID', description: 'Target chat, e.g. -1001234567890.', control: h(FieldInput as any, { value: notifierCfg.telegram?.chatId ?? '', placeholder: '-1001234567890', onChange: (e: any) => saveNotifierCfg({ telegram: { chatId: e.target.value } }), style: { width: 220 } as any }) }),
|
|
1437
|
+
h(ToggleRow as any, { title: 'Review notifications', description: 'Also notify about finished reviews.', checked: notifierCfg.policy?.reviewNotifications === true, onChange: (v: boolean) => saveNotifierCfg({ policy: { reviewNotifications: v } }) }),
|
|
1445
1438
|
),
|
|
1446
1439
|
}
|
|
1447
1440
|
|
|
@@ -1450,10 +1443,17 @@ export function MaestroSettingsTab({ rpcCall, configRpcCall }: { rpcCall: any; c
|
|
|
1450
1443
|
{ 'data-maestro-settings-card': '', style: { display: 'flex', flexDirection: 'column', gap: 8, width: '100%', maxWidth: 640, minWidth:0, boxSizing:'border-box' as any } },
|
|
1451
1444
|
h(
|
|
1452
1445
|
'div',
|
|
1453
|
-
{ style: { padding: '2px 2px 8px' } },
|
|
1454
|
-
|
|
1455
|
-
h('
|
|
1446
|
+
{ style: { padding: '2px 2px 8px', display: 'flex', gap: 10, alignItems: 'flex-start' } },
|
|
1447
|
+
// Shared BrandBadge — same as dashboard sidebar/popup (BrandMark #0A84FF)
|
|
1448
|
+
h('span', { 'data-maestro-logo': '', style: { width: 28, height: 28, borderRadius: 8, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', background: 'var(--dsw-alias-brand-primary, #0A84FF)', backgroundColor: '#0A84FF', color: '#fff', flex: 'none', border: '1px solid rgba(0,0,0,0.08)', boxShadow: '0 0 0 1px var(--dsw-alias-border-l1)', boxSizing: 'border-box' as any, alignSelf: 'flex-start' as any, marginTop: 2 } } as any,
|
|
1449
|
+
h('svg', { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': 'true' } as any, h('path', { d: 'M2 11 L5 4 L8 9 L11 4 L14 11', stroke: 'currentColor', strokeWidth: 1.6, strokeLinecap: 'round', strokeLinejoin: 'round' } as any))
|
|
1450
|
+
),
|
|
1451
|
+
h('div', { style: { display: 'flex', flexDirection: 'column', minWidth: 0 } },
|
|
1452
|
+
h('div', { style: { fontSize: 15, fontWeight: 600, color: t.labelPrimary as string, lineHeight: '22px' } }, 'Maestro'),
|
|
1453
|
+
h('div', { style: { fontSize: 12, color: t.labelSecondary as string, lineHeight: '16px', marginTop: 2 } }, 'Tunnel, access, review & guard — all via the shared Maestro store. Uses the same tokens and primitives as DSH settings.'),
|
|
1454
|
+
)
|
|
1456
1455
|
),
|
|
1456
|
+
h('style', {}, '[data-maestro-logo]{background:#0A84FF !important; background-color:#0A84FF !important; color:#fff !important;}'),
|
|
1457
1457
|
h('div', { 'data-maestro-tabs': '', role:'tablist', 'aria-label':'Maestro settings sections' },
|
|
1458
1458
|
...TABS.map(tab => h('button', { key: tab.id, 'data-maestro-tab':'', 'data-active': String(activeTab===tab.id), role:'tab', 'aria-selected': activeTab===tab.id, onClick: () => setActiveTab(tab.id) }, tab.label))
|
|
1459
1459
|
),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createElement as h } from 'react'
|
|
2
|
+
|
|
3
|
+
export function MaestroMark(props: { size?: number }) {
|
|
4
|
+
const s = props.size ?? 16
|
|
5
|
+
return h('svg', { width: s, height: s, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': 'true' } as any,
|
|
6
|
+
h('path', { d: 'M2 11 L5 4 L8 9 L11 4 L14 11', stroke: 'currentColor', strokeWidth: 1.6, strokeLinecap: 'round', strokeLinejoin: 'round' } as any)
|
|
7
|
+
)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function BrandBadge(props: { size?: number; outer?: number; radius?: number }) {
|
|
11
|
+
const outer = props.outer ?? 28
|
|
12
|
+
const size = props.size ?? 16
|
|
13
|
+
const radius = props.radius ?? 8
|
|
14
|
+
return h('span', {
|
|
15
|
+
'data-maestro-logo': '',
|
|
16
|
+
style: {
|
|
17
|
+
width: outer, height: outer, borderRadius: radius, display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
|
|
18
|
+
background: 'var(--dsw-alias-brand-primary, #0A84FF)', backgroundColor: '#0A84FF', color: '#fff', flex: 'none',
|
|
19
|
+
border: '1px solid rgba(0,0,0,0.08)', boxShadow: '0 0 0 1px var(--dsw-alias-border-l1)', boxSizing: 'border-box' as any,
|
|
20
|
+
},
|
|
21
|
+
} as any, h(MaestroMark as any, { size }))
|
|
22
|
+
}
|
package/src/client/index.tsx
CHANGED
|
@@ -13,9 +13,10 @@ import { registerSettingsNavIcon, SETTINGS_NAV_MARKER } from './settings-nav-ico
|
|
|
13
13
|
*/
|
|
14
14
|
const SETTINGS_NAV_CSS = `
|
|
15
15
|
|
|
16
|
-
/* maestro: replace the settings-nav fallback gear with the Maestro M-logo glyph */
|
|
17
|
-
[${SETTINGS_NAV_MARKER}] > svg:first-child
|
|
18
|
-
|
|
16
|
+
/* maestro: replace the settings-nav fallback gear with the Maestro M-logo glyph — same mark as sidebar/popup BrandMark */
|
|
17
|
+
[${SETTINGS_NAV_MARKER}] > svg:first-child,
|
|
18
|
+
[${SETTINGS_NAV_MARKER}] > svg.zWKi1a_navIcon {
|
|
19
|
+
display: none !important;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
[${SETTINGS_NAV_MARKER}]::before {
|
|
@@ -23,9 +24,10 @@ const SETTINGS_NAV_CSS = `
|
|
|
23
24
|
flex: none;
|
|
24
25
|
width: 16px;
|
|
25
26
|
height: 16px;
|
|
27
|
+
display: inline-block;
|
|
26
28
|
background: currentColor;
|
|
27
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.
|
|
28
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.
|
|
29
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11 L5 4 L8 9 L11 4 L14 11'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
30
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11 L5 4 L8 9 L11 4 L14 11'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
29
31
|
}
|
|
30
32
|
`
|
|
31
33
|
|