dsh-messager 0.1.4 → 0.2.0
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.en.md +169 -45
- package/README.md +145 -146
- package/cordis.patch.yml +13 -0
- package/lib/channels/dingtalk.d.ts +38 -0
- package/lib/channels/dingtalk.d.ts.map +1 -0
- package/lib/channels/dingtalk.js +60 -0
- package/lib/channels/dingtalk.js.map +1 -0
- package/lib/channels/discord.d.ts +28 -0
- package/lib/channels/discord.d.ts.map +1 -0
- package/lib/channels/discord.js +44 -0
- package/lib/channels/discord.js.map +1 -0
- package/lib/channels/telegram.d.ts +31 -0
- package/lib/channels/telegram.d.ts.map +1 -0
- package/lib/channels/telegram.js +52 -0
- package/lib/channels/telegram.js.map +1 -0
- package/lib/channels/wecom.d.ts +34 -0
- package/lib/channels/wecom.d.ts.map +1 -0
- package/lib/channels/wecom.js +53 -0
- package/lib/channels/wecom.js.map +1 -0
- package/lib/client.js +391 -54
- package/lib/client.js.map +1 -1
- package/lib/config.d.ts +46 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +27 -0
- package/lib/config.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +33 -2
- package/lib/index.js.map +1 -1
- package/lib/notify.d.ts +1 -1
- package/lib/notify.d.ts.map +1 -1
- package/lib/notify.js +10 -6
- package/lib/notify.js.map +1 -1
- package/lib/types/client/card-controller.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +48 -2
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/settings-form.d.ts.map +1 -1
- package/lib/types/config.d.ts +46 -0
- package/lib/types/config.d.ts.map +1 -1
- package/package.json +28 -5
package/lib/client.js
CHANGED
|
@@ -835,6 +835,33 @@ window.__ModuleLoader__.load({
|
|
|
835
835
|
timeoutMs: Schema.number().default(5e3),
|
|
836
836
|
verbosity: verbosity.default("normal")
|
|
837
837
|
}),
|
|
838
|
+
wecom: Schema.object({
|
|
839
|
+
enabled: Schema.boolean().default(false),
|
|
840
|
+
webhookUrl: Schema.string(),
|
|
841
|
+
secret: Schema.string().role("secret"),
|
|
842
|
+
timeoutMs: Schema.number().default(5e3),
|
|
843
|
+
verbosity: verbosity.default("normal")
|
|
844
|
+
}),
|
|
845
|
+
discord: Schema.object({
|
|
846
|
+
enabled: Schema.boolean().default(false),
|
|
847
|
+
webhookUrl: Schema.string(),
|
|
848
|
+
timeoutMs: Schema.number().default(5e3),
|
|
849
|
+
verbosity: verbosity.default("normal")
|
|
850
|
+
}),
|
|
851
|
+
dingtalk: Schema.object({
|
|
852
|
+
enabled: Schema.boolean().default(false),
|
|
853
|
+
webhookUrl: Schema.string(),
|
|
854
|
+
secret: Schema.string().role("secret"),
|
|
855
|
+
timeoutMs: Schema.number().default(5e3),
|
|
856
|
+
verbosity: verbosity.default("normal")
|
|
857
|
+
}),
|
|
858
|
+
telegram: Schema.object({
|
|
859
|
+
enabled: Schema.boolean().default(false),
|
|
860
|
+
botToken: Schema.string().role("secret"),
|
|
861
|
+
chatId: Schema.string(),
|
|
862
|
+
timeoutMs: Schema.number().default(5e3),
|
|
863
|
+
verbosity: verbosity.default("normal")
|
|
864
|
+
}),
|
|
838
865
|
dedup: Schema.object({
|
|
839
866
|
interactionCooldownMs: Schema.number().default(1e4),
|
|
840
867
|
completedDebounceMs: Schema.number().default(1e3),
|
|
@@ -1208,14 +1235,22 @@ window.__ModuleLoader__.load({
|
|
|
1208
1235
|
"minimal",
|
|
1209
1236
|
"normal",
|
|
1210
1237
|
"detailed"
|
|
1211
|
-
]
|
|
1238
|
+
],
|
|
1239
|
+
hiddenUnless: {
|
|
1240
|
+
group: "system",
|
|
1241
|
+
field: "enabled"
|
|
1242
|
+
}
|
|
1212
1243
|
},
|
|
1213
1244
|
{
|
|
1214
1245
|
group: "system",
|
|
1215
1246
|
field: "icon",
|
|
1216
1247
|
kind: "text",
|
|
1217
1248
|
label: "field.system.icon",
|
|
1218
|
-
hint: "hint.system.icon"
|
|
1249
|
+
hint: "hint.system.icon",
|
|
1250
|
+
hiddenUnless: {
|
|
1251
|
+
group: "system",
|
|
1252
|
+
field: "enabled"
|
|
1253
|
+
}
|
|
1219
1254
|
},
|
|
1220
1255
|
{
|
|
1221
1256
|
group: "browser",
|
|
@@ -1227,7 +1262,11 @@ window.__ModuleLoader__.load({
|
|
|
1227
1262
|
group: "browser",
|
|
1228
1263
|
field: "onlyWhenHidden",
|
|
1229
1264
|
kind: "toggle",
|
|
1230
|
-
label: "field.browser.onlyWhenHidden"
|
|
1265
|
+
label: "field.browser.onlyWhenHidden",
|
|
1266
|
+
hiddenUnless: {
|
|
1267
|
+
group: "browser",
|
|
1268
|
+
field: "enabled"
|
|
1269
|
+
}
|
|
1231
1270
|
},
|
|
1232
1271
|
{
|
|
1233
1272
|
group: "browser",
|
|
@@ -1238,13 +1277,21 @@ window.__ModuleLoader__.load({
|
|
|
1238
1277
|
"minimal",
|
|
1239
1278
|
"normal",
|
|
1240
1279
|
"detailed"
|
|
1241
|
-
]
|
|
1280
|
+
],
|
|
1281
|
+
hiddenUnless: {
|
|
1282
|
+
group: "browser",
|
|
1283
|
+
field: "enabled"
|
|
1284
|
+
}
|
|
1242
1285
|
},
|
|
1243
1286
|
{
|
|
1244
1287
|
group: "browser",
|
|
1245
1288
|
field: "icon",
|
|
1246
1289
|
kind: "text",
|
|
1247
|
-
label: "field.browser.icon"
|
|
1290
|
+
label: "field.browser.icon",
|
|
1291
|
+
hiddenUnless: {
|
|
1292
|
+
group: "browser",
|
|
1293
|
+
field: "enabled"
|
|
1294
|
+
}
|
|
1248
1295
|
},
|
|
1249
1296
|
{
|
|
1250
1297
|
group: "feishu",
|
|
@@ -1267,7 +1314,7 @@ window.__ModuleLoader__.load({
|
|
|
1267
1314
|
field: "secret",
|
|
1268
1315
|
kind: "text",
|
|
1269
1316
|
label: "field.feishu.secret",
|
|
1270
|
-
hint: "hint.
|
|
1317
|
+
hint: "hint.secret",
|
|
1271
1318
|
secret: true,
|
|
1272
1319
|
hiddenUnless: {
|
|
1273
1320
|
group: "feishu",
|
|
@@ -1299,6 +1346,206 @@ window.__ModuleLoader__.load({
|
|
|
1299
1346
|
field: "enabled"
|
|
1300
1347
|
}
|
|
1301
1348
|
},
|
|
1349
|
+
{
|
|
1350
|
+
group: "wecom",
|
|
1351
|
+
field: "enabled",
|
|
1352
|
+
kind: "toggle",
|
|
1353
|
+
label: "field.wecom.enabled"
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
group: "wecom",
|
|
1357
|
+
field: "webhookUrl",
|
|
1358
|
+
kind: "text",
|
|
1359
|
+
label: "field.wecom.webhookUrl",
|
|
1360
|
+
hiddenUnless: {
|
|
1361
|
+
group: "wecom",
|
|
1362
|
+
field: "enabled"
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
group: "wecom",
|
|
1367
|
+
field: "secret",
|
|
1368
|
+
kind: "text",
|
|
1369
|
+
label: "field.wecom.secret",
|
|
1370
|
+
hint: "hint.secret",
|
|
1371
|
+
secret: true,
|
|
1372
|
+
hiddenUnless: {
|
|
1373
|
+
group: "wecom",
|
|
1374
|
+
field: "enabled"
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
group: "wecom",
|
|
1379
|
+
field: "timeoutMs",
|
|
1380
|
+
kind: "number",
|
|
1381
|
+
label: "field.wecom.timeoutMs",
|
|
1382
|
+
hiddenUnless: {
|
|
1383
|
+
group: "wecom",
|
|
1384
|
+
field: "enabled"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
group: "wecom",
|
|
1389
|
+
field: "verbosity",
|
|
1390
|
+
kind: "select",
|
|
1391
|
+
label: "field.wecom.verbosity",
|
|
1392
|
+
options: [
|
|
1393
|
+
"minimal",
|
|
1394
|
+
"normal",
|
|
1395
|
+
"detailed"
|
|
1396
|
+
],
|
|
1397
|
+
hiddenUnless: {
|
|
1398
|
+
group: "wecom",
|
|
1399
|
+
field: "enabled"
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
group: "discord",
|
|
1404
|
+
field: "enabled",
|
|
1405
|
+
kind: "toggle",
|
|
1406
|
+
label: "field.discord.enabled"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
group: "discord",
|
|
1410
|
+
field: "webhookUrl",
|
|
1411
|
+
kind: "text",
|
|
1412
|
+
label: "field.discord.webhookUrl",
|
|
1413
|
+
hiddenUnless: {
|
|
1414
|
+
group: "discord",
|
|
1415
|
+
field: "enabled"
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
group: "discord",
|
|
1420
|
+
field: "timeoutMs",
|
|
1421
|
+
kind: "number",
|
|
1422
|
+
label: "field.discord.timeoutMs",
|
|
1423
|
+
hiddenUnless: {
|
|
1424
|
+
group: "discord",
|
|
1425
|
+
field: "enabled"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
group: "discord",
|
|
1430
|
+
field: "verbosity",
|
|
1431
|
+
kind: "select",
|
|
1432
|
+
label: "field.discord.verbosity",
|
|
1433
|
+
options: [
|
|
1434
|
+
"minimal",
|
|
1435
|
+
"normal",
|
|
1436
|
+
"detailed"
|
|
1437
|
+
],
|
|
1438
|
+
hiddenUnless: {
|
|
1439
|
+
group: "discord",
|
|
1440
|
+
field: "enabled"
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
group: "dingtalk",
|
|
1445
|
+
field: "enabled",
|
|
1446
|
+
kind: "toggle",
|
|
1447
|
+
label: "field.dingtalk.enabled"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
group: "dingtalk",
|
|
1451
|
+
field: "webhookUrl",
|
|
1452
|
+
kind: "text",
|
|
1453
|
+
label: "field.dingtalk.webhookUrl",
|
|
1454
|
+
hiddenUnless: {
|
|
1455
|
+
group: "dingtalk",
|
|
1456
|
+
field: "enabled"
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
group: "dingtalk",
|
|
1461
|
+
field: "secret",
|
|
1462
|
+
kind: "text",
|
|
1463
|
+
label: "field.dingtalk.secret",
|
|
1464
|
+
hint: "hint.secret",
|
|
1465
|
+
secret: true,
|
|
1466
|
+
hiddenUnless: {
|
|
1467
|
+
group: "dingtalk",
|
|
1468
|
+
field: "enabled"
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
group: "dingtalk",
|
|
1473
|
+
field: "timeoutMs",
|
|
1474
|
+
kind: "number",
|
|
1475
|
+
label: "field.dingtalk.timeoutMs",
|
|
1476
|
+
hiddenUnless: {
|
|
1477
|
+
group: "dingtalk",
|
|
1478
|
+
field: "enabled"
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
group: "dingtalk",
|
|
1483
|
+
field: "verbosity",
|
|
1484
|
+
kind: "select",
|
|
1485
|
+
label: "field.dingtalk.verbosity",
|
|
1486
|
+
options: [
|
|
1487
|
+
"minimal",
|
|
1488
|
+
"normal",
|
|
1489
|
+
"detailed"
|
|
1490
|
+
],
|
|
1491
|
+
hiddenUnless: {
|
|
1492
|
+
group: "dingtalk",
|
|
1493
|
+
field: "enabled"
|
|
1494
|
+
}
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
group: "telegram",
|
|
1498
|
+
field: "enabled",
|
|
1499
|
+
kind: "toggle",
|
|
1500
|
+
label: "field.telegram.enabled"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
group: "telegram",
|
|
1504
|
+
field: "botToken",
|
|
1505
|
+
kind: "text",
|
|
1506
|
+
label: "field.telegram.botToken",
|
|
1507
|
+
hint: "hint.secret",
|
|
1508
|
+
secret: true,
|
|
1509
|
+
hiddenUnless: {
|
|
1510
|
+
group: "telegram",
|
|
1511
|
+
field: "enabled"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
group: "telegram",
|
|
1516
|
+
field: "chatId",
|
|
1517
|
+
kind: "text",
|
|
1518
|
+
label: "field.telegram.chatId",
|
|
1519
|
+
hiddenUnless: {
|
|
1520
|
+
group: "telegram",
|
|
1521
|
+
field: "enabled"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
group: "telegram",
|
|
1526
|
+
field: "timeoutMs",
|
|
1527
|
+
kind: "number",
|
|
1528
|
+
label: "field.telegram.timeoutMs",
|
|
1529
|
+
hiddenUnless: {
|
|
1530
|
+
group: "telegram",
|
|
1531
|
+
field: "enabled"
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
group: "telegram",
|
|
1536
|
+
field: "verbosity",
|
|
1537
|
+
kind: "select",
|
|
1538
|
+
label: "field.telegram.verbosity",
|
|
1539
|
+
options: [
|
|
1540
|
+
"minimal",
|
|
1541
|
+
"normal",
|
|
1542
|
+
"detailed"
|
|
1543
|
+
],
|
|
1544
|
+
hiddenUnless: {
|
|
1545
|
+
group: "telegram",
|
|
1546
|
+
field: "enabled"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1302
1549
|
{
|
|
1303
1550
|
group: "message",
|
|
1304
1551
|
field: "titlePrefix",
|
|
@@ -1398,6 +1645,10 @@ window.__ModuleLoader__.load({
|
|
|
1398
1645
|
system: "group.system",
|
|
1399
1646
|
browser: "group.browser",
|
|
1400
1647
|
feishu: "group.feishu",
|
|
1648
|
+
wecom: "group.wecom",
|
|
1649
|
+
discord: "group.discord",
|
|
1650
|
+
dingtalk: "group.dingtalk",
|
|
1651
|
+
telegram: "group.telegram",
|
|
1401
1652
|
message: "group.message"
|
|
1402
1653
|
};
|
|
1403
1654
|
const FIELD_STYLE = {
|
|
@@ -1511,7 +1762,48 @@ window.__ModuleLoader__.load({
|
|
|
1511
1762
|
background: "var(--dsw-alias-label-primary)",
|
|
1512
1763
|
color: "var(--dsw-alias-bg-layer-3)"
|
|
1513
1764
|
};
|
|
1514
|
-
|
|
1765
|
+
const SWITCH_TRACK_STYLE = {
|
|
1766
|
+
position: "relative",
|
|
1767
|
+
flex: "none",
|
|
1768
|
+
width: 36,
|
|
1769
|
+
height: 20,
|
|
1770
|
+
borderRadius: 999,
|
|
1771
|
+
border: "none",
|
|
1772
|
+
padding: 0,
|
|
1773
|
+
transition: "background 0.2s ease"
|
|
1774
|
+
};
|
|
1775
|
+
const SWITCH_THUMB_STYLE = {
|
|
1776
|
+
position: "absolute",
|
|
1777
|
+
top: 2,
|
|
1778
|
+
width: 16,
|
|
1779
|
+
height: 16,
|
|
1780
|
+
borderRadius: "50%",
|
|
1781
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
1782
|
+
boxShadow: "0 1px 2px rgb(0 0 0 / 0.25)",
|
|
1783
|
+
transition: "left 0.2s ease"
|
|
1784
|
+
};
|
|
1785
|
+
/** 开关控件:轨道 + 滑块;选中时轨道用品牌色。 */
|
|
1786
|
+
function Switch({ id, checked, disabled, onChange }) {
|
|
1787
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1788
|
+
id,
|
|
1789
|
+
type: "button",
|
|
1790
|
+
role: "switch",
|
|
1791
|
+
"aria-checked": checked,
|
|
1792
|
+
disabled,
|
|
1793
|
+
onClick: () => onChange(!checked),
|
|
1794
|
+
style: {
|
|
1795
|
+
...SWITCH_TRACK_STYLE,
|
|
1796
|
+
background: checked ? "var(--dsw-alias-brand-primary)" : "var(--dsw-alias-border-l2)",
|
|
1797
|
+
cursor: disabled ? "default" : "pointer",
|
|
1798
|
+
opacity: disabled ? .5 : 1
|
|
1799
|
+
},
|
|
1800
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { style: {
|
|
1801
|
+
...SWITCH_THUMB_STYLE,
|
|
1802
|
+
left: checked ? 18 : 2
|
|
1803
|
+
} })
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
/** 渲染一个字段行(DSH ValueField 同款;toggle 标签与开关同一行)。 */
|
|
1515
1807
|
function FieldRow({ spec, state, actions, t, disabled }) {
|
|
1516
1808
|
const id = `dsh-messager-${spec.group}-${spec.field}`;
|
|
1517
1809
|
const label = t(spec.label);
|
|
@@ -1532,46 +1824,45 @@ window.__ModuleLoader__.load({
|
|
|
1532
1824
|
children: t("action.reset")
|
|
1533
1825
|
})]
|
|
1534
1826
|
});
|
|
1535
|
-
if (spec.kind === "toggle")
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
});
|
|
1827
|
+
if (spec.kind === "toggle") {
|
|
1828
|
+
const checked = state.text === "true";
|
|
1829
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1830
|
+
style: {
|
|
1831
|
+
...FIELD_STYLE,
|
|
1832
|
+
flexDirection: "row",
|
|
1833
|
+
alignItems: "center",
|
|
1834
|
+
flexWrap: "wrap",
|
|
1835
|
+
gap: 8,
|
|
1836
|
+
minHeight: 34
|
|
1837
|
+
},
|
|
1838
|
+
children: [
|
|
1839
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
1840
|
+
style: {
|
|
1841
|
+
...FIELD_LABEL_STYLE,
|
|
1842
|
+
flex: "1 1 auto",
|
|
1843
|
+
cursor: disabled ? "default" : "pointer"
|
|
1844
|
+
},
|
|
1845
|
+
htmlFor: id,
|
|
1846
|
+
onClick: disabled ? void 0 : () => actions.edit(spec.group, spec.field, String(!checked)),
|
|
1847
|
+
children: label
|
|
1848
|
+
}),
|
|
1849
|
+
overriddenBadge,
|
|
1850
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Switch, {
|
|
1851
|
+
id,
|
|
1852
|
+
checked,
|
|
1853
|
+
disabled,
|
|
1854
|
+
onChange: (next) => actions.edit(spec.group, spec.field, String(next))
|
|
1855
|
+
}),
|
|
1856
|
+
spec.hint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1857
|
+
style: {
|
|
1858
|
+
...HINT_STYLE,
|
|
1859
|
+
flexBasis: "100%"
|
|
1860
|
+
},
|
|
1861
|
+
children: t(spec.hint)
|
|
1862
|
+
})
|
|
1863
|
+
]
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1575
1866
|
let control;
|
|
1576
1867
|
if (spec.kind === "select") control = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
1577
1868
|
id,
|
|
@@ -1592,7 +1883,7 @@ window.__ModuleLoader__.load({
|
|
|
1592
1883
|
type: "text",
|
|
1593
1884
|
inputMode: spec.kind === "number" ? "numeric" : void 0,
|
|
1594
1885
|
value: state.text,
|
|
1595
|
-
placeholder: spec.secret === true ? t(
|
|
1886
|
+
placeholder: spec.secret === true && spec.hint !== void 0 ? t(spec.hint) : void 0,
|
|
1596
1887
|
disabled,
|
|
1597
1888
|
"aria-invalid": state.invalid,
|
|
1598
1889
|
onChange: (event) => actions.edit(spec.group, spec.field, event.target.value),
|
|
@@ -1759,11 +2050,15 @@ window.__ModuleLoader__.load({
|
|
|
1759
2050
|
//#region src/client/locales.ts
|
|
1760
2051
|
const zh = {
|
|
1761
2052
|
nav: "通知&信使",
|
|
1762
|
-
"section.description": "会话交互 / 任务完成 /
|
|
2053
|
+
"section.description": "会话交互 / 任务完成 / 出错时的通知推送:系统通知、浏览器通知、飞书/企业微信/Discord/钉钉/Telegram。",
|
|
1763
2054
|
"group.triggers": "触发时机",
|
|
1764
2055
|
"group.system": "系统通知",
|
|
1765
2056
|
"group.browser": "浏览器通知",
|
|
1766
|
-
"group.feishu": "
|
|
2057
|
+
"group.feishu": "飞书机器人",
|
|
2058
|
+
"group.wecom": "企业微信",
|
|
2059
|
+
"group.discord": "Discord",
|
|
2060
|
+
"group.dingtalk": "钉钉",
|
|
2061
|
+
"group.telegram": "Telegram",
|
|
1767
2062
|
"group.message": "消息内容",
|
|
1768
2063
|
"field.triggers.interaction": "需要交互时通知",
|
|
1769
2064
|
"field.triggers.completed": "任务完成时通知",
|
|
@@ -1780,11 +2075,30 @@ window.__ModuleLoader__.load({
|
|
|
1780
2075
|
"field.feishu.secret": "签名密钥",
|
|
1781
2076
|
"field.feishu.timeoutMs": "请求超时(毫秒)",
|
|
1782
2077
|
"field.feishu.verbosity": "内容繁复度",
|
|
2078
|
+
"field.wecom.enabled": "企业微信群机器人",
|
|
2079
|
+
"field.wecom.webhookUrl": "Webhook 地址",
|
|
2080
|
+
"field.wecom.secret": "加签密钥",
|
|
2081
|
+
"field.wecom.timeoutMs": "请求超时(毫秒)",
|
|
2082
|
+
"field.wecom.verbosity": "内容繁复度",
|
|
2083
|
+
"field.discord.enabled": "Discord Webhook",
|
|
2084
|
+
"field.discord.webhookUrl": "Webhook 地址",
|
|
2085
|
+
"field.discord.timeoutMs": "请求超时(毫秒)",
|
|
2086
|
+
"field.discord.verbosity": "内容繁复度",
|
|
2087
|
+
"field.dingtalk.enabled": "钉钉机器人",
|
|
2088
|
+
"field.dingtalk.webhookUrl": "Webhook 地址",
|
|
2089
|
+
"field.dingtalk.secret": "加签密钥",
|
|
2090
|
+
"field.dingtalk.timeoutMs": "请求超时(毫秒)",
|
|
2091
|
+
"field.dingtalk.verbosity": "内容繁复度",
|
|
2092
|
+
"field.telegram.enabled": "Telegram Bot",
|
|
2093
|
+
"field.telegram.botToken": "Bot Token",
|
|
2094
|
+
"field.telegram.chatId": "Chat ID",
|
|
2095
|
+
"field.telegram.timeoutMs": "请求超时(毫秒)",
|
|
2096
|
+
"field.telegram.verbosity": "内容繁复度",
|
|
1783
2097
|
"field.message.titlePrefix": "标题前缀",
|
|
1784
2098
|
"field.message.includeSessionTitle": "正文包含会话标题",
|
|
1785
2099
|
"field.message.guiUrl": "打开链接地址",
|
|
1786
2100
|
"hint.system.icon": "node-notifier 需要文件绝对路径",
|
|
1787
|
-
"hint.
|
|
2101
|
+
"hint.secret": "留空不修改;重置可清除已存密钥",
|
|
1788
2102
|
"hint.message.titlePrefix": "如 [DSH]",
|
|
1789
2103
|
"action.save": "保存",
|
|
1790
2104
|
"action.saving": "保存中…",
|
|
@@ -1799,11 +2113,15 @@ window.__ModuleLoader__.load({
|
|
|
1799
2113
|
};
|
|
1800
2114
|
const en = {
|
|
1801
2115
|
nav: "Messenger",
|
|
1802
|
-
"section.description": "Notifications for interaction, task completion and errors: system toast, browser notification, Feishu
|
|
2116
|
+
"section.description": "Notifications for interaction, task completion and errors: system toast, browser notification, Feishu/WeCom/Discord/DingTalk/Telegram.",
|
|
1803
2117
|
"group.triggers": "Triggers",
|
|
1804
2118
|
"group.system": "System",
|
|
1805
2119
|
"group.browser": "Browser",
|
|
1806
|
-
"group.feishu": "
|
|
2120
|
+
"group.feishu": "Feishu bot",
|
|
2121
|
+
"group.wecom": "WeCom",
|
|
2122
|
+
"group.discord": "Discord",
|
|
2123
|
+
"group.dingtalk": "DingTalk",
|
|
2124
|
+
"group.telegram": "Telegram",
|
|
1807
2125
|
"group.message": "Message",
|
|
1808
2126
|
"field.triggers.interaction": "Notify when interaction is needed",
|
|
1809
2127
|
"field.triggers.completed": "Notify when a task completes",
|
|
@@ -1820,11 +2138,30 @@ window.__ModuleLoader__.load({
|
|
|
1820
2138
|
"field.feishu.secret": "Signing secret",
|
|
1821
2139
|
"field.feishu.timeoutMs": "Request timeout (ms)",
|
|
1822
2140
|
"field.feishu.verbosity": "Verbosity",
|
|
2141
|
+
"field.wecom.enabled": "WeCom group bot",
|
|
2142
|
+
"field.wecom.webhookUrl": "Webhook URL",
|
|
2143
|
+
"field.wecom.secret": "Signing secret",
|
|
2144
|
+
"field.wecom.timeoutMs": "Request timeout (ms)",
|
|
2145
|
+
"field.wecom.verbosity": "Verbosity",
|
|
2146
|
+
"field.discord.enabled": "Discord webhook",
|
|
2147
|
+
"field.discord.webhookUrl": "Webhook URL",
|
|
2148
|
+
"field.discord.timeoutMs": "Request timeout (ms)",
|
|
2149
|
+
"field.discord.verbosity": "Verbosity",
|
|
2150
|
+
"field.dingtalk.enabled": "DingTalk bot",
|
|
2151
|
+
"field.dingtalk.webhookUrl": "Webhook URL",
|
|
2152
|
+
"field.dingtalk.secret": "Signing secret",
|
|
2153
|
+
"field.dingtalk.timeoutMs": "Request timeout (ms)",
|
|
2154
|
+
"field.dingtalk.verbosity": "Verbosity",
|
|
2155
|
+
"field.telegram.enabled": "Telegram bot",
|
|
2156
|
+
"field.telegram.botToken": "Bot token",
|
|
2157
|
+
"field.telegram.chatId": "Chat ID",
|
|
2158
|
+
"field.telegram.timeoutMs": "Request timeout (ms)",
|
|
2159
|
+
"field.telegram.verbosity": "Verbosity",
|
|
1823
2160
|
"field.message.titlePrefix": "Title prefix",
|
|
1824
2161
|
"field.message.includeSessionTitle": "Include session title in the body",
|
|
1825
2162
|
"field.message.guiUrl": "Open link URL",
|
|
1826
2163
|
"hint.system.icon": "node-notifier requires an absolute file path",
|
|
1827
|
-
"hint.
|
|
2164
|
+
"hint.secret": "Leave blank to keep the stored secret; Reset clears it",
|
|
1828
2165
|
"hint.message.titlePrefix": "e.g. [DSH]",
|
|
1829
2166
|
"action.save": "Save",
|
|
1830
2167
|
"action.saving": "Saving…",
|