@rezti/dsh-rez-suite 0.1.22 → 0.1.24
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.md +5 -3
- package/lib/client.d.ts +2 -16
- package/lib/client.js +9 -145
- package/lib/index.d.ts +3 -1
- package/lib/index.js +108 -222
- package/lib/style.css +0 -81
- package/package.json +10 -10
- package/src/boss/mount.ts +54 -20
- package/src/boss/register.ts +50 -11
- package/src/boss/seed.ts +55 -18
- package/src/client/api.ts +0 -12
- package/src/client/index.ts +3 -16
- package/src/client/locales.ts +2 -16
- package/src/client/panel/panel.module.css +0 -82
- package/src/index.ts +9 -8
- package/src/protocol.ts +0 -13
- package/src/routes.ts +2 -30
- package/templates/staff/finance/.agents/skills/staff-finance/SKILL.md +6 -0
- package/templates/staff/finance/AGENTS.md +68 -0
- package/templates/staff/finance/BOOTSTRAP.md +23 -0
- package/templates/staff/finance/IDENTITY.md +8 -0
- package/templates/staff/finance/MEMORY.md +9 -0
- package/templates/staff/finance/PRIORITIES.md +3 -0
- package/templates/staff/finance/SOUL.md +6 -0
- package/templates/staff/finance/USER.md +8 -0
- package/templates/staff/finance/memory/.gitkeep +0 -0
- package/templates/staff/hr/.agents/skills/staff-hr/SKILL.md +6 -0
- package/templates/staff/hr/AGENTS.md +52 -0
- package/templates/staff/hr/BOOTSTRAP.md +23 -0
- package/templates/staff/hr/IDENTITY.md +8 -0
- package/templates/staff/hr/MEMORY.md +9 -0
- package/templates/staff/hr/PRIORITIES.md +3 -0
- package/templates/staff/hr/SOUL.md +6 -0
- package/templates/staff/hr/USER.md +8 -0
- package/templates/staff/hr/memory/.gitkeep +0 -0
- package/templates/staff/legal/.agents/skills/staff-legal/SKILL.md +6 -0
- package/templates/staff/legal/AGENTS.md +48 -0
- package/templates/staff/legal/BOOTSTRAP.md +23 -0
- package/templates/staff/legal/IDENTITY.md +8 -0
- package/templates/staff/legal/MEMORY.md +9 -0
- package/templates/staff/legal/PRIORITIES.md +3 -0
- package/templates/staff/legal/SOUL.md +6 -0
- package/templates/staff/legal/USER.md +8 -0
- package/templates/staff/legal/memory/.gitkeep +0 -0
- package/src/client/upgrade-button.tsx +0 -115
- package/src/self-update.ts +0 -155
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# @rezti/dsh-rez-suite
|
|
2
2
|
|
|
3
|
-
雷泽插件的**唯一安装入口**。Odoo / 企微 / HA / TAPD / GSC /
|
|
3
|
+
雷泽插件的**唯一安装入口**。Odoo / 企微 / HA / TAPD / GSC / 工作区(老板三室 + 全员助理)都由这一包拉齐,不要再逐个 `plugin add`,**不要**再装 `@rezti/dsh-rez-boss-desk`。
|
|
4
|
+
|
|
5
|
+
设置里选身份后,左侧自己出现对应房间(全员三助理;老板另加搞钱/产品/运营),不必手动添加工作区。
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
8
|
# 第一次
|
|
7
9
|
dsh plugin --profile web add @rezti/dsh-rez-suite
|
|
8
10
|
|
|
9
|
-
#
|
|
11
|
+
# 以后升级(只记这一条)
|
|
10
12
|
dsh plugin --profile web update @rezti/dsh-rez-suite
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
包名是 `@rezti/dsh-rez-suite`,不是 `dsh-rezti-suite`。不要对同一 profile 再单独 add 子包,会重复注册。
|
|
14
16
|
|
|
15
|
-
拆分包(`dsh-rez-odoo` 等)给开发改代码用。Web
|
|
17
|
+
拆分包(`dsh-rez-odoo` 等)给开发改代码用。Web 面板(含微信扫码)暂时仍在本包。
|
package/lib/client.d.ts
CHANGED
|
@@ -7262,7 +7262,7 @@ declare const zh: {
|
|
|
7262
7262
|
readonly 'tab.status': "状态";
|
|
7263
7263
|
readonly 'tab.audit': "用量";
|
|
7264
7264
|
readonly 'config.role': "角色";
|
|
7265
|
-
readonly 'config.roleHint': "
|
|
7265
|
+
readonly 'config.roleHint': "选身份后左侧自动出现工作区。人事/财务/法务助理全员可见;搞钱/产品/运营仅「老板」。";
|
|
7266
7266
|
readonly 'role.all': "全部";
|
|
7267
7267
|
readonly 'role.boss': "老板";
|
|
7268
7268
|
readonly 'role.engineer': "工程师";
|
|
@@ -7356,13 +7356,6 @@ declare const zh: {
|
|
|
7356
7356
|
readonly 'weixin.listening': "通道在听:微信 → 网页「微信」会话(同一条,不另开窗口)→ 回微信。";
|
|
7357
7357
|
readonly 'weixin.loggedIn': "已登录,通道未在听。点「重新连接」即可拉起,不必再扫码。";
|
|
7358
7358
|
readonly 'weixin.loggedOut': "尚未登录。";
|
|
7359
|
-
readonly 'upgrade.label': "升级";
|
|
7360
|
-
readonly 'upgrade.current': "已最新";
|
|
7361
|
-
readonly 'upgrade.aria': "升级 ReZ-TI 插件";
|
|
7362
|
-
readonly 'upgrade.running': "升级中…";
|
|
7363
|
-
readonly 'upgrade.reloading': "正在重载";
|
|
7364
|
-
readonly 'upgrade.already': "已是 {version}";
|
|
7365
|
-
readonly 'upgrade.reloadTimeout': "升级完成,但网页还没重新连上。请刷新这一页。";
|
|
7366
7359
|
};
|
|
7367
7360
|
type RezKey = keyof typeof zh;
|
|
7368
7361
|
//#endregion
|
|
@@ -7373,7 +7366,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
7373
7366
|
}
|
|
7374
7367
|
interface SlotMap {
|
|
7375
7368
|
'settings.plugin.item': {
|
|
7376
|
-
kind: '
|
|
7369
|
+
kind: 'list';
|
|
7377
7370
|
scope: 'root';
|
|
7378
7371
|
owner: {
|
|
7379
7372
|
children?: never;
|
|
@@ -7386,13 +7379,6 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
7386
7379
|
children?: never;
|
|
7387
7380
|
};
|
|
7388
7381
|
};
|
|
7389
|
-
'sidebar.footer.action': {
|
|
7390
|
-
kind: 'list';
|
|
7391
|
-
scope: 'root';
|
|
7392
|
-
owner: {
|
|
7393
|
-
wide: boolean;
|
|
7394
|
-
};
|
|
7395
|
-
};
|
|
7396
7382
|
}
|
|
7397
7383
|
}
|
|
7398
7384
|
declare const inject: string[];
|
package/lib/client.js
CHANGED
|
@@ -4,7 +4,7 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
-
(function(){var id="dsh-rez-suite-css";if(typeof document==="undefined"||document.getElementById(id))return;var s=document.createElement("style");s.id=id;s.textContent=".LOjPTW_shell {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.LOjPTW_card {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-layer-3);\n border-radius: 12px;\n list-style: none;\n transition: border-color .16s, background .16s;\n}\n\n.LOjPTW_card:hover {\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.LOjPTW_cardOpen {\n background: var(--dsw-alias-bg-layer-2);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.LOjPTW_header {\n appearance: none;\n width: 100%;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 12px;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n display: flex;\n}\n\n.LOjPTW_header:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n.LOjPTW_headText {\n flex-direction: column;\n flex: 1;\n gap: 4px;\n min-width: 0;\n display: flex;\n}\n\n.LOjPTW_name {\n color: var(--dsw-alias-label-primary);\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.LOjPTW_description {\n color: var(--dsw-alias-label-tertiary);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.LOjPTW_chevron {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n transition: transform .16s;\n}\n\n.LOjPTW_chevronOpen {\n transform: rotate(180deg);\n}\n\n.LOjPTW_body {\n border-top: 1px solid var(--dsw-alias-border-l2);\n margin: 0 16px 12px;\n padding-top: 8px;\n}\n\n.LOjPTW_tabBar {\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n flex: none;\n gap: 2px;\n display: flex;\n}\n\n.LOjPTW_tab {\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n background: none;\n border: none;\n border-bottom: 2px solid #0000;\n border-radius: 6px 6px 0 0;\n padding: 7px 14px;\n font-size: 13px;\n}\n\n.LOjPTW_tab:hover {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.LOjPTW_tab[data-active] {\n color: var(--dsw-alias-label-primary);\n border-bottom-color: var(--dsw-alias-state-business-primary);\n font-weight: 600;\n}\n\n.LOjPTW_tabBody {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n padding: 12px 0 4px;\n display: flex;\n}\n\n.LOjPTW_section {\n border: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-bg-base));\n border-radius: 10px;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n display: flex;\n}\n\n.LOjPTW_sectionTitle {\n color: var(--dsw-alias-label-primary);\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n}\n\n.LOjPTW_field {\n flex-direction: column;\n align-items: stretch;\n gap: 4px;\n display: flex;\n}\n\n.LOjPTW_label {\n color: var(--dsw-alias-label-secondary);\n font-size: 12.5px;\n}\n\n.LOjPTW_input, .LOjPTW_select {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3));\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 8px;\n outline: none;\n padding: 6px 8px;\n font-size: 13px;\n}\n\n.LOjPTW_checkbox {\n justify-self: start;\n width: 15px;\n height: 15px;\n}\n\n.LOjPTW_toolbar {\n flex-wrap: wrap;\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.LOjPTW_button {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3));\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border-radius: 8px;\n padding: 7px 12px;\n font-size: 13px;\n}\n\n.LOjPTW_button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.LOjPTW_button:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.LOjPTW_primaryButton {\n background: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.LOjPTW_dangerButton {\n background: var(--dsw-alias-state-danger, #c62828);\n border-color: var(--dsw-alias-state-danger, #c62828);\n color: #fff;\n}\n\n.LOjPTW_qr {\n background: #fff;\n border-radius: 8px;\n width: 200px;\n height: 200px;\n margin: 8px 0;\n display: block;\n}\n\n.LOjPTW_message {\n color: var(--dsw-alias-label-secondary);\n margin: 0;\n font-size: 12.5px;\n line-height: 1.5;\n}\n\n.LOjPTW_error {\n color: var(--dsw-alias-state-danger, #c62828);\n}\n\n.LOjPTW_tableWrap {\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n overflow: auto;\n}\n\n.LOjPTW_table {\n border-collapse: collapse;\n width: 100%;\n font-size: 12.5px;\n}\n\n.LOjPTW_table th {\n z-index: 1;\n text-align: left;\n background: var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1));\n padding: 8px 10px;\n position: sticky;\n top: 0;\n}\n\n.LOjPTW_table td {\n border-top: 1px solid var(--dsw-alias-border-l1);\n vertical-align: top;\n padding: 8px 10px;\n}\n\n.LOjPTW_badge {\n border-radius: 999px;\n padding: 2px 8px;\n font-size: 11px;\n display: inline-block;\n}\n\n.LOjPTW_badgeOk {\n color: #229a55;\n background: #229a5524;\n}\n\n.LOjPTW_badgeFail {\n color: #c62828;\n background: #c6282824;\n}\n\n.LOjPTW_cards {\n grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));\n gap: 8px;\n display: grid;\n}\n\n.LOjPTW_stat {\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n padding: 10px;\n}\n\n.LOjPTW_cardLabel {\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.LOjPTW_cardValue {\n color: var(--dsw-alias-label-primary);\n font-size: 15px;\n font-weight: 600;\n}\n
|
|
7
|
+
(function(){var id="dsh-rez-suite-css";if(typeof document==="undefined"||document.getElementById(id))return;var s=document.createElement("style");s.id=id;s.textContent=".LOjPTW_shell {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n display: flex;\n}\n\n.LOjPTW_card {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-layer-3);\n border-radius: 12px;\n list-style: none;\n transition: border-color .16s, background .16s;\n}\n\n.LOjPTW_card:hover {\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.LOjPTW_cardOpen {\n background: var(--dsw-alias-bg-layer-2);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.LOjPTW_header {\n appearance: none;\n width: 100%;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 12px;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n display: flex;\n}\n\n.LOjPTW_header:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n.LOjPTW_headText {\n flex-direction: column;\n flex: 1;\n gap: 4px;\n min-width: 0;\n display: flex;\n}\n\n.LOjPTW_name {\n color: var(--dsw-alias-label-primary);\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.LOjPTW_description {\n color: var(--dsw-alias-label-tertiary);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.LOjPTW_chevron {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n transition: transform .16s;\n}\n\n.LOjPTW_chevronOpen {\n transform: rotate(180deg);\n}\n\n.LOjPTW_body {\n border-top: 1px solid var(--dsw-alias-border-l2);\n margin: 0 16px 12px;\n padding-top: 8px;\n}\n\n.LOjPTW_tabBar {\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n flex: none;\n gap: 2px;\n display: flex;\n}\n\n.LOjPTW_tab {\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n background: none;\n border: none;\n border-bottom: 2px solid #0000;\n border-radius: 6px 6px 0 0;\n padding: 7px 14px;\n font-size: 13px;\n}\n\n.LOjPTW_tab:hover {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.LOjPTW_tab[data-active] {\n color: var(--dsw-alias-label-primary);\n border-bottom-color: var(--dsw-alias-state-business-primary);\n font-weight: 600;\n}\n\n.LOjPTW_tabBody {\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n padding: 12px 0 4px;\n display: flex;\n}\n\n.LOjPTW_section {\n border: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-bg-base));\n border-radius: 10px;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n display: flex;\n}\n\n.LOjPTW_sectionTitle {\n color: var(--dsw-alias-label-primary);\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n}\n\n.LOjPTW_field {\n flex-direction: column;\n align-items: stretch;\n gap: 4px;\n display: flex;\n}\n\n.LOjPTW_label {\n color: var(--dsw-alias-label-secondary);\n font-size: 12.5px;\n}\n\n.LOjPTW_input, .LOjPTW_select {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3));\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 8px;\n outline: none;\n padding: 6px 8px;\n font-size: 13px;\n}\n\n.LOjPTW_checkbox {\n justify-self: start;\n width: 15px;\n height: 15px;\n}\n\n.LOjPTW_toolbar {\n flex-wrap: wrap;\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.LOjPTW_button {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3));\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border-radius: 8px;\n padding: 7px 12px;\n font-size: 13px;\n}\n\n.LOjPTW_button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.LOjPTW_button:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.LOjPTW_primaryButton {\n background: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.LOjPTW_dangerButton {\n background: var(--dsw-alias-state-danger, #c62828);\n border-color: var(--dsw-alias-state-danger, #c62828);\n color: #fff;\n}\n\n.LOjPTW_qr {\n background: #fff;\n border-radius: 8px;\n width: 200px;\n height: 200px;\n margin: 8px 0;\n display: block;\n}\n\n.LOjPTW_message {\n color: var(--dsw-alias-label-secondary);\n margin: 0;\n font-size: 12.5px;\n line-height: 1.5;\n}\n\n.LOjPTW_error {\n color: var(--dsw-alias-state-danger, #c62828);\n}\n\n.LOjPTW_tableWrap {\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n overflow: auto;\n}\n\n.LOjPTW_table {\n border-collapse: collapse;\n width: 100%;\n font-size: 12.5px;\n}\n\n.LOjPTW_table th {\n z-index: 1;\n text-align: left;\n background: var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1));\n padding: 8px 10px;\n position: sticky;\n top: 0;\n}\n\n.LOjPTW_table td {\n border-top: 1px solid var(--dsw-alias-border-l1);\n vertical-align: top;\n padding: 8px 10px;\n}\n\n.LOjPTW_badge {\n border-radius: 999px;\n padding: 2px 8px;\n font-size: 11px;\n display: inline-block;\n}\n\n.LOjPTW_badgeOk {\n color: #229a55;\n background: #229a5524;\n}\n\n.LOjPTW_badgeFail {\n color: #c62828;\n background: #c6282824;\n}\n\n.LOjPTW_cards {\n grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));\n gap: 8px;\n display: grid;\n}\n\n.LOjPTW_stat {\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n padding: 10px;\n}\n\n.LOjPTW_cardLabel {\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.LOjPTW_cardValue {\n color: var(--dsw-alias-label-primary);\n font-size: 15px;\n font-weight: 600;\n}\n";document.head.appendChild(s);})();
|
|
8
8
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
9
|
let react = require("react");
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,7 +23,7 @@ const zh = {
|
|
|
23
23
|
"tab.status": "状态",
|
|
24
24
|
"tab.audit": "用量",
|
|
25
25
|
"config.role": "角色",
|
|
26
|
-
"config.roleHint": "
|
|
26
|
+
"config.roleHint": "选身份后左侧自动出现工作区。人事/财务/法务助理全员可见;搞钱/产品/运营仅「老板」。",
|
|
27
27
|
"role.all": "全部",
|
|
28
28
|
"role.boss": "老板",
|
|
29
29
|
"role.engineer": "工程师",
|
|
@@ -116,14 +116,7 @@ const zh = {
|
|
|
116
116
|
"weixin.qrAlt": "微信登录二维码",
|
|
117
117
|
"weixin.listening": "通道在听:微信 → 网页「微信」会话(同一条,不另开窗口)→ 回微信。",
|
|
118
118
|
"weixin.loggedIn": "已登录,通道未在听。点「重新连接」即可拉起,不必再扫码。",
|
|
119
|
-
"weixin.loggedOut": "尚未登录。"
|
|
120
|
-
"upgrade.label": "升级",
|
|
121
|
-
"upgrade.current": "已最新",
|
|
122
|
-
"upgrade.aria": "升级 ReZ-TI 插件",
|
|
123
|
-
"upgrade.running": "升级中…",
|
|
124
|
-
"upgrade.reloading": "正在重载",
|
|
125
|
-
"upgrade.already": "已是 {version}",
|
|
126
|
-
"upgrade.reloadTimeout": "升级完成,但网页还没重新连上。请刷新这一页。"
|
|
119
|
+
"weixin.loggedOut": "尚未登录。"
|
|
127
120
|
};
|
|
128
121
|
const en = {
|
|
129
122
|
"entry.label": "Rez",
|
|
@@ -136,7 +129,7 @@ const en = {
|
|
|
136
129
|
"tab.status": "Status",
|
|
137
130
|
"tab.audit": "Usage",
|
|
138
131
|
"config.role": "Role",
|
|
139
|
-
"config.roleHint": "
|
|
132
|
+
"config.roleHint": "Identity registers workspaces in the sidebar. Staff assistants for every role; 搞钱 / 产品 / 运营 for Boss only.",
|
|
140
133
|
"role.all": "All",
|
|
141
134
|
"role.boss": "Boss",
|
|
142
135
|
"role.engineer": "Engineer",
|
|
@@ -229,14 +222,7 @@ const en = {
|
|
|
229
222
|
"weixin.qrAlt": "WeChat login QR",
|
|
230
223
|
"weixin.listening": "Channel is live: WeChat → the WeChat folder session on the left → WeChat.",
|
|
231
224
|
"weixin.loggedIn": "Logged in, listener idle. Click Reconnect — no need to scan again.",
|
|
232
|
-
"weixin.loggedOut": "Not logged in."
|
|
233
|
-
"upgrade.label": "Upgrade",
|
|
234
|
-
"upgrade.current": "Up to date",
|
|
235
|
-
"upgrade.aria": "Upgrade the ReZ-TI plugin",
|
|
236
|
-
"upgrade.running": "Updating…",
|
|
237
|
-
"upgrade.reloading": "Reloading",
|
|
238
|
-
"upgrade.already": "Already {version}",
|
|
239
|
-
"upgrade.reloadTimeout": "Update finished, but the page did not reconnect. Refresh this tab."
|
|
225
|
+
"weixin.loggedOut": "Not logged in."
|
|
240
226
|
};
|
|
241
227
|
/** Minimal {name} interpolator shared by the panel helpers. */
|
|
242
228
|
function t(dict, key, values) {
|
|
@@ -253,8 +239,7 @@ const REZ_API = {
|
|
|
253
239
|
audit: "/api/dsh-rez-suite/audit",
|
|
254
240
|
auditReset: "/api/dsh-rez-suite/audit/reset",
|
|
255
241
|
weixin: "/api/dsh-rez-suite/weixin",
|
|
256
|
-
weixinVerify: "/api/dsh-rez-suite/weixin/verify"
|
|
257
|
-
update: "/api/dsh-rez-suite/update"
|
|
242
|
+
weixinVerify: "/api/dsh-rez-suite/weixin/verify"
|
|
258
243
|
};
|
|
259
244
|
//#endregion
|
|
260
245
|
//#region src/client/api.ts
|
|
@@ -316,12 +301,6 @@ var RezApi = class {
|
|
|
316
301
|
async weixinLogout() {
|
|
317
302
|
return readJson(await fetch(REZ_API.weixin, { method: "DELETE" }));
|
|
318
303
|
}
|
|
319
|
-
async updateStatus() {
|
|
320
|
-
return readJson(await fetch(REZ_API.update));
|
|
321
|
-
}
|
|
322
|
-
async applyUpdate() {
|
|
323
|
-
return readJson(await fetch(REZ_API.update, { method: "POST" }));
|
|
324
|
-
}
|
|
325
304
|
};
|
|
326
305
|
//#endregion
|
|
327
306
|
//#region src/client/panel/helpers.ts
|
|
@@ -376,13 +355,7 @@ var panel_module_default = {
|
|
|
376
355
|
"tabBody": "LOjPTW_tabBody",
|
|
377
356
|
"table": "LOjPTW_table",
|
|
378
357
|
"tableWrap": "LOjPTW_tableWrap",
|
|
379
|
-
"toolbar": "LOjPTW_toolbar"
|
|
380
|
-
"upgradeButton": "LOjPTW_upgradeButton",
|
|
381
|
-
"upgradeDot": "LOjPTW_upgradeDot",
|
|
382
|
-
"upgradeLabel": "LOjPTW_upgradeLabel",
|
|
383
|
-
"upgradeLayer": "LOjPTW_upgradeLayer",
|
|
384
|
-
"upgradeLayerRail": "LOjPTW_upgradeLayerRail",
|
|
385
|
-
"upgradeMeta": "LOjPTW_upgradeMeta"
|
|
358
|
+
"toolbar": "LOjPTW_toolbar"
|
|
386
359
|
};
|
|
387
360
|
//#endregion
|
|
388
361
|
//#region src/client/panel/AuditTab.tsx
|
|
@@ -1360,109 +1333,6 @@ function RezPluginCard() {
|
|
|
1360
1333
|
});
|
|
1361
1334
|
}
|
|
1362
1335
|
//#endregion
|
|
1363
|
-
//#region src/client/upgrade-button.tsx
|
|
1364
|
-
/**
|
|
1365
|
-
* Sidebar footer action: upgrade @rezti/dsh-rez-suite without a terminal.
|
|
1366
|
-
* Host code still needs a process respawn; the button does that after pnpm add.
|
|
1367
|
-
*/
|
|
1368
|
-
function UpgradeIcon() {
|
|
1369
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
1370
|
-
width: "16",
|
|
1371
|
-
height: "16",
|
|
1372
|
-
viewBox: "0 0 16 16",
|
|
1373
|
-
"aria-hidden": "true",
|
|
1374
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
1375
|
-
d: "M8 12.5V4.8M8 4.8 4.8 8M8 4.8 11.2 8M3 13.2h10",
|
|
1376
|
-
fill: "none",
|
|
1377
|
-
stroke: "currentColor",
|
|
1378
|
-
strokeWidth: "1.4",
|
|
1379
|
-
strokeLinecap: "round",
|
|
1380
|
-
strokeLinejoin: "round"
|
|
1381
|
-
})
|
|
1382
|
-
});
|
|
1383
|
-
}
|
|
1384
|
-
async function waitUntilHostBack(api, timeoutMs = 6e4) {
|
|
1385
|
-
const deadline = Date.now() + timeoutMs;
|
|
1386
|
-
await new Promise((resolve) => setTimeout(resolve, 800));
|
|
1387
|
-
while (Date.now() < deadline) try {
|
|
1388
|
-
await api.updateStatus();
|
|
1389
|
-
return;
|
|
1390
|
-
} catch {
|
|
1391
|
-
await new Promise((resolve) => setTimeout(resolve, 700));
|
|
1392
|
-
}
|
|
1393
|
-
throw new Error(tt("upgrade.reloadTimeout"));
|
|
1394
|
-
}
|
|
1395
|
-
function UpgradeButton({ wide }) {
|
|
1396
|
-
const api = (0, react.useMemo)(() => new RezApi(), []);
|
|
1397
|
-
const [info, setInfo] = (0, react.useState)();
|
|
1398
|
-
const [busy, setBusy] = (0, react.useState)(false);
|
|
1399
|
-
const [note, setNote] = (0, react.useState)("");
|
|
1400
|
-
(0, react.useEffect)(() => {
|
|
1401
|
-
let cancelled = false;
|
|
1402
|
-
api.updateStatus().then((value) => {
|
|
1403
|
-
if (!cancelled) setInfo(value);
|
|
1404
|
-
}).catch((error) => {
|
|
1405
|
-
if (!cancelled) setNote(error instanceof Error ? error.message : String(error));
|
|
1406
|
-
});
|
|
1407
|
-
return () => {
|
|
1408
|
-
cancelled = true;
|
|
1409
|
-
};
|
|
1410
|
-
}, [api]);
|
|
1411
|
-
const label = busy ? tt("upgrade.running") : info?.outdated === true ? tt("upgrade.label") : tt("upgrade.current");
|
|
1412
|
-
const meta = note !== "" ? note : info === void 0 ? "" : info.outdated ? info.latest : info.installed;
|
|
1413
|
-
async function onClick() {
|
|
1414
|
-
if (busy) return;
|
|
1415
|
-
setBusy(true);
|
|
1416
|
-
setNote("");
|
|
1417
|
-
try {
|
|
1418
|
-
const snapshot = info ?? await api.updateStatus();
|
|
1419
|
-
setInfo(snapshot);
|
|
1420
|
-
if (!snapshot.outdated) {
|
|
1421
|
-
setNote(tt("upgrade.already", { version: snapshot.installed }));
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
const result = await api.applyUpdate();
|
|
1425
|
-
setInfo(result);
|
|
1426
|
-
if (result.restarting) {
|
|
1427
|
-
setNote(tt("upgrade.reloading"));
|
|
1428
|
-
await waitUntilHostBack(api);
|
|
1429
|
-
window.location.reload();
|
|
1430
|
-
return;
|
|
1431
|
-
}
|
|
1432
|
-
setNote(tt("upgrade.already", { version: result.installed }));
|
|
1433
|
-
} catch (error) {
|
|
1434
|
-
setNote(error instanceof Error ? error.message : String(error));
|
|
1435
|
-
} finally {
|
|
1436
|
-
setBusy(false);
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1440
|
-
className: wide ? panel_module_default.upgradeLayer : `${panel_module_default.upgradeLayer} ${panel_module_default.upgradeLayerRail}`,
|
|
1441
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1442
|
-
type: "button",
|
|
1443
|
-
className: panel_module_default.upgradeButton,
|
|
1444
|
-
"data-outdated": info?.outdated === true ? "" : void 0,
|
|
1445
|
-
"aria-label": tt("upgrade.aria"),
|
|
1446
|
-
disabled: busy,
|
|
1447
|
-
onClick: () => {
|
|
1448
|
-
onClick();
|
|
1449
|
-
},
|
|
1450
|
-
children: [
|
|
1451
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(UpgradeIcon, {}),
|
|
1452
|
-
wide && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1453
|
-
className: panel_module_default.upgradeLabel,
|
|
1454
|
-
children: label
|
|
1455
|
-
}),
|
|
1456
|
-
wide && meta !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1457
|
-
className: panel_module_default.upgradeMeta,
|
|
1458
|
-
children: meta
|
|
1459
|
-
}),
|
|
1460
|
-
!wide && info?.outdated === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: panel_module_default.upgradeDot })
|
|
1461
|
-
]
|
|
1462
|
-
})
|
|
1463
|
-
});
|
|
1464
|
-
}
|
|
1465
|
-
//#endregion
|
|
1466
1336
|
//#region src/client/index.ts
|
|
1467
1337
|
const NS = "dsh-rez-suite";
|
|
1468
1338
|
const inject = ["slots", "locale"];
|
|
@@ -1474,7 +1344,8 @@ function apply(ctx) {
|
|
|
1474
1344
|
}), "dsh-rez-suite: dictionaries");
|
|
1475
1345
|
ctx.slots.inject("settings.plugin.item", () => ctx.slots.register({
|
|
1476
1346
|
name: "settings.plugin.item",
|
|
1477
|
-
|
|
1347
|
+
id: "rez-suite",
|
|
1348
|
+
order: 40,
|
|
1478
1349
|
locale: NS
|
|
1479
1350
|
}, RezPluginCard));
|
|
1480
1351
|
ctx.slots.inject("settings.plugins.tab", () => ctx.slots.register({
|
|
@@ -1484,13 +1355,6 @@ function apply(ctx) {
|
|
|
1484
1355
|
label: () => t("settings.title"),
|
|
1485
1356
|
locale: NS
|
|
1486
1357
|
}, RezSettingsPage));
|
|
1487
|
-
ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
|
|
1488
|
-
name: "sidebar.footer.action",
|
|
1489
|
-
id: "rez-upgrade",
|
|
1490
|
-
order: 10,
|
|
1491
|
-
label: () => t("upgrade.label"),
|
|
1492
|
-
locale: NS
|
|
1493
|
-
}, UpgradeButton));
|
|
1494
1358
|
}
|
|
1495
1359
|
//#endregion
|
|
1496
1360
|
exports.apply = apply;
|
package/lib/index.d.ts
CHANGED
|
@@ -1752,6 +1752,8 @@ declare const REZ_SETTINGS_NAMESPACE: SettingsNamespace;
|
|
|
1752
1752
|
declare const Config: Schema<RezConfig>;
|
|
1753
1753
|
declare const REZ_GUIDANCE_CORE: string;
|
|
1754
1754
|
declare function rezGuidanceFor(role: RezConfig['role']): string;
|
|
1755
|
+
/** @deprecated use rezGuidanceFor */
|
|
1756
|
+
declare const REZ_GUIDANCE: string;
|
|
1755
1757
|
declare function apply(ctx: Context, config?: RezConfig): void;
|
|
1756
1758
|
//#endregion
|
|
1757
|
-
export { Config, REZ_GUIDANCE_CORE, REZ_SETTINGS_NAMESPACE, apply, inject, name, rezGuidanceFor };
|
|
1759
|
+
export { Config, REZ_GUIDANCE, REZ_GUIDANCE_CORE, REZ_SETTINGS_NAMESPACE, apply, inject, name, rezGuidanceFor };
|