dsh-dock 0.11.6 → 0.13.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.md +54 -9
- package/client.js +685 -253
- package/features/mobile/view.js +305 -0
- package/features/mobile-relay/gateway.js +187 -11
- package/features/mobile-relay/host.js +175 -50
- package/features/mobile-relay/view.jsx +217 -86
- package/features/tokenlog/host.js +92 -13
- package/features/tokenlog/view.jsx +55 -21
- package/index.js +5 -1
- package/package.json +3 -3
- package/src/client.jsx +3 -2
- package/src/host-core.js +136 -1
package/client.js
CHANGED
|
@@ -12,7 +12,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
12
12
|
var __getProtoOf = Object.getPrototypeOf;
|
|
13
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
14
|
var __commonJS = (cb, mod) => function __require() {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw mod = 0, e;
|
|
19
|
+
}
|
|
16
20
|
};
|
|
17
21
|
var __export = (target, all) => {
|
|
18
22
|
for (var name in all)
|
|
@@ -36,18 +40,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
40
|
));
|
|
37
41
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
42
|
|
|
39
|
-
//
|
|
43
|
+
// node_modules/qrcode/lib/can-promise.js
|
|
40
44
|
var require_can_promise = __commonJS({
|
|
41
|
-
"
|
|
45
|
+
"node_modules/qrcode/lib/can-promise.js"(exports, module2) {
|
|
42
46
|
module2.exports = function() {
|
|
43
47
|
return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
50
|
});
|
|
47
51
|
|
|
48
|
-
//
|
|
52
|
+
// node_modules/qrcode/lib/core/utils.js
|
|
49
53
|
var require_utils = __commonJS({
|
|
50
|
-
"
|
|
54
|
+
"node_modules/qrcode/lib/core/utils.js"(exports) {
|
|
51
55
|
var toSJISFunction;
|
|
52
56
|
var CODEWORDS_COUNT = [
|
|
53
57
|
0,
|
|
@@ -124,9 +128,9 @@ var require_utils = __commonJS({
|
|
|
124
128
|
}
|
|
125
129
|
});
|
|
126
130
|
|
|
127
|
-
//
|
|
131
|
+
// node_modules/qrcode/lib/core/error-correction-level.js
|
|
128
132
|
var require_error_correction_level = __commonJS({
|
|
129
|
-
"
|
|
133
|
+
"node_modules/qrcode/lib/core/error-correction-level.js"(exports) {
|
|
130
134
|
exports.L = { bit: 1 };
|
|
131
135
|
exports.M = { bit: 0 };
|
|
132
136
|
exports.Q = { bit: 3 };
|
|
@@ -169,9 +173,9 @@ var require_error_correction_level = __commonJS({
|
|
|
169
173
|
}
|
|
170
174
|
});
|
|
171
175
|
|
|
172
|
-
//
|
|
176
|
+
// node_modules/qrcode/lib/core/bit-buffer.js
|
|
173
177
|
var require_bit_buffer = __commonJS({
|
|
174
|
-
"
|
|
178
|
+
"node_modules/qrcode/lib/core/bit-buffer.js"(exports, module2) {
|
|
175
179
|
function BitBuffer() {
|
|
176
180
|
this.buffer = [];
|
|
177
181
|
this.length = 0;
|
|
@@ -204,9 +208,9 @@ var require_bit_buffer = __commonJS({
|
|
|
204
208
|
}
|
|
205
209
|
});
|
|
206
210
|
|
|
207
|
-
//
|
|
211
|
+
// node_modules/qrcode/lib/core/bit-matrix.js
|
|
208
212
|
var require_bit_matrix = __commonJS({
|
|
209
|
-
"
|
|
213
|
+
"node_modules/qrcode/lib/core/bit-matrix.js"(exports, module2) {
|
|
210
214
|
function BitMatrix(size) {
|
|
211
215
|
if (!size || size < 1) {
|
|
212
216
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -233,9 +237,9 @@ var require_bit_matrix = __commonJS({
|
|
|
233
237
|
}
|
|
234
238
|
});
|
|
235
239
|
|
|
236
|
-
//
|
|
240
|
+
// node_modules/qrcode/lib/core/alignment-pattern.js
|
|
237
241
|
var require_alignment_pattern = __commonJS({
|
|
238
|
-
"
|
|
242
|
+
"node_modules/qrcode/lib/core/alignment-pattern.js"(exports) {
|
|
239
243
|
var getSymbolSize = require_utils().getSymbolSize;
|
|
240
244
|
exports.getRowColCoords = function getRowColCoords(version) {
|
|
241
245
|
if (version === 1) return [];
|
|
@@ -268,9 +272,9 @@ var require_alignment_pattern = __commonJS({
|
|
|
268
272
|
}
|
|
269
273
|
});
|
|
270
274
|
|
|
271
|
-
//
|
|
275
|
+
// node_modules/qrcode/lib/core/finder-pattern.js
|
|
272
276
|
var require_finder_pattern = __commonJS({
|
|
273
|
-
"
|
|
277
|
+
"node_modules/qrcode/lib/core/finder-pattern.js"(exports) {
|
|
274
278
|
var getSymbolSize = require_utils().getSymbolSize;
|
|
275
279
|
var FINDER_PATTERN_SIZE = 7;
|
|
276
280
|
exports.getPositions = function getPositions(version) {
|
|
@@ -287,9 +291,9 @@ var require_finder_pattern = __commonJS({
|
|
|
287
291
|
}
|
|
288
292
|
});
|
|
289
293
|
|
|
290
|
-
//
|
|
294
|
+
// node_modules/qrcode/lib/core/mask-pattern.js
|
|
291
295
|
var require_mask_pattern = __commonJS({
|
|
292
|
-
"
|
|
296
|
+
"node_modules/qrcode/lib/core/mask-pattern.js"(exports) {
|
|
293
297
|
exports.Patterns = {
|
|
294
298
|
PATTERN000: 0,
|
|
295
299
|
PATTERN001: 1,
|
|
@@ -429,9 +433,9 @@ var require_mask_pattern = __commonJS({
|
|
|
429
433
|
}
|
|
430
434
|
});
|
|
431
435
|
|
|
432
|
-
//
|
|
436
|
+
// node_modules/qrcode/lib/core/error-correction-code.js
|
|
433
437
|
var require_error_correction_code = __commonJS({
|
|
434
|
-
"
|
|
438
|
+
"node_modules/qrcode/lib/core/error-correction-code.js"(exports) {
|
|
435
439
|
var ECLevel = require_error_correction_level();
|
|
436
440
|
var EC_BLOCKS_TABLE = [
|
|
437
441
|
// L M Q H
|
|
@@ -790,9 +794,9 @@ var require_error_correction_code = __commonJS({
|
|
|
790
794
|
}
|
|
791
795
|
});
|
|
792
796
|
|
|
793
|
-
//
|
|
797
|
+
// node_modules/qrcode/lib/core/galois-field.js
|
|
794
798
|
var require_galois_field = __commonJS({
|
|
795
|
-
"
|
|
799
|
+
"node_modules/qrcode/lib/core/galois-field.js"(exports) {
|
|
796
800
|
var EXP_TABLE = new Uint8Array(512);
|
|
797
801
|
var LOG_TABLE = new Uint8Array(256);
|
|
798
802
|
(function initTables() {
|
|
@@ -823,9 +827,9 @@ var require_galois_field = __commonJS({
|
|
|
823
827
|
}
|
|
824
828
|
});
|
|
825
829
|
|
|
826
|
-
//
|
|
830
|
+
// node_modules/qrcode/lib/core/polynomial.js
|
|
827
831
|
var require_polynomial = __commonJS({
|
|
828
|
-
"
|
|
832
|
+
"node_modules/qrcode/lib/core/polynomial.js"(exports) {
|
|
829
833
|
var GF = require_galois_field();
|
|
830
834
|
exports.mul = function mul(p1, p2) {
|
|
831
835
|
const coeff = new Uint8Array(p1.length + p2.length - 1);
|
|
@@ -859,9 +863,9 @@ var require_polynomial = __commonJS({
|
|
|
859
863
|
}
|
|
860
864
|
});
|
|
861
865
|
|
|
862
|
-
//
|
|
866
|
+
// node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
863
867
|
var require_reed_solomon_encoder = __commonJS({
|
|
864
|
-
"
|
|
868
|
+
"node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module2) {
|
|
865
869
|
var Polynomial = require_polynomial();
|
|
866
870
|
function ReedSolomonEncoder(degree) {
|
|
867
871
|
this.genPoly = void 0;
|
|
@@ -891,18 +895,18 @@ var require_reed_solomon_encoder = __commonJS({
|
|
|
891
895
|
}
|
|
892
896
|
});
|
|
893
897
|
|
|
894
|
-
//
|
|
898
|
+
// node_modules/qrcode/lib/core/version-check.js
|
|
895
899
|
var require_version_check = __commonJS({
|
|
896
|
-
"
|
|
900
|
+
"node_modules/qrcode/lib/core/version-check.js"(exports) {
|
|
897
901
|
exports.isValid = function isValid(version) {
|
|
898
902
|
return !isNaN(version) && version >= 1 && version <= 40;
|
|
899
903
|
};
|
|
900
904
|
}
|
|
901
905
|
});
|
|
902
906
|
|
|
903
|
-
//
|
|
907
|
+
// node_modules/qrcode/lib/core/regex.js
|
|
904
908
|
var require_regex = __commonJS({
|
|
905
|
-
"
|
|
909
|
+
"node_modules/qrcode/lib/core/regex.js"(exports) {
|
|
906
910
|
var numeric = "[0-9]+";
|
|
907
911
|
var alphanumeric = "[A-Z $%*+\\-./:]+";
|
|
908
912
|
var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
@@ -928,9 +932,9 @@ var require_regex = __commonJS({
|
|
|
928
932
|
}
|
|
929
933
|
});
|
|
930
934
|
|
|
931
|
-
//
|
|
935
|
+
// node_modules/qrcode/lib/core/mode.js
|
|
932
936
|
var require_mode = __commonJS({
|
|
933
|
-
"
|
|
937
|
+
"node_modules/qrcode/lib/core/mode.js"(exports) {
|
|
934
938
|
var VersionCheck = require_version_check();
|
|
935
939
|
var Regex = require_regex();
|
|
936
940
|
exports.NUMERIC = {
|
|
@@ -1009,9 +1013,9 @@ var require_mode = __commonJS({
|
|
|
1009
1013
|
}
|
|
1010
1014
|
});
|
|
1011
1015
|
|
|
1012
|
-
//
|
|
1016
|
+
// node_modules/qrcode/lib/core/version.js
|
|
1013
1017
|
var require_version = __commonJS({
|
|
1014
|
-
"
|
|
1018
|
+
"node_modules/qrcode/lib/core/version.js"(exports) {
|
|
1015
1019
|
var Utils = require_utils();
|
|
1016
1020
|
var ECCode = require_error_correction_code();
|
|
1017
1021
|
var ECLevel = require_error_correction_level();
|
|
@@ -1104,9 +1108,9 @@ var require_version = __commonJS({
|
|
|
1104
1108
|
}
|
|
1105
1109
|
});
|
|
1106
1110
|
|
|
1107
|
-
//
|
|
1111
|
+
// node_modules/qrcode/lib/core/format-info.js
|
|
1108
1112
|
var require_format_info = __commonJS({
|
|
1109
|
-
"
|
|
1113
|
+
"node_modules/qrcode/lib/core/format-info.js"(exports) {
|
|
1110
1114
|
var Utils = require_utils();
|
|
1111
1115
|
var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0;
|
|
1112
1116
|
var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1;
|
|
@@ -1122,9 +1126,9 @@ var require_format_info = __commonJS({
|
|
|
1122
1126
|
}
|
|
1123
1127
|
});
|
|
1124
1128
|
|
|
1125
|
-
//
|
|
1129
|
+
// node_modules/qrcode/lib/core/numeric-data.js
|
|
1126
1130
|
var require_numeric_data = __commonJS({
|
|
1127
|
-
"
|
|
1131
|
+
"node_modules/qrcode/lib/core/numeric-data.js"(exports, module2) {
|
|
1128
1132
|
var Mode = require_mode();
|
|
1129
1133
|
function NumericData(data) {
|
|
1130
1134
|
this.mode = Mode.NUMERIC;
|
|
@@ -1157,9 +1161,9 @@ var require_numeric_data = __commonJS({
|
|
|
1157
1161
|
}
|
|
1158
1162
|
});
|
|
1159
1163
|
|
|
1160
|
-
//
|
|
1164
|
+
// node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
1161
1165
|
var require_alphanumeric_data = __commonJS({
|
|
1162
|
-
"
|
|
1166
|
+
"node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module2) {
|
|
1163
1167
|
var Mode = require_mode();
|
|
1164
1168
|
var ALPHA_NUM_CHARS = [
|
|
1165
1169
|
"0",
|
|
@@ -1236,9 +1240,9 @@ var require_alphanumeric_data = __commonJS({
|
|
|
1236
1240
|
}
|
|
1237
1241
|
});
|
|
1238
1242
|
|
|
1239
|
-
//
|
|
1243
|
+
// node_modules/qrcode/lib/core/byte-data.js
|
|
1240
1244
|
var require_byte_data = __commonJS({
|
|
1241
|
-
"
|
|
1245
|
+
"node_modules/qrcode/lib/core/byte-data.js"(exports, module2) {
|
|
1242
1246
|
var Mode = require_mode();
|
|
1243
1247
|
function ByteData(data) {
|
|
1244
1248
|
this.mode = Mode.BYTE;
|
|
@@ -1266,9 +1270,9 @@ var require_byte_data = __commonJS({
|
|
|
1266
1270
|
}
|
|
1267
1271
|
});
|
|
1268
1272
|
|
|
1269
|
-
//
|
|
1273
|
+
// node_modules/qrcode/lib/core/kanji-data.js
|
|
1270
1274
|
var require_kanji_data = __commonJS({
|
|
1271
|
-
"
|
|
1275
|
+
"node_modules/qrcode/lib/core/kanji-data.js"(exports, module2) {
|
|
1272
1276
|
var Mode = require_mode();
|
|
1273
1277
|
var Utils = require_utils();
|
|
1274
1278
|
function KanjiData(data) {
|
|
@@ -1305,9 +1309,9 @@ var require_kanji_data = __commonJS({
|
|
|
1305
1309
|
}
|
|
1306
1310
|
});
|
|
1307
1311
|
|
|
1308
|
-
//
|
|
1312
|
+
// node_modules/dijkstrajs/dijkstra.js
|
|
1309
1313
|
var require_dijkstra = __commonJS({
|
|
1310
|
-
"
|
|
1314
|
+
"node_modules/dijkstrajs/dijkstra.js"(exports, module2) {
|
|
1311
1315
|
"use strict";
|
|
1312
1316
|
var dijkstra = {
|
|
1313
1317
|
single_source_shortest_paths: function(graph, s, d) {
|
|
@@ -1406,9 +1410,9 @@ var require_dijkstra = __commonJS({
|
|
|
1406
1410
|
}
|
|
1407
1411
|
});
|
|
1408
1412
|
|
|
1409
|
-
//
|
|
1413
|
+
// node_modules/qrcode/lib/core/segments.js
|
|
1410
1414
|
var require_segments = __commonJS({
|
|
1411
|
-
"
|
|
1415
|
+
"node_modules/qrcode/lib/core/segments.js"(exports) {
|
|
1412
1416
|
var Mode = require_mode();
|
|
1413
1417
|
var NumericData = require_numeric_data();
|
|
1414
1418
|
var AlphanumericData = require_alphanumeric_data();
|
|
@@ -1592,9 +1596,9 @@ var require_segments = __commonJS({
|
|
|
1592
1596
|
}
|
|
1593
1597
|
});
|
|
1594
1598
|
|
|
1595
|
-
//
|
|
1599
|
+
// node_modules/qrcode/lib/core/qrcode.js
|
|
1596
1600
|
var require_qrcode = __commonJS({
|
|
1597
|
-
"
|
|
1601
|
+
"node_modules/qrcode/lib/core/qrcode.js"(exports) {
|
|
1598
1602
|
var Utils = require_utils();
|
|
1599
1603
|
var ECLevel = require_error_correction_level();
|
|
1600
1604
|
var BitBuffer = require_bit_buffer();
|
|
@@ -1853,9 +1857,9 @@ var require_qrcode = __commonJS({
|
|
|
1853
1857
|
}
|
|
1854
1858
|
});
|
|
1855
1859
|
|
|
1856
|
-
//
|
|
1860
|
+
// node_modules/qrcode/lib/renderer/utils.js
|
|
1857
1861
|
var require_utils2 = __commonJS({
|
|
1858
|
-
"
|
|
1862
|
+
"node_modules/qrcode/lib/renderer/utils.js"(exports) {
|
|
1859
1863
|
function hex2rgba(hex) {
|
|
1860
1864
|
if (typeof hex === "number") {
|
|
1861
1865
|
hex = hex.toString();
|
|
@@ -1933,9 +1937,9 @@ var require_utils2 = __commonJS({
|
|
|
1933
1937
|
}
|
|
1934
1938
|
});
|
|
1935
1939
|
|
|
1936
|
-
//
|
|
1940
|
+
// node_modules/qrcode/lib/renderer/canvas.js
|
|
1937
1941
|
var require_canvas = __commonJS({
|
|
1938
|
-
"
|
|
1942
|
+
"node_modules/qrcode/lib/renderer/canvas.js"(exports) {
|
|
1939
1943
|
var Utils = require_utils2();
|
|
1940
1944
|
function clearCanvas(ctx, canvas, size) {
|
|
1941
1945
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
@@ -1986,9 +1990,9 @@ var require_canvas = __commonJS({
|
|
|
1986
1990
|
}
|
|
1987
1991
|
});
|
|
1988
1992
|
|
|
1989
|
-
//
|
|
1993
|
+
// node_modules/qrcode/lib/renderer/svg-tag.js
|
|
1990
1994
|
var require_svg_tag = __commonJS({
|
|
1991
|
-
"
|
|
1995
|
+
"node_modules/qrcode/lib/renderer/svg-tag.js"(exports) {
|
|
1992
1996
|
var Utils = require_utils2();
|
|
1993
1997
|
function getColorAttrib(color, attrib) {
|
|
1994
1998
|
const alpha = color.a / 255;
|
|
@@ -2044,9 +2048,9 @@ var require_svg_tag = __commonJS({
|
|
|
2044
2048
|
}
|
|
2045
2049
|
});
|
|
2046
2050
|
|
|
2047
|
-
//
|
|
2051
|
+
// node_modules/qrcode/lib/browser.js
|
|
2048
2052
|
var require_browser = __commonJS({
|
|
2049
|
-
"
|
|
2053
|
+
"node_modules/qrcode/lib/browser.js"(exports) {
|
|
2050
2054
|
var canPromise = require_can_promise();
|
|
2051
2055
|
var QRCode2 = require_qrcode();
|
|
2052
2056
|
var CanvasRenderer = require_canvas();
|
|
@@ -2122,7 +2126,7 @@ __export(client_exports, {
|
|
|
2122
2126
|
inject: () => inject
|
|
2123
2127
|
});
|
|
2124
2128
|
module.exports = __toCommonJS(client_exports);
|
|
2125
|
-
var
|
|
2129
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
2126
2130
|
|
|
2127
2131
|
// src/shared.js
|
|
2128
2132
|
var import_react = __toESM(require("react"), 1);
|
|
@@ -2764,6 +2768,9 @@ var css = `
|
|
|
2764
2768
|
.dtok-pseg{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:4px 0;}
|
|
2765
2769
|
.dtok-pseg-name{font-size:11px;color:var(--dsw-alias-label-secondary);min-width:112px;}
|
|
2766
2770
|
.dtok-pseg-tilde{font-size:11px;color:var(--dsw-alias-label-secondary);}
|
|
2771
|
+
.dtok-price select{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:4px 6px;font-size:12px;font-family:inherit;}
|
|
2772
|
+
.dtok-price textarea{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:6px 8px;font-size:12px;font-family:inherit;min-height:64px;resize:vertical;width:100%;box-sizing:border-box;}
|
|
2773
|
+
.dtok-days{font-size:11px;}
|
|
2767
2774
|
.dtok-src{font-size:11px;color:var(--dsw-alias-label-tertiary,#94a3b8);}
|
|
2768
2775
|
.dtok-src.custom{color:var(--dsw-alias-state-success-primary,#4ade80);}
|
|
2769
2776
|
.dtok-src.fallback{color:var(--dk-warn);}
|
|
@@ -2836,9 +2843,11 @@ function numStr(v) {
|
|
|
2836
2843
|
return v === void 0 || v === null ? "" : String(v);
|
|
2837
2844
|
}
|
|
2838
2845
|
function segToDraft(s) {
|
|
2846
|
+
const d = s && s.days;
|
|
2839
2847
|
return {
|
|
2840
2848
|
start: numStr(s && s.start),
|
|
2841
2849
|
end: numStr(s && s.end),
|
|
2850
|
+
days: d === "workday" || d === "nonworkday" ? d : "all",
|
|
2842
2851
|
input: numStr(s && s.input),
|
|
2843
2852
|
output: numStr(s && s.output),
|
|
2844
2853
|
cacheRead: numStr(s && s.cacheRead),
|
|
@@ -2943,23 +2952,27 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
2943
2952
|
const [rate, setRate] = (0, import_react2.useState)("7.2");
|
|
2944
2953
|
const [fetchOn, setFetchOn] = (0, import_react2.useState)(true);
|
|
2945
2954
|
const [fb, setFb] = (0, import_react2.useState)({ input: "", output: "", cacheRead: "", cacheWrite: "" });
|
|
2955
|
+
const [holidaysText, setHolidaysText] = (0, import_react2.useState)("");
|
|
2946
2956
|
const [newMatch, setNewMatch] = (0, import_react2.useState)("");
|
|
2947
2957
|
const [msg, setMsg] = (0, import_react2.useState)(null);
|
|
2948
2958
|
const [saving, setSaving] = (0, import_react2.useState)(false);
|
|
2959
|
+
const applyCfg = (d) => {
|
|
2960
|
+
setCfg(d);
|
|
2961
|
+
setRate(numStr(d.usdCnyRate));
|
|
2962
|
+
setFetchOn(!!d.fetchOfficial);
|
|
2963
|
+
setFb({
|
|
2964
|
+
input: numStr(d.fallback && d.fallback.input),
|
|
2965
|
+
output: numStr(d.fallback && d.fallback.output),
|
|
2966
|
+
cacheRead: numStr(d.fallback && d.fallback.cacheRead),
|
|
2967
|
+
cacheWrite: numStr(d.fallback && d.fallback.cacheWrite)
|
|
2968
|
+
});
|
|
2969
|
+
setHolidaysText((d.holidays || []).join("\n"));
|
|
2970
|
+
setRows((d.pricing || []).map(rowToDraft));
|
|
2971
|
+
};
|
|
2949
2972
|
(0, import_react2.useEffect)(() => {
|
|
2950
2973
|
let cancel = false;
|
|
2951
2974
|
rpcCall("pricing", {}).then((d) => {
|
|
2952
|
-
if (cancel)
|
|
2953
|
-
setCfg(d);
|
|
2954
|
-
setRate(numStr(d.usdCnyRate));
|
|
2955
|
-
setFetchOn(!!d.fetchOfficial);
|
|
2956
|
-
setFb({
|
|
2957
|
-
input: numStr(d.fallback && d.fallback.input),
|
|
2958
|
-
output: numStr(d.fallback && d.fallback.output),
|
|
2959
|
-
cacheRead: numStr(d.fallback && d.fallback.cacheRead),
|
|
2960
|
-
cacheWrite: numStr(d.fallback && d.fallback.cacheWrite)
|
|
2961
|
-
});
|
|
2962
|
-
setRows((d.pricing || []).map(rowToDraft));
|
|
2975
|
+
if (!cancel) applyCfg(d);
|
|
2963
2976
|
}).catch((e) => {
|
|
2964
2977
|
if (!cancel) setMsg({ ok: false, text: String(e && e.message || e) });
|
|
2965
2978
|
});
|
|
@@ -2997,6 +3010,7 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
2997
3010
|
const peaks = (r.peaks || []).map((s) => ({
|
|
2998
3011
|
start: Number(s.start || 0),
|
|
2999
3012
|
end: Number(s.end || 0),
|
|
3013
|
+
days: s.days === "workday" || s.days === "nonworkday" ? s.days : "all",
|
|
3000
3014
|
input: Number(s.input || 0),
|
|
3001
3015
|
output: Number(s.output || 0),
|
|
3002
3016
|
cacheRead: Number(s.cacheRead || 0),
|
|
@@ -3005,6 +3019,7 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3005
3019
|
if (peaks.length) out.peaks = peaks;
|
|
3006
3020
|
return out;
|
|
3007
3021
|
});
|
|
3022
|
+
payload.holidays = holidaysText.split(/\r?\n/).map((s) => s.trim()).filter(Boolean);
|
|
3008
3023
|
payload.fallback = {
|
|
3009
3024
|
input: Number(fb.input || 0),
|
|
3010
3025
|
output: Number(fb.output || 0),
|
|
@@ -3014,8 +3029,7 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3014
3029
|
setSaving(true);
|
|
3015
3030
|
setMsg(null);
|
|
3016
3031
|
rpcCall("setpricing", payload).then((d) => {
|
|
3017
|
-
|
|
3018
|
-
setRows((d.pricing || []).map(rowToDraft));
|
|
3032
|
+
applyCfg(d);
|
|
3019
3033
|
setMsg({ ok: true, text: "\u5355\u4EF7\u5DF2\u4FDD\u5B58\uFF0C\u8D39\u7528\u5DF2\u6309\u65B0\u4EF7\u5373\u65F6\u91CD\u7B97" });
|
|
3020
3034
|
if (onSaved) onSaved();
|
|
3021
3035
|
}).catch((e) => setMsg({ ok: false, text: String(e && e.message || e) })).finally(() => setSaving(false));
|
|
@@ -3040,9 +3054,15 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3040
3054
|
);
|
|
3041
3055
|
const segLabel = (s) => {
|
|
3042
3056
|
const a = numStr(s.start), b = numStr(s.end);
|
|
3043
|
-
|
|
3044
|
-
|
|
3057
|
+
const dayTag = s.days === "workday" ? "\u5DE5\u4F5C\u65E5" : s.days === "nonworkday" ? "\u5468\u672B/\u8282\u5047\u65E5" : "";
|
|
3058
|
+
const time = a === "" || b === "" ? "\u65F6\u6BB5" : a + "~" + b + (Number(a) === Number(b) ? "\uFF08\u5168\u5929\uFF09" : Number(a) > Number(b) ? "\uFF08\u8DE8\u96F6\u70B9\uFF09" : "");
|
|
3059
|
+
return dayTag ? dayTag + " " + time : time;
|
|
3045
3060
|
};
|
|
3061
|
+
const daysSelect = (value, onChange) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", { className: "dtok-days", value: value || "all", onChange: (e) => onChange(e.target.value), title: "\u8BE5\u65F6\u6BB5\u5728\u54EA\u7C7B\u65E5\u671F\u751F\u6548", children: [
|
|
3062
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "all", children: "\u6BCF\u5929" }),
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "workday", children: "\u4EC5\u5DE5\u4F5C\u65E5" }),
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "nonworkday", children: "\u4EC5\u5468\u672B/\u8282\u5047\u65E5" })
|
|
3065
|
+
] });
|
|
3046
3066
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: embedded ? "dtok-price emb" : "dtok-price", onClick: (e) => e.stopPropagation(), children: [
|
|
3047
3067
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-price-grid", children: [
|
|
3048
3068
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-price-field", children: [
|
|
@@ -3054,6 +3074,22 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3054
3074
|
"\u5B98\u7F51\u4EF7\u76EE\u81EA\u52A8\u540C\u6B65\uFF08\u5173\u95ED\u540E\u4EC5\u7528\u81EA\u5B9A\u4E49/\u5185\u7F6E\u4EF7\uFF09"
|
|
3055
3075
|
] })
|
|
3056
3076
|
] }),
|
|
3077
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-section-title", style: { margin: "0 0 4px" }, children: "\u6CD5\u5B9A\u8282\u5047\u65E5\uFF08\u4F9B\u300C\u4EC5\u5DE5\u4F5C\u65E5\u300D\u5206\u65F6\u6BB5\u5224\u5B9A\uFF09" }),
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-price-field", style: { maxWidth: 420 }, children: [
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { children: "\u6BCF\u884C\u4E00\u6761\uFF1A\u5355\u65E5 2026-10-01\uFF0C\u6216\u533A\u95F4 2026-10-01~2026-10-07\uFF08\u542B\u4E24\u7AEF\uFF09" }),
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3082
|
+
"textarea",
|
|
3083
|
+
{
|
|
3084
|
+
value: holidaysText,
|
|
3085
|
+
placeholder: "2026-10-01~2026-10-07\n2027-01-01",
|
|
3086
|
+
onChange: (e) => setHolidaysText(e.target.value),
|
|
3087
|
+
spellCheck: false
|
|
3088
|
+
}
|
|
3089
|
+
)
|
|
3090
|
+
] }),
|
|
3091
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", children: "\u5468\u672B\uFF08\u5468\u516D/\u5468\u65E5\uFF09\u4E0E\u8FD9\u4E9B\u8282\u5047\u65E5\u89C6\u4E3A\u975E\u5DE5\u4F5C\u65E5\uFF1B\u6807\u4E86\u300C\u4EC5\u5DE5\u4F5C\u65E5\u300D\u7684\u9AD8\u5CF0\u6BB5\u5728\u8FD9\u4E9B\u65E5\u671F\u56DE\u843D\u57FA\u51C6\u4EF7\uFF08\u8C37\u4EF7\uFF09\u3002" })
|
|
3092
|
+
] }),
|
|
3057
3093
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
3058
3094
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-section-title", style: { margin: "0 0 4px" }, children: [
|
|
3059
3095
|
"\u6309\u6A21\u578B\u914D\u7F6E\u5355\u4EF7\uFF08",
|
|
@@ -3092,10 +3128,11 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3092
3128
|
] })
|
|
3093
3129
|
] }),
|
|
3094
3130
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", style: { marginTop: 2 }, children: "\u7F13\u5B58\u5199\u5165\uFF1D\u672A\u547D\u4E2D\u7F13\u5B58\u3001\u672C\u6B21\u65B0\u5EFA\u7F13\u5B58\u7684\u90A3\u90E8\u5206\u8F93\u5165\uFF08Claude \u7B49\u6309\u6EA2\u4EF7\u5355\u72EC\u6536\u5EFA\u7F13\u5B58\u8D39\uFF09\uFF1BDeepSeek \u4E0D\u6536\u6B64\u9879\uFF0C\u586B 0 \u5373\u53EF\u3002" }),
|
|
3095
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", style: { marginTop: 2 }, children: "\u5206\u65F6\u6BB5\u4EF7\uFF08\u53EF\u591A\u6BB5\uFF0C\u547D\u4E2D\u54EA\u6BB5\u7528\u54EA\u6BB5\uFF1B\u65F6\u6BB5\u5916\u56DE\u843D\u5230\u57FA\u51C6\u4EF7\u3002start>end \u8868\u793A\u8DE8\u96F6\u70B9\uFF0C\u5982 23~7\uFF1Bstart=end \u8868\u793A\u5168\u5929\uFF09" }),
|
|
3131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", style: { marginTop: 2 }, children: "\u5206\u65F6\u6BB5\u4EF7\uFF08\u53EF\u591A\u6BB5\uFF0C\u547D\u4E2D\u54EA\u6BB5\u7528\u54EA\u6BB5\uFF1B\u65F6\u6BB5\u5916\u56DE\u843D\u5230\u57FA\u51C6\u4EF7\u3002start>end \u8868\u793A\u8DE8\u96F6\u70B9\uFF0C\u5982 23~7\uFF1Bstart=end \u8868\u793A\u5168\u5929\u3002 \u6BCF\u6BB5\u53EF\u9009\u65E5\u671F\u7C7B\u578B\uFF1A\u6BCF\u5929 / \u4EC5\u5DE5\u4F5C\u65E5\uFF08\u975E\u5468\u672B\u4E14\u975E\u4E0B\u65B9\u8282\u5047\u65E5\uFF09/ \u4EC5\u5468\u672B\u6216\u8282\u5047\u65E5\u2014\u2014\u5982 DeepSeek\u300C\u5DE5\u4F5C\u65E5 9~12\u300114~18 \u53CC\u500D\uFF0C\u5468\u672B\u4E0E\u8282\u5047\u65E5\u5168\u5929\u8C37\u4EF7\u300D\uFF09" }),
|
|
3096
3132
|
r.peaks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", children: "\uFF08\u672A\u8BBE\u7F6E\u5206\u65F6\u6BB5\uFF0C\u6309\u57FA\u51C6\u4EF7\u8BA1\u8D39\uFF09" }) : null,
|
|
3097
3133
|
r.peaks.map((s, k) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-pseg", children: [
|
|
3098
3134
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dtok-pseg-name", children: segLabel(s) }),
|
|
3135
|
+
daysSelect(s.days, (v) => patchSeg(i, k, { days: v })),
|
|
3099
3136
|
num(s.start, (v) => patchSeg(i, k, { start: v }), { width: 56 }),
|
|
3100
3137
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dtok-pseg-tilde", children: "~" }),
|
|
3101
3138
|
num(s.end, (v) => patchSeg(i, k, { end: v }), { width: 56 }),
|
|
@@ -3106,7 +3143,7 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3106
3143
|
segNum(s.cacheWrite, (v) => patchSeg(i, k, { cacheWrite: v }), "\u5199\u5165"),
|
|
3107
3144
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "dtok-btn tiny", onClick: () => delSeg(i, k), children: "\u5220\u9664\u65F6\u6BB5" })
|
|
3108
3145
|
] }, k)),
|
|
3109
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", style: { opacity: 0.85 }, children: "\u65F6\u6BB5\u4EF7\u4ECE\u5DE6\u5230\u53F3\uFF1A\u8F93\u5165\uFF08\u547D\u4E2D\uFF09/ \u8F93\u5165\uFF08\u672A\u547D\u4E2D\uFF09/ \u8F93\u51FA / \u7F13\u5B58\u5199\u5165" }),
|
|
3146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dtok-price-hint", style: { opacity: 0.85 }, children: "\u65F6\u6BB5\u4EF7\u4ECE\u5DE6\u5230\u53F3\uFF1A\u65E5\u671F\u7C7B\u578B / \u8D77~\u6B62\u65F6 / \u8F93\u5165\uFF08\u547D\u4E2D\uFF09/ \u8F93\u5165\uFF08\u672A\u547D\u4E2D\uFF09/ \u8F93\u51FA / \u7F13\u5B58\u5199\u5165" }),
|
|
3110
3147
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "dtok-btn tiny", onClick: () => addSeg(i), children: "+ \u6DFB\u52A0\u65F6\u6BB5" })
|
|
3111
3148
|
] }, i)),
|
|
3112
3149
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dtok-price-grid", style: { marginTop: 6 }, children: [
|
|
@@ -3165,7 +3202,7 @@ function PricingEditor({ onClose, onSaved, embedded }) {
|
|
|
3165
3202
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: b.input }),
|
|
3166
3203
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: b.output }),
|
|
3167
3204
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: b.cacheWrite }),
|
|
3168
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: b.peaks && b.peaks.length ? b.peaks.map((s) => s.start + "~" + s.end).join("\u3001") + "\u65F6" : "\u2014" })
|
|
3205
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: b.peaks && b.peaks.length ? b.peaks.map((s) => (s.days === "workday" ? "\u5DE5\u4F5C\u65E5" : s.days === "nonworkday" ? "\u5468\u672B/\u8282\u5047" : "") + s.start + "~" + s.end).join("\u3001") + "\u65F6" : "\u2014" })
|
|
3169
3206
|
] }, b.match)) })
|
|
3170
3207
|
] }) })
|
|
3171
3208
|
] }) : null,
|
|
@@ -3669,7 +3706,7 @@ var feature = {
|
|
|
3669
3706
|
name: "\u7528\u91CF\u8BB0\u5F55",
|
|
3670
3707
|
order: 110,
|
|
3671
3708
|
accent: "#fbbf24",
|
|
3672
|
-
description: "\u8BB0\u5F55\u5168\u90E8 LLM API \u8C03\u7528\uFF1A\u79D2\u7EA7\u65F6\u95F4\u7B5B\u9009\u3001Token/\u8D39\u7528\u7EDF\u8BA1\uFF08\u53EF\u914D\u7F6E\u5404\u6A21\u578B\u5355\u4EF7\uFF0C\u6301\u4E45\u4FDD\u5B58\u5E76\u6309\u81EA\u586B\u5355\u4EF7\u8BA1\u8D39\uFF1B\u5185\u7F6E\u5CF0\u8C37\u8BA1\u4EF7+\u5B98\u7F51\u4EF7\u76EE\u81EA\u52A8\u540C\u6B65\u4F5C\u515C\u5E95\uFF09\u3001\u5206\u7EC4\u6C47\u603B\u3001\u660E\u7EC6\u68C0\u7D22\u4E0E CSV \u5BFC\u51FA",
|
|
3709
|
+
description: "\u8BB0\u5F55\u5168\u90E8 LLM API \u8C03\u7528\uFF1A\u79D2\u7EA7\u65F6\u95F4\u7B5B\u9009\u3001Token/\u8D39\u7528\u7EDF\u8BA1\uFF08\u53EF\u914D\u7F6E\u5404\u6A21\u578B\u5355\u4EF7\uFF0C\u6301\u4E45\u4FDD\u5B58\u5E76\u6309\u81EA\u586B\u5355\u4EF7\u8BA1\u8D39\uFF1B\u591A\u6BB5\u5206\u65F6\u4EF7\u53EF\u9650\u5B9A\u5DE5\u4F5C\u65E5/\u5468\u672B\u8282\u5047\u65E5\uFF0C\u5185\u7F6E\u5CF0\u8C37\u8BA1\u4EF7+\u5B98\u7F51\u4EF7\u76EE\u81EA\u52A8\u540C\u6B65\u4F5C\u515C\u5E95\uFF09\u3001\u5206\u7EC4\u6C47\u603B\u3001\u660E\u7EC6\u68C0\u7D22\u4E0E CSV \u5BFC\u51FA",
|
|
3673
3710
|
css,
|
|
3674
3711
|
View: TokenLogView,
|
|
3675
3712
|
HomeStat: TokenLogHomeStat,
|
|
@@ -11144,6 +11181,11 @@ function RemoteCard() {
|
|
|
11144
11181
|
busy === "stop" ? "\u6B63\u5728\u5173\u95ED\u2026" : "\u5173\u95ED\u8FDC\u7A0B\u8BBF\u95EE"
|
|
11145
11182
|
] })
|
|
11146
11183
|
] }),
|
|
11184
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
|
|
11185
|
+
"\u5DF2\u767B\u5F55\u8BBE\u5907\uFF1A",
|
|
11186
|
+
typeof lan.devices === "number" ? lan.devices : 0,
|
|
11187
|
+
" \u53F0\uFF08\u6539\u5BC6\u6216\u5173\u95ED\u5165\u53E3\u5373\u5168\u90E8\u4E0B\u7EBF\uFF09"
|
|
11188
|
+
] }),
|
|
11147
11189
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "\u4E3B\u5B9E\u4F8B\u4FDD\u6301\u4EC5\u672C\u673A\uFF08\u7ED3\u6784\u4E0A\u4E0D\u5B58\u5728\u514D\u767B\u5F55\u76F4\u8FDE\uFF09\uFF1B\u8D26\u53F7\u5BC6\u7801\u53EA\u53D1\u7ED9\u81EA\u5DF1\u3002\u82E5\u5F00\u542F\u524D\u5DF2\u6709\u65E7\u670D\u52A1\u5668\u6A21\u5F0F\uFF080.0.0.0\uFF09\u914D\u7F6E\uFF0C\u4F1A\u4E00\u5E76\u79FB\u9664\u5E76\u63D0\u793A\u91CD\u542F\u3002" })
|
|
11148
11190
|
] })
|
|
11149
11191
|
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "dmr-primary", onClick: enable, disabled: busy === "start", children: busy === "start" ? "\u6B63\u5728\u5F00\u542F\u2026" : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
@@ -11182,10 +11224,44 @@ function MobileRelayView() {
|
|
|
11182
11224
|
function MobileRelayOverlay() {
|
|
11183
11225
|
(0, import_react21.useEffect)(() => {
|
|
11184
11226
|
if (typeof window === "undefined" || typeof document === "undefined") return void 0;
|
|
11185
|
-
const
|
|
11227
|
+
const host = window.location && window.location.hostname || "";
|
|
11228
|
+
const loopback = host === "127.0.0.1" || host === "localhost" || host === "::1" || host.endsWith(".localhost");
|
|
11229
|
+
if (loopback) return void 0;
|
|
11230
|
+
if (typeof MutationObserver === "undefined") return void 0;
|
|
11231
|
+
let done = false;
|
|
11232
|
+
const tryDismiss = () => {
|
|
11233
|
+
if (done) return;
|
|
11234
|
+
const dialogs = document.querySelectorAll('[role="dialog"]');
|
|
11235
|
+
for (const dialog of dialogs) {
|
|
11236
|
+
const text = dialog.textContent || "";
|
|
11237
|
+
if (!/预览版说明|Preview Notice/.test(text)) continue;
|
|
11238
|
+
const btn = [...dialog.querySelectorAll("button")].find((b) => {
|
|
11239
|
+
const t = (b.textContent || "").trim();
|
|
11240
|
+
return t === "\u7EE7\u7EED" || t === "Continue";
|
|
11241
|
+
});
|
|
11242
|
+
if (btn) {
|
|
11243
|
+
done = true;
|
|
11244
|
+
btn.click();
|
|
11245
|
+
observer.disconnect();
|
|
11246
|
+
}
|
|
11247
|
+
break;
|
|
11248
|
+
}
|
|
11249
|
+
};
|
|
11250
|
+
const observer = new MutationObserver(tryDismiss);
|
|
11251
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
11252
|
+
tryDismiss();
|
|
11253
|
+
const stopTimer = setTimeout(() => observer.disconnect(), 6e4);
|
|
11254
|
+
return () => {
|
|
11255
|
+
clearTimeout(stopTimer);
|
|
11256
|
+
observer.disconnect();
|
|
11257
|
+
};
|
|
11258
|
+
}, []);
|
|
11259
|
+
(0, import_react21.useEffect)(() => {
|
|
11260
|
+
if (typeof window === "undefined" || typeof document === "undefined") return void 0;
|
|
11186
11261
|
const mq = window.matchMedia ? window.matchMedia("(max-width:700px)") : null;
|
|
11187
11262
|
if (!mq) return void 0;
|
|
11188
|
-
if (
|
|
11263
|
+
if (window.__dshDockMobileDrawer === "host") return void 0;
|
|
11264
|
+
window.__dshDockMobileDrawer = "client";
|
|
11189
11265
|
const narrow = () => mq.matches;
|
|
11190
11266
|
const frameEl = () => document.querySelector('[class$="frame"]');
|
|
11191
11267
|
const sidebarCollapsed = () => {
|
|
@@ -11193,6 +11269,7 @@ function MobileRelayOverlay() {
|
|
|
11193
11269
|
return !!f && f.hasAttribute("data-sidebar-collapsed");
|
|
11194
11270
|
};
|
|
11195
11271
|
const dialogOpen = () => !!document.querySelector('[role="dialog"][class*="panel"]');
|
|
11272
|
+
const rightOpen = () => !!document.querySelector("[data-sidebar-right-panel][data-sidebar-right-open]");
|
|
11196
11273
|
const collapse = () => {
|
|
11197
11274
|
const b = document.querySelector('button[aria-label="\u6536\u8D77\u4FA7\u8FB9\u680F"],button[aria-label="Collapse sidebar"]');
|
|
11198
11275
|
if (b) b.click();
|
|
@@ -11202,28 +11279,20 @@ function MobileRelayOverlay() {
|
|
|
11202
11279
|
if (b) b.click();
|
|
11203
11280
|
};
|
|
11204
11281
|
const closeDetails = () => {
|
|
11205
|
-
const
|
|
11206
|
-
if (!
|
|
11207
|
-
const
|
|
11208
|
-
if (
|
|
11209
|
-
};
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
fab.type = "button";
|
|
11215
|
-
fab.className = "dsh-mobile-drawer-btn";
|
|
11216
|
-
fab.setAttribute("aria-label", "\u6253\u5F00\u4F1A\u8BDD\u5217\u8868");
|
|
11217
|
-
fab.innerHTML = '<svg viewBox="0 0 24 24"><path d="M4 7h16M4 12h16M4 17h10"/></svg>';
|
|
11218
|
-
fab.addEventListener("click", expand);
|
|
11219
|
-
scrim = document.createElement("div");
|
|
11220
|
-
scrim.className = "dsh-mobile-scrim";
|
|
11221
|
-
document.body.appendChild(fab);
|
|
11222
|
-
document.body.appendChild(scrim);
|
|
11223
|
-
}
|
|
11282
|
+
const panel = document.querySelector("[data-sidebar-right-panel][data-sidebar-right-open]");
|
|
11283
|
+
if (!panel) return;
|
|
11284
|
+
const toggle = panel.querySelector("[data-sidebar-right-toggle]");
|
|
11285
|
+
if (toggle) toggle.click();
|
|
11286
|
+
};
|
|
11287
|
+
const scrim = document.createElement("div");
|
|
11288
|
+
scrim.className = "dsh-mobile-scrim";
|
|
11289
|
+
document.body.appendChild(scrim);
|
|
11290
|
+
document.querySelectorAll(".dsh-mobile-tabbar").forEach((el) => el.remove());
|
|
11224
11291
|
const tabbar = document.createElement("nav");
|
|
11225
11292
|
tabbar.className = "dsh-mobile-tabbar";
|
|
11226
11293
|
tabbar.setAttribute("aria-label", "\u5E95\u90E8\u5BFC\u822A");
|
|
11294
|
+
let tasksActive = 0;
|
|
11295
|
+
let tasksWaiting = 0;
|
|
11227
11296
|
const tabDefs = [
|
|
11228
11297
|
{
|
|
11229
11298
|
id: "sessions",
|
|
@@ -11233,11 +11302,10 @@ function MobileRelayOverlay() {
|
|
|
11233
11302
|
},
|
|
11234
11303
|
{
|
|
11235
11304
|
id: "dock",
|
|
11236
|
-
label: "\
|
|
11305
|
+
label: "\u63D2\u4EF6",
|
|
11237
11306
|
icon: '<svg viewBox="0 0 24 24"><rect x="4" y="4" width="7" height="7" rx="1.5"/><rect x="13" y="4" width="7" height="7" rx="1.5"/><rect x="4" y="13" width="7" height="7" rx="1.5"/><rect x="13" y="13" width="7" height="7" rx="1.5"/></svg>',
|
|
11238
11307
|
act: () => {
|
|
11239
|
-
|
|
11240
|
-
else openPanel("home");
|
|
11308
|
+
openPanel(tasksActive > 0 || tasksWaiting > 0 ? "runstate" : "home");
|
|
11241
11309
|
}
|
|
11242
11310
|
},
|
|
11243
11311
|
{
|
|
@@ -11250,6 +11318,7 @@ function MobileRelayOverlay() {
|
|
|
11250
11318
|
}
|
|
11251
11319
|
}
|
|
11252
11320
|
];
|
|
11321
|
+
let tasksBadge = null;
|
|
11253
11322
|
const tabButtons = tabDefs.map((def) => {
|
|
11254
11323
|
const b = document.createElement("button");
|
|
11255
11324
|
b.type = "button";
|
|
@@ -11257,6 +11326,12 @@ function MobileRelayOverlay() {
|
|
|
11257
11326
|
b.dataset.tab = def.id;
|
|
11258
11327
|
b.innerHTML = def.icon + "<span>" + def.label + "</span>";
|
|
11259
11328
|
b.addEventListener("click", () => def.act());
|
|
11329
|
+
if (def.id === "dock") {
|
|
11330
|
+
tasksBadge = document.createElement("span");
|
|
11331
|
+
tasksBadge.className = "dsh-mobile-tab-badge";
|
|
11332
|
+
tasksBadge.style.display = "none";
|
|
11333
|
+
b.appendChild(tasksBadge);
|
|
11334
|
+
}
|
|
11260
11335
|
tabbar.appendChild(b);
|
|
11261
11336
|
return b;
|
|
11262
11337
|
});
|
|
@@ -11271,74 +11346,115 @@ function MobileRelayOverlay() {
|
|
|
11271
11346
|
}
|
|
11272
11347
|
};
|
|
11273
11348
|
const unsubPanel = subscribePanel(syncTabs);
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11349
|
+
let runstateGone = false;
|
|
11350
|
+
const pollTasks = () => {
|
|
11351
|
+
if (runstateGone || !tasksBadge || !narrow() || document.visibilityState === "hidden" || !tabbar.isConnected) return;
|
|
11352
|
+
fetch("/dsh-dock/runstate/status", {
|
|
11353
|
+
method: "POST",
|
|
11354
|
+
headers: { "content-type": "application/json" },
|
|
11355
|
+
body: "{}"
|
|
11356
|
+
}).then(async (res) => {
|
|
11357
|
+
if (res.status === 404 || res.status === 405) {
|
|
11358
|
+
runstateGone = true;
|
|
11359
|
+
tasksActive = 0;
|
|
11360
|
+
tasksWaiting = 0;
|
|
11361
|
+
tasksBadge.style.display = "none";
|
|
11362
|
+
return null;
|
|
11285
11363
|
}
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11364
|
+
const body = await res.json().catch(() => null);
|
|
11365
|
+
if (!body) return null;
|
|
11366
|
+
const active = body.data && body.data.active || [];
|
|
11367
|
+
const waiting = active.filter((t) => t.approvals && t.approvals.length).length;
|
|
11368
|
+
tasksActive = active.length;
|
|
11369
|
+
tasksWaiting = waiting;
|
|
11370
|
+
if (waiting > 0) {
|
|
11371
|
+
tasksBadge.textContent = String(waiting);
|
|
11372
|
+
tasksBadge.className = "dsh-mobile-tab-badge wait";
|
|
11373
|
+
tasksBadge.style.display = "";
|
|
11374
|
+
} else if (active.length > 0) {
|
|
11375
|
+
tasksBadge.textContent = String(active.length);
|
|
11376
|
+
tasksBadge.className = "dsh-mobile-tab-badge";
|
|
11377
|
+
tasksBadge.style.display = "";
|
|
11378
|
+
} else {
|
|
11379
|
+
tasksBadge.style.display = "none";
|
|
11380
|
+
}
|
|
11381
|
+
}).catch(() => {
|
|
11382
|
+
});
|
|
11383
|
+
};
|
|
11384
|
+
const tasksTimer = setInterval(pollTasks, 3e3);
|
|
11385
|
+
const vv = window.visualViewport || null;
|
|
11386
|
+
const kbdSync = () => {
|
|
11387
|
+
if (!vv) return;
|
|
11388
|
+
const kbd = vv.height > 0 && window.innerHeight - vv.height > 120;
|
|
11389
|
+
document.documentElement.classList.toggle("dsh-dock-kbd", kbd);
|
|
11289
11390
|
};
|
|
11290
11391
|
const sync = () => {
|
|
11392
|
+
kbdSync();
|
|
11393
|
+
document.querySelectorAll(".dsh-mobile-tabbar").forEach((el) => {
|
|
11394
|
+
if (el !== tabbar) el.remove();
|
|
11395
|
+
});
|
|
11291
11396
|
const on = narrow() && !!frameEl() && !dialogOpen();
|
|
11292
11397
|
const collapsed = sidebarCollapsed();
|
|
11293
|
-
|
|
11294
|
-
const showFab = on && collapsed && !panelNav.open;
|
|
11295
|
-
fab.style.display = showFab ? "" : "none";
|
|
11296
|
-
if (showFab) place();
|
|
11297
|
-
}
|
|
11398
|
+
const right = rightOpen();
|
|
11298
11399
|
if (scrim) scrim.style.display = on && !collapsed ? "" : "none";
|
|
11299
|
-
tabbar.style.display = narrow() && !!frameEl() && !panelNav.open ? "" : "none";
|
|
11400
|
+
tabbar.style.display = narrow() && !!frameEl() && !panelNav.open && !right ? "" : "none";
|
|
11300
11401
|
syncTabs();
|
|
11301
11402
|
};
|
|
11302
11403
|
sync();
|
|
11404
|
+
pollTasks();
|
|
11303
11405
|
const observer = typeof MutationObserver !== "undefined" ? new MutationObserver(sync) : null;
|
|
11304
11406
|
if (observer) observer.observe(document.documentElement, { attributes: true, attributeFilter: ["data-sidebar-collapsed"], subtree: true });
|
|
11305
11407
|
const timer = setInterval(sync, 1500);
|
|
11306
11408
|
const onMq = () => sync();
|
|
11307
11409
|
if (mq.addEventListener) mq.addEventListener("change", onMq);
|
|
11308
11410
|
else if (mq.addListener) mq.addListener(onMq);
|
|
11309
|
-
window.addEventListener("resize",
|
|
11411
|
+
window.addEventListener("resize", kbdSync);
|
|
11412
|
+
if (vv && vv.addEventListener) vv.addEventListener("resize", kbdSync);
|
|
11413
|
+
const onVisible = () => {
|
|
11414
|
+
if (document.visibilityState === "visible") pollTasks();
|
|
11415
|
+
};
|
|
11416
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
11310
11417
|
const onClick = (e) => {
|
|
11311
11418
|
if (!narrow()) return;
|
|
11312
11419
|
const t = e.target;
|
|
11313
11420
|
if (!t || !t.closest) return;
|
|
11314
|
-
if (t.closest(".dsh-mobile-
|
|
11421
|
+
if (t.closest(".dsh-mobile-tabbar")) return;
|
|
11315
11422
|
const expanded = !!document.querySelector('button[aria-label="\u6536\u8D77\u4FA7\u8FB9\u680F"],button[aria-label="Collapse sidebar"]');
|
|
11316
11423
|
const col = document.querySelector('[class*="sidebarCol"]');
|
|
11317
11424
|
const inSidebar = col && col.contains(t);
|
|
11318
11425
|
if (!expanded && !inSidebar) return;
|
|
11319
11426
|
if (inSidebar) {
|
|
11320
11427
|
const row = t.closest('[role="treeitem"]');
|
|
11321
|
-
const
|
|
11428
|
+
const rowKey = row && row.getAttribute("data-row-key") || "";
|
|
11429
|
+
const sessionRow = rowKey && rowKey.startsWith("session:") || row && !rowKey && !row.querySelector('[role="treeitem"]') && row.closest('[role="tree"]');
|
|
11322
11430
|
const fresh = t.closest('[class*="newSession"]');
|
|
11323
|
-
if (
|
|
11431
|
+
if (sessionRow || fresh) setTimeout(() => {
|
|
11324
11432
|
collapse();
|
|
11325
11433
|
closeDetails();
|
|
11326
11434
|
}, 300);
|
|
11435
|
+
else {
|
|
11436
|
+
setTimeout(() => {
|
|
11437
|
+
if (document.querySelector('[role="dialog"]')) collapse();
|
|
11438
|
+
}, 260);
|
|
11439
|
+
}
|
|
11327
11440
|
return;
|
|
11328
11441
|
}
|
|
11329
|
-
if (t.closest('[role="dialog"],[class*="dockm"],[class*="dgfab"],[class*="dgwin"],[class*="dgame"],[
|
|
11442
|
+
if (t.closest('[role="dialog"],[class*="dockm"],[class*="dgfab"],[class*="dgwin"],[class*="dgame"],[data-sidebar-right-panel]')) return;
|
|
11330
11443
|
collapse();
|
|
11331
11444
|
};
|
|
11332
|
-
|
|
11445
|
+
document.addEventListener("click", onClick, true);
|
|
11333
11446
|
return () => {
|
|
11334
|
-
|
|
11447
|
+
document.removeEventListener("click", onClick, true);
|
|
11335
11448
|
if (observer) observer.disconnect();
|
|
11336
11449
|
clearInterval(timer);
|
|
11450
|
+
clearInterval(tasksTimer);
|
|
11337
11451
|
unsubPanel();
|
|
11338
11452
|
if (mq.removeEventListener) mq.removeEventListener("change", onMq);
|
|
11339
11453
|
else if (mq.removeListener) mq.removeListener(onMq);
|
|
11340
|
-
window.removeEventListener("resize",
|
|
11341
|
-
if (
|
|
11454
|
+
window.removeEventListener("resize", kbdSync);
|
|
11455
|
+
if (vv && vv.removeEventListener) vv.removeEventListener("resize", kbdSync);
|
|
11456
|
+
document.removeEventListener("visibilitychange", onVisible);
|
|
11457
|
+
document.documentElement.classList.remove("dsh-dock-kbd");
|
|
11342
11458
|
if (scrim) scrim.remove();
|
|
11343
11459
|
tabbar.remove();
|
|
11344
11460
|
if (window.__dshDockMobileDrawer === "client") delete window.__dshDockMobileDrawer;
|
|
@@ -11349,10 +11465,16 @@ function MobileRelayOverlay() {
|
|
|
11349
11465
|
function MobileRelayHomeStat() {
|
|
11350
11466
|
const [summary, setSummary] = (0, import_react21.useState)("\u672A\u5F00\u542F\uFF0C\u5F00\u542F\u540E\u53EF\u8FDC\u7A0B\u767B\u5F55");
|
|
11351
11467
|
(0, import_react21.useEffect)(() => {
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11468
|
+
const refresh = () => {
|
|
11469
|
+
rpc("lan").then((data) => {
|
|
11470
|
+
const devices = typeof data.devices === "number" && data.devices > 0 ? " \xB7 " + data.devices + " \u53F0\u8BBE\u5907\u5728\u7EBF" : "";
|
|
11471
|
+
setSummary(data.gatewayActive ? "\u5165\u53E3\u8FD0\u884C\u4E2D \xB7 \u7AEF\u53E3 " + data.gatewayPort + devices : data.accountSet ? "\u8D26\u53F7\u5DF2\u8BBE\u7F6E\uFF0C\u5165\u53E3\u672A\u5F00\u542F" : "\u672A\u5F00\u542F\uFF0C\u5F00\u542F\u540E\u53EF\u8FDC\u7A0B\u767B\u5F55");
|
|
11472
|
+
}).catch(() => {
|
|
11473
|
+
});
|
|
11474
|
+
};
|
|
11475
|
+
refresh();
|
|
11476
|
+
const timer = setInterval(refresh, 1e4);
|
|
11477
|
+
return () => clearInterval(timer);
|
|
11356
11478
|
}, []);
|
|
11357
11479
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: summary });
|
|
11358
11480
|
}
|
|
@@ -11365,9 +11487,9 @@ var feature10 = {
|
|
|
11365
11487
|
defaultEnabled: false,
|
|
11366
11488
|
css: `
|
|
11367
11489
|
.dmr{--dmr-accent:var(--dk-accent,#2f6fed);--dmr-accent-soft:color-mix(in srgb,var(--dmr-accent) 13%,transparent);display:flex;flex-direction:column;gap:16px;max-width:720px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.5}.dmr h3,.dmr h4,.dmr p{margin:0}.dmr h3{font-size:17px;line-height:1.25;letter-spacing:-.01em}.dmr h4{font-size:13px}.dmr-hero,.dmr-status-head{display:flex;align-items:flex-start;gap:12px}.dmr-hero>div,.dmr-status-head>div{min-width:0;display:flex;flex-direction:column;gap:4px}.dmr-hero p,.dmr-status-head p,.dmr-field small,.dmr-share small,.dmr-overview-card small,.dmr-task small,.dmr-note p{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.55}.dmr-hero-icon{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:14px;background:var(--dmr-accent-soft);color:var(--dmr-accent);border:1px solid color-mix(in srgb,var(--dmr-accent) 35%,var(--dsw-alias-border-l1))}.dmr-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0;padding:0;list-style:none}.dmr-steps li{display:flex;gap:9px;padding:11px;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px}.dmr-steps li>span{width:21px;height:21px;display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:50%;font-size:11px;font-weight:700;color:var(--dmr-accent);background:var(--dmr-accent-soft)}.dmr-steps div{display:flex;flex-direction:column;gap:3px;min-width:0}.dmr-steps strong{font-size:12px}.dmr-steps small{font-size:11px;color:var(--dsw-alias-label-secondary);line-height:1.45}.dmr-field{display:flex;flex-direction:column;gap:6px;font-weight:600}.dmr-field input,.dmr-field select,.dmr-note textarea{box-sizing:border-box;width:100%;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:10px;padding:10px 12px;min-height:44px;font:inherit;outline:none;transition:border-color .18s ease,box-shadow .18s ease}.dmr-field input:focus,.dmr-field select:focus,.dmr-note textarea:focus{border-color:var(--dmr-accent);box-shadow:0 0 0 3px var(--dmr-accent-soft)}.dmr-field small{font-weight:400}.dmr-network-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(150px,.6fr);gap:12px}.dmr-security{padding:12px 13px;border:1px solid color-mix(in srgb,var(--dk-warn) 48%,var(--dsw-alias-border-l1));border-radius:12px;background:color-mix(in srgb,var(--dk-warn) 9%,transparent)}.dmr-security strong{display:block;margin-bottom:4px;color:var(--dk-warn);font-size:12px}.dmr-security p{font-size:12px;color:var(--dsw-alias-label-secondary);line-height:1.55}.dmr-primary,.dmr-secondary,.dmr-text-button,.dmr-icon-button{font:inherit;touch-action:manipulation;cursor:pointer;transition:transform .15s ease,background .18s ease,border-color .18s ease,opacity .18s ease}.dmr-primary,.dmr-secondary{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;padding:9px 13px;font-weight:600}.dmr-primary{align-self:flex-start;border:1px solid var(--dmr-accent);background:var(--dmr-accent);color:#fff}.dmr-primary:hover{filter:brightness(1.05)}.dmr-secondary{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.dmr-secondary:hover{border-color:var(--dmr-accent);background:var(--dmr-accent-soft)}.dmr-primary:active,.dmr-secondary:active,.dmr-icon-button:active{transform:scale(.98)}.dmr-primary:disabled,.dmr-secondary:disabled,.dmr-text-button:disabled,.dmr-icon-button:disabled{cursor:not-allowed;opacity:.5}.dmr-message{display:flex;align-items:flex-start;gap:7px;padding:10px 12px;border-radius:10px;font-size:12px}.dmr-message.success{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb,var(--dsw-alias-state-success-primary) 10%,transparent)}.dmr-message.error{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 10%,transparent)}.dmr-status-head{justify-content:space-between}.dmr-eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--dmr-accent)}.dmr-eyebrow i{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px var(--dmr-accent-soft)}.dmr-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:transparent;color:var(--dsw-alias-label-secondary)}.dmr-icon-button:hover{color:var(--dsw-alias-state-error-primary);border-color:currentColor}.dmr-share{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid color-mix(in srgb,var(--dmr-accent) 32%,var(--dsw-alias-border-l1));border-radius:13px;background:var(--dmr-accent-soft)}.dmr-share-layout{display:grid;grid-template-columns:196px minmax(0,1fr);gap:16px;align-items:center}.dmr-qr-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px;border-radius:12px;background:#fff;color:#111827;text-align:center}.dmr-qr-card img{display:block;width:176px;height:176px;max-width:100%;object-fit:contain}.dmr-qr-card strong{font-size:12px}.dmr-qr-card small{color:#4b5563;font-size:10px}.dmr-qr-loading{display:grid;place-items:center;width:176px;height:176px;color:#64748b;font-size:12px}.dmr-share-detail{min-width:0;display:flex;flex-direction:column;gap:10px}.dmr-share-detail>div:first-child{display:flex;flex-direction:column;gap:4px}.dmr-link{padding:10px 11px;border-radius:8px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all;color:var(--dsw-alias-label-secondary)}.dmr-share-actions{display:flex;gap:8px;flex-wrap:wrap}.dmr-share-actions .dmr-primary{align-self:auto}.dmr-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dmr-overview-card{display:flex;flex-direction:column;gap:3px;padding:12px;border:1px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-bg-layer-1)}.dmr-overview-card>span{font-size:11px;color:var(--dsw-alias-label-tertiary)}.dmr-overview-card strong{font-size:16px;letter-spacing:-.01em}.dmr-section{display:flex;flex-direction:column;gap:9px}.dmr-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.dmr-section-head small{font-size:11px;color:var(--dsw-alias-label-tertiary)}.dmr-text-button{border:0;background:transparent;color:var(--dmr-accent);padding:8px;min-height:36px;font-weight:600}.dmr-task-list{display:flex;flex-direction:column;gap:8px}.dmr-task{display:flex;align-items:flex-start;gap:9px;padding:10px 11px;border:1px solid var(--dsw-alias-border-l1);border-radius:10px;background:var(--dsw-alias-bg-layer-1)}.dmr-task>div{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.dmr-task strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dmr-phase{flex:none;border-radius:999px;padding:3px 8px;font-size:11px;background:var(--dmr-accent-soft);color:var(--dmr-accent)}.dmr-phase.write{color:var(--dsw-alias-state-success-primary)}.dmr-phase.code{color:var(--dk-warn)}.dmr-phase.search{color:#0d9488}.dmr-empty{padding:18px 12px;text-align:center;border:1px dashed var(--dsw-alias-border-l2);border-radius:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dmr-note{display:flex;flex-direction:column;gap:9px;padding-top:2px}.dmr-note blockquote{margin:0;padding:10px 12px;border-left:3px solid var(--dmr-accent);border-radius:0 9px 9px 0;background:var(--dmr-accent-soft);white-space:pre-wrap;font-size:12px}.dmr-note textarea{min-height:88px;resize:vertical;line-height:1.5}.dmr-note .dmr-secondary{align-self:flex-start}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (max-width:680px){.dmr{gap:14px;font-size:14px}.dmr h3{font-size:18px}.dmr-steps{grid-template-columns:1fr;gap:8px}.dmr-steps li{padding:10px}.dmr-steps small,.dmr-hero p,.dmr-status-head p,.dmr-field small,.dmr-share small,.dmr-overview-card small,.dmr-task small,.dmr-note p{font-size:12px}.dmr-network-grid{grid-template-columns:1fr;gap:10px}.dmr-field input,.dmr-field select{font-size:16px}.dmr-primary,.dmr-secondary{width:100%;font-size:14px}.dmr-share-layout{grid-template-columns:1fr;gap:12px}.dmr-qr-card{width:min(240px,100%);margin:0 auto}.dmr-qr-card img,.dmr-qr-loading{width:210px;height:210px}.dmr-share-actions{flex-direction:column}.dmr-share-actions .dmr-primary{width:100%}.dmr-overview{gap:8px}.dmr-overview-card{padding:11px}.dmr-status-head{gap:8px}.dmr-link{font-size:11px}.dmr-note textarea{font-size:16px;min-height:104px}.dmr-note .dmr-secondary{align-self:stretch}.dmr-compact .dmr-hero-icon{width:40px;height:40px;border-radius:13px}}@media (prefers-reduced-motion:reduce){.dmr-primary,.dmr-secondary,.dmr-text-button,.dmr-icon-button,.dmr-field input,.dmr-field select,.dmr-note textarea{transition:none}}.dmr-lan{flex:none;margin-top:6px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l1)}.dmr-lan-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dmr-lan-title{min-width:0;display:flex;flex-direction:column;gap:4px}.dmr-lan-title p{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.55}.dmr-lan-badge{flex:none;display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:700;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary)}.dmr-lan-badge.on{border-color:color-mix(in srgb,var(--dmr-accent) 45%,transparent);background:var(--dmr-accent-soft);color:var(--dmr-accent)}.dmr-lan-active,.dmr-lan-idle{display:flex;flex-direction:column;gap:12px}.dmr-lan-active .dmr-share-detail small strong{color:var(--dsw-alias-state-error-primary)}.dmr-danger{border-color:color-mix(in srgb,var(--dsw-alias-state-error-primary) 45%,var(--dsw-alias-border-l2));color:var(--dsw-alias-state-error-primary)}.dmr-danger:hover{border-color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 10%,transparent)}
|
|
11368
|
-
/* \u62BD\u5C49\
|
|
11369
|
-
*
|
|
11370
|
-
@media (max-width:700px){.dsh-mobile-
|
|
11490
|
+
/* \u62BD\u5C49\u906E\u7F69\uFF1A\u4FA7\u680F\u6D6E\u5C42\u5C55\u5F00\u65F6\u76D6\u4F4F\u9875\u9762\u3002\u5DE6\u7F18\u6D6E\u52A8\u300C\u62BD\u5C49\u628A\u624B\u300D\u5DF2\u79FB\u9664\u2014\u2014\u4F1A\u8BDD\u5165\u53E3
|
|
11491
|
+
* \u7EDF\u4E00\u8D70\u5E95\u90E8 Tab \u680F\u300C\u4F1A\u8BDD\u300D\u9875\u7B7E\uFF0C\u628A\u624B\u60AC\u6D6E\u5728\u5185\u5BB9\u4E0A\u8FD8\u538B\u8FC7\u8F93\u5165\u533A\uFF08\u7528\u6237\u5B9E\u6D4B\uFF09\u3002 */
|
|
11492
|
+
@media (max-width:700px){.dsh-mobile-scrim{position:fixed;inset:0;z-index:75;background:rgba(8,10,14,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);touch-action:none}
|
|
11371
11493
|
/* ---- \u4EFF ZCode \u624B\u673A\u7AEF\uFF1A\u5E95\u90E8 Tab \u680F + \u8F93\u5165\u533A\u5438\u9644\u5E95\u90E8 ---- */
|
|
11372
11494
|
.dsh-mobile-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:65;display:flex;align-items:stretch;justify-content:space-around;padding:6px 8px calc(8px + env(safe-area-inset-bottom,0px));background:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#1c2230) 92%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--dsw-alias-border-l1,rgba(127,139,161,.25));touch-action:manipulation}
|
|
11373
11495
|
.dsh-mobile-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;padding:4px 0;border:0;background:transparent;color:var(--dsw-alias-label-tertiary,#8b95ab);font:600 11px/1.2 inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:10px}
|
|
@@ -11375,25 +11497,335 @@ var feature10 = {
|
|
|
11375
11497
|
.dsh-mobile-tab.on{color:var(--dsw-alias-label-primary,#e6eaf2)}
|
|
11376
11498
|
.dsh-mobile-tab.on svg{color:var(--dk-accent,#4d9fff)}
|
|
11377
11499
|
.dsh-mobile-tab:active{transform:scale(.94)}
|
|
11500
|
+
/* \u300C\u4EFB\u52A1\u300D\u9875\u7B7E\u89D2\u6807\uFF1A\u8FDB\u884C\u4E2D=\u84DD\uFF08\u6570\u91CF\uFF09\uFF0C\u7B49\u5F85\u786E\u8BA4=\u7EA2\uFF08\u6570\u91CF+\u8109\u51B2\uFF09\u2014\u2014\u63A5\u529B\u573A\u666F\u91CC
|
|
11501
|
+
* \u7B49\u5F85\u786E\u8BA4\u662F\u6700\u9700\u8981\u4EBA\u4ECB\u5165\u7684\u72B6\u6001\uFF0C\u4E00\u773C\u53EF\u89C1\uFF1B\u6570\u636E\u6765\u81EA runstate \u5BBF\u4E3B\u8DEF\u7531\u4F4E\u9891\u8F6E\u8BE2\u3002 */
|
|
11502
|
+
.dsh-mobile-tab{position:relative}
|
|
11503
|
+
.dsh-mobile-tab-badge{position:absolute;top:0;right:calc(50% - 26px);box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#4d9fff;color:#fff;font-size:10px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;box-shadow:0 2px 8px rgba(0,0,0,.35);pointer-events:none}
|
|
11504
|
+
.dsh-mobile-tab-badge.wait{background:#ef4444;animation:dsh-badge-pulse 1.2s ease-in-out infinite}
|
|
11505
|
+
@keyframes dsh-badge-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
|
|
11506
|
+
@media (prefers-reduced-motion:reduce){.dsh-mobile-tab-badge.wait{animation:none}}
|
|
11378
11507
|
/* \u8F93\u5165\u533A\u5438\u9644\u5230 Tab \u680F\u4E0A\u65B9\uFF1A\u5BBF\u4E3B\u628A\u6B22\u8FCE\u5185\u5BB9 justify-content:center \u5782\u76F4\u5C45\u4E2D\uFF0C
|
|
11379
|
-
* \u624B\u673A\u89C6\u53E3\u4E0B\u8F93\u5165\u5361\u7247\u60AC\u5728\u4E2D\u90E8\u3001\u4E0B\u65B9\u7559\u51FA\u5927\u7247\u7A7A\u767D\u3002\u6539\
|
|
11380
|
-
* \u6EDA\u52A8\u4F53\u7559\u51FA Tab \u680F\u9AD8\u5EA6\u7684\u5185\u8FB9\u8DDD\uFF0C\u907F\u514D\u5185\u5BB9\u88AB Tab \u680F\u906E\u6321\u3002
|
|
11381
|
-
|
|
11382
|
-
|
|
11508
|
+
* \u624B\u673A\u89C6\u53E3\u4E0B\u8F93\u5165\u5361\u7247\u60AC\u5728\u4E2D\u90E8\u3001\u4E0B\u65B9\u7559\u51FA\u5927\u7247\u7A7A\u767D\u3002\u6539\u7528\u300C\u8F93\u5165\u533A margin-top:auto\u300D
|
|
11509
|
+
* \u8D34\u5E95\uFF0C\u5E76\u7ED9\u6EDA\u52A8\u4F53\u7559\u51FA Tab \u680F\u9AD8\u5EA6\u7684\u5185\u8FB9\u8DDD\uFF0C\u907F\u514D\u5185\u5BB9\u88AB Tab \u680F\u906E\u6321\u3002
|
|
11510
|
+
* \u26A0\uFE0F \u7EDD\u4E0D\u80FD\u7ED9\u6EDA\u52A8\u4F53\u52A0 justify-content:flex-end/center \u8D34\u5E95\uFF1A\u5185\u5BB9\u4F1A\u88AB\u6324\u5230\u6EDA\u52A8\u4F53
|
|
11511
|
+
* \u8D77\u70B9\u4E4B\u5916\uFF0CChrome \u4E0D\u628A\u8D77\u70B9\u65B9\u5411\u6EA2\u51FA\u7B97\u8FDB scrollHeight\uFF08\u624B\u673A\u89C6\u53E3\u5B9E\u6D4B
|
|
11512
|
+
* scrollHeight==clientHeight\u3001maxScroll==0\uFF09\uFF0C\u4F1A\u8BDD\u8BB0\u5F55\u5F7B\u5E95\u6EDA\u4E0D\u52A8\u3001\u9996\u6761\u6D88\u606F\u6C38\u8FDC
|
|
11513
|
+
* \u770B\u4E0D\u5230\u3002\u5BBF\u4E3B\u534A\u90E8\u65E7\u7248\u6CE8\u5165\u91CC\u8FD8\u7559\u7740\u90A3\u6761 flex-end\uFF08\u8981\u91CD\u542F dsh web \u624D\u6D88\u5931\uFF09\uFF0C\u8FD9\u91CC
|
|
11514
|
+
* \u7528\u66F4\u9AD8\u4F18\u5148\u7EA7\u7684\u9009\u62E9\u5668\u663E\u5F0F\u590D\u4F4D\uFF1A\u5237\u65B0\u9875\u9762\u5373\u4FEE\u597D\uFF0C\u4E0D\u5FC5\u7B49\u91CD\u542F\u3002 */
|
|
11515
|
+
[class*="scrollBody"][data-conversation-scroll]{justify-content:flex-start !important;padding-bottom:calc(72px + env(safe-area-inset-bottom,0px)) !important}
|
|
11516
|
+
[class*="scrollBody"]{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px)) !important}
|
|
11517
|
+
[class*="scrollBody"]>[class*="composerSeat"]{margin-top:auto;padding-bottom:6px}
|
|
11518
|
+
/* \u8F93\u5165\u533A\u5DE5\u5177\u884C\u4E0A\u7684 dsh-dock chip\uFF08\u7528\u91CF/\u4F59\u989D\uFF09\uFF1A\u7A84\u5C4F\u4E0B 28cqw \u7684\u5BBD\u5EA6\u4E0A\u9650\u628A\u5B83\u4EEC\u6324\u6210
|
|
11519
|
+
* \u300C\u2026\u300D\u300C\u4F59..\u300D\uFF08\u624B\u673A\u5B9E\u6D4B\uFF09\uFF0C\u65E2\u8BFB\u4E0D\u51FA\u6570\u503C\u53C8\u767D\u5360\u8F93\u5165\u884C\u7A7A\u95F4\u3002\u624B\u673A\u7AEF\u6574\u7EC4\u6536\u8D77\uFF0C\u6570\u503C\u5728
|
|
11520
|
+
* \u5E95\u90E8\u300C\u529F\u80FD\u575E\u300D\u91CC\u770B\uFF08\u7528\u91CF/\u4F59\u989D\u9875\u4FE1\u606F\u66F4\u5168\uFF09\uFF1B\u684C\u9762\u7AEF\u4E0D\u52A8\u3002 */
|
|
11521
|
+
.dockchip-row{display:none}
|
|
11383
11522
|
/* \u6536\u8D77\u7684\u4FA7\u680F\u8F68\u9053\uFF08collapsed rail\uFF09\u5728\u7A84\u5C4F\u53EA\u5269 1px \u5360\u4F4D\uFF0C\u4F46\u8F68\u9053\u91CC\u7684\u6309\u94AE
|
|
11384
11523
|
* \u4ECD\u4F1A\u6EA2\u51FA\u8D34\u5728\u5DE6\u8FB9\u7F18\uFF08\u529F\u80FD\u575E/\u8FDB\u5316/\u8BBE\u7F6E\u4E09\u679A\u9732\u51FA\u534A\u8FB9\u7684\u5706\u94AE\uFF09\u3002\u9690\u85CF\u6574\u5217\uFF0C
|
|
11385
11524
|
* \u8FD9\u4E9B\u5165\u53E3\u5DF2\u7531\u5E95\u90E8 Tab \u680F\u63A5\u7BA1\uFF1B\u5C55\u5F00\u62BD\u5C49\uFF08z 80\uFF09\u4E0D\u53D7\u5F71\u54CD\u3002 */
|
|
11386
11525
|
[class*="sidebarCol"]:has([class*="collapsed"]){visibility:hidden}
|
|
11387
|
-
/* \
|
|
11388
|
-
|
|
11526
|
+
/* \u8F6F\u952E\u76D8\u5F39\u51FA\uFF08visualViewport \u5224\u5B9A\uFF0C\u6302 html.dsh-dock-kbd\uFF09\uFF1ATab \u680F\u6574\u4F53\u8BA9\u4F4D\uFF08\u6253\u5B57\u65F6
|
|
11527
|
+
* \u5B83\u53EA\u4F1A\u6324\u5360\u952E\u76D8\u4E0A\u65B9\u7684\u4E00\u7EBF\u7A7A\u95F4\uFF09\uFF0C\u6EDA\u52A8\u4F53\u7559\u767D\u6536\u7A84\u3002\u9009\u62E9\u5668\u7279\u5F02\u6027\u9AD8\u4E8E\u4E0A\u9762\u7684 72px
|
|
11528
|
+
* \u7559\u767D\u89C4\u5219\uFF0C\u80FD\u538B\u8FC7\u53BB\u3002\u5BBF\u4E3B\u63A5\u7BA1\u671F\u95F4\u7531\u5BBF\u4E3B\u811A\u672C\u540C\u6B65\u7F6E/\u6458\u8FD9\u4E2A\u7C7B\u3002 */
|
|
11529
|
+
html.dsh-dock-kbd .dsh-mobile-tabbar{display:none !important}
|
|
11530
|
+
html.dsh-dock-kbd [class*="scrollBody"]{padding-bottom:12px !important}
|
|
11531
|
+
/* \u529F\u80FD\u575E\u9762\u677F\u5728\u624B\u673A\u7AEF\u62AC\u5230\u539F\u751F\u5F39\u5C42\u4E4B\u4E0A\uFF1A\u4ECE\u4FA7\u680F\u8FDB\u7684\u5B98\u65B9\u63D2\u4EF6\u7BA1\u7406\u9875\u7B49\u539F\u751F\u5F39\u5C42 z \u5E8F\u9AD8\u4E8E
|
|
11532
|
+
* \u9762\u677F\u9ED8\u8BA4\u7684 200\uFF0C\u529F\u80FD\u575E\u5F00\u5728\u4E0B\u9762\u4F1A\u88AB\u76D6\u4F4F\u2014\u2014\u300C\u63D2\u4EF6\u300D\u9875\u7B7E\u70B9\u4E86\u50CF\u6CA1\u53CD\u5E94/\u9732\u51FA\u539F\u9875\u9762\u3002 */
|
|
11533
|
+
[class*="dockm-backdrop"]{z-index:2000 !important}}`,
|
|
11389
11534
|
View: MobileRelayView,
|
|
11390
11535
|
HomeStat: MobileRelayHomeStat,
|
|
11391
11536
|
Overlay: MobileRelayOverlay
|
|
11392
11537
|
};
|
|
11393
11538
|
|
|
11539
|
+
// features/mobile/view.js
|
|
11540
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
11541
|
+
var import_react23 = require("react");
|
|
11542
|
+
var MOBILE_QUERY_NARROW = "(max-width: 820px)";
|
|
11543
|
+
var MOBILE_QUERY_COARSE = "(pointer: coarse) and (hover: none)";
|
|
11544
|
+
var MOBILE_STORE_KEY = "dsh-dock/mobile/v1";
|
|
11545
|
+
var mobilePref = { floating: true };
|
|
11546
|
+
try {
|
|
11547
|
+
if (typeof localStorage !== "undefined") {
|
|
11548
|
+
const raw = localStorage.getItem(MOBILE_STORE_KEY);
|
|
11549
|
+
const obj = raw ? JSON.parse(raw) : null;
|
|
11550
|
+
if (obj && typeof obj === "object" && typeof obj.floating === "boolean") mobilePref.floating = obj.floating;
|
|
11551
|
+
}
|
|
11552
|
+
} catch {
|
|
11553
|
+
}
|
|
11554
|
+
var prefListeners = /* @__PURE__ */ new Set();
|
|
11555
|
+
function notifyPref() {
|
|
11556
|
+
for (const fn of prefListeners) {
|
|
11557
|
+
try {
|
|
11558
|
+
fn();
|
|
11559
|
+
} catch {
|
|
11560
|
+
}
|
|
11561
|
+
}
|
|
11562
|
+
}
|
|
11563
|
+
function floatingShown() {
|
|
11564
|
+
return mobilePref.floating !== false;
|
|
11565
|
+
}
|
|
11566
|
+
function setFloatingShown(value) {
|
|
11567
|
+
mobilePref.floating = value !== false;
|
|
11568
|
+
try {
|
|
11569
|
+
if (typeof localStorage !== "undefined") localStorage.setItem(MOBILE_STORE_KEY, JSON.stringify(mobilePref));
|
|
11570
|
+
} catch {
|
|
11571
|
+
}
|
|
11572
|
+
notifyPref();
|
|
11573
|
+
}
|
|
11574
|
+
function subscribePref(fn) {
|
|
11575
|
+
prefListeners.add(fn);
|
|
11576
|
+
return () => {
|
|
11577
|
+
prefListeners.delete(fn);
|
|
11578
|
+
};
|
|
11579
|
+
}
|
|
11580
|
+
function mobileActive() {
|
|
11581
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
11582
|
+
try {
|
|
11583
|
+
return window.matchMedia(MOBILE_QUERY_NARROW).matches || window.matchMedia(MOBILE_QUERY_COARSE).matches;
|
|
11584
|
+
} catch {
|
|
11585
|
+
return false;
|
|
11586
|
+
}
|
|
11587
|
+
}
|
|
11588
|
+
function MobileOverlay(props) {
|
|
11589
|
+
const ctx = props && props.ctx;
|
|
11590
|
+
const [active, setActive] = (0, import_react23.useState)(() => mobileActive());
|
|
11591
|
+
const [floating, setFloating] = (0, import_react23.useState)(() => floatingShown());
|
|
11592
|
+
(0, import_react23.useEffect)(() => {
|
|
11593
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return void 0;
|
|
11594
|
+
let mqs = [];
|
|
11595
|
+
try {
|
|
11596
|
+
mqs = [window.matchMedia(MOBILE_QUERY_NARROW), window.matchMedia(MOBILE_QUERY_COARSE)];
|
|
11597
|
+
} catch {
|
|
11598
|
+
return void 0;
|
|
11599
|
+
}
|
|
11600
|
+
const update = () => setActive(mqs.some((mq) => mq.matches));
|
|
11601
|
+
update();
|
|
11602
|
+
for (const mq of mqs) {
|
|
11603
|
+
if (typeof mq.addEventListener === "function") mq.addEventListener("change", update);
|
|
11604
|
+
else if (typeof mq.addListener === "function") mq.addListener(update);
|
|
11605
|
+
}
|
|
11606
|
+
return () => {
|
|
11607
|
+
for (const mq of mqs) {
|
|
11608
|
+
if (typeof mq.removeEventListener === "function") mq.removeEventListener("change", update);
|
|
11609
|
+
else if (typeof mq.removeListener === "function") mq.removeListener(update);
|
|
11610
|
+
}
|
|
11611
|
+
};
|
|
11612
|
+
}, []);
|
|
11613
|
+
(0, import_react23.useEffect)(() => {
|
|
11614
|
+
if (typeof document === "undefined") return void 0;
|
|
11615
|
+
if (active) {
|
|
11616
|
+
document.body.setAttribute("data-dk-mobile", "1");
|
|
11617
|
+
try {
|
|
11618
|
+
const meta = document.querySelector('meta[name="viewport"]');
|
|
11619
|
+
if (meta && !/(^|,)\s*viewport-fit\s*=/.test(meta.content || "")) {
|
|
11620
|
+
meta.setAttribute("content", (meta.content || "width=device-width, initial-scale=1") + ", viewport-fit=cover");
|
|
11621
|
+
}
|
|
11622
|
+
} catch {
|
|
11623
|
+
}
|
|
11624
|
+
} else {
|
|
11625
|
+
document.body.removeAttribute("data-dk-mobile");
|
|
11626
|
+
}
|
|
11627
|
+
return () => {
|
|
11628
|
+
document.body.removeAttribute("data-dk-mobile");
|
|
11629
|
+
};
|
|
11630
|
+
}, [active]);
|
|
11631
|
+
(0, import_react23.useEffect)(() => subscribePref(() => setFloating(floatingShown())), []);
|
|
11632
|
+
const [relayBand, setRelayBand] = (0, import_react23.useState)(() => {
|
|
11633
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
11634
|
+
try {
|
|
11635
|
+
return window.matchMedia("(max-width: 700px)").matches;
|
|
11636
|
+
} catch {
|
|
11637
|
+
return false;
|
|
11638
|
+
}
|
|
11639
|
+
});
|
|
11640
|
+
(0, import_react23.useEffect)(() => {
|
|
11641
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return void 0;
|
|
11642
|
+
let mq = null;
|
|
11643
|
+
try {
|
|
11644
|
+
mq = window.matchMedia("(max-width: 700px)");
|
|
11645
|
+
} catch {
|
|
11646
|
+
return void 0;
|
|
11647
|
+
}
|
|
11648
|
+
const update = () => setRelayBand(mq.matches);
|
|
11649
|
+
update();
|
|
11650
|
+
if (typeof mq.addEventListener === "function") mq.addEventListener("change", update);
|
|
11651
|
+
else if (typeof mq.addListener === "function") mq.addListener(update);
|
|
11652
|
+
return () => {
|
|
11653
|
+
if (typeof mq.removeEventListener === "function") mq.removeEventListener("change", update);
|
|
11654
|
+
else if (typeof mq.removeListener === "function") mq.removeListener(update);
|
|
11655
|
+
};
|
|
11656
|
+
}, []);
|
|
11657
|
+
if (!active || !floating) return null;
|
|
11658
|
+
const relayChromeActive = typeof window !== "undefined" && window.__dshDockMobileDrawer != null && relayBand;
|
|
11659
|
+
if (relayChromeActive) return null;
|
|
11660
|
+
const onToggle = () => {
|
|
11661
|
+
try {
|
|
11662
|
+
const layout = ctx && ctx.get ? ctx.get("layout") : null;
|
|
11663
|
+
if (layout && typeof layout.toggleSidebar === "function") layout.toggleSidebar();
|
|
11664
|
+
else console.warn("[dsh-dock] \u624B\u673A\u9002\u914D\uFF1Actx.layout.toggleSidebar \u4E0D\u53EF\u7528\uFF08dsh \u7248\u672C\u8FC7\u65E7\uFF1F\uFF09");
|
|
11665
|
+
} catch (err) {
|
|
11666
|
+
console.error("[dsh-dock] \u624B\u673A\u9002\u914D\uFF1A\u5207\u6362\u4FA7\u680F\u5931\u8D25\uFF1A", err);
|
|
11667
|
+
}
|
|
11668
|
+
};
|
|
11669
|
+
return import_react22.default.createElement("button", {
|
|
11670
|
+
type: "button",
|
|
11671
|
+
className: "dkmob-fab",
|
|
11672
|
+
"aria-label": "\u5F00\u5173\u4FA7\u680F",
|
|
11673
|
+
title: "\u5F00\u5173\u4FA7\u680F",
|
|
11674
|
+
onClick: onToggle
|
|
11675
|
+
}, import_react22.default.createElement(
|
|
11676
|
+
"svg",
|
|
11677
|
+
{ width: 20, height: 20, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.3, "aria-hidden": true },
|
|
11678
|
+
import_react22.default.createElement("rect", { x: 1.5, y: 2.5, width: 13, height: 11, rx: 2 }),
|
|
11679
|
+
import_react22.default.createElement("line", { x1: 6, y1: 2.5, x2: 6, y2: 13.5 })
|
|
11680
|
+
));
|
|
11681
|
+
}
|
|
11682
|
+
function useViewportSize() {
|
|
11683
|
+
const [size, setSize] = (0, import_react23.useState)(() => typeof window === "undefined" ? null : { w: window.innerWidth, h: window.innerHeight });
|
|
11684
|
+
(0, import_react23.useEffect)(() => {
|
|
11685
|
+
if (typeof window === "undefined") return void 0;
|
|
11686
|
+
const update = () => setSize({ w: window.innerWidth, h: window.innerHeight });
|
|
11687
|
+
window.addEventListener("resize", update);
|
|
11688
|
+
return () => window.removeEventListener("resize", update);
|
|
11689
|
+
}, []);
|
|
11690
|
+
return size;
|
|
11691
|
+
}
|
|
11692
|
+
function MobileView() {
|
|
11693
|
+
const [active, setActive] = (0, import_react23.useState)(() => mobileActive());
|
|
11694
|
+
const [floating, setFloating] = (0, import_react23.useState)(() => floatingShown());
|
|
11695
|
+
const size = useViewportSize();
|
|
11696
|
+
(0, import_react23.useEffect)(() => {
|
|
11697
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return void 0;
|
|
11698
|
+
let mqs = [];
|
|
11699
|
+
try {
|
|
11700
|
+
mqs = [window.matchMedia(MOBILE_QUERY_NARROW), window.matchMedia(MOBILE_QUERY_COARSE)];
|
|
11701
|
+
} catch {
|
|
11702
|
+
return void 0;
|
|
11703
|
+
}
|
|
11704
|
+
const update = () => setActive(mqs.some((mq) => mq.matches));
|
|
11705
|
+
update();
|
|
11706
|
+
for (const mq of mqs) {
|
|
11707
|
+
if (typeof mq.addEventListener === "function") mq.addEventListener("change", update);
|
|
11708
|
+
else if (typeof mq.addListener === "function") mq.addListener(update);
|
|
11709
|
+
}
|
|
11710
|
+
return () => {
|
|
11711
|
+
for (const mq of mqs) {
|
|
11712
|
+
if (typeof mq.removeEventListener === "function") mq.removeEventListener("change", update);
|
|
11713
|
+
else if (typeof mq.removeListener === "function") mq.removeListener(update);
|
|
11714
|
+
}
|
|
11715
|
+
};
|
|
11716
|
+
}, []);
|
|
11717
|
+
return import_react22.default.createElement(
|
|
11718
|
+
"div",
|
|
11719
|
+
{ className: "dkmob-root" },
|
|
11720
|
+
import_react22.default.createElement(
|
|
11721
|
+
"div",
|
|
11722
|
+
{ className: "dkmob-row" },
|
|
11723
|
+
import_react22.default.createElement("span", { className: "dkmob-label" }, "\u624B\u673A\u6A21\u5F0F"),
|
|
11724
|
+
import_react22.default.createElement("span", { className: "dkmob-state" + (active ? " on" : "") }, active ? "\u5DF2\u547D\u4E2D" : "\u672A\u547D\u4E2D"),
|
|
11725
|
+
import_react22.default.createElement(
|
|
11726
|
+
"span",
|
|
11727
|
+
{ className: "dkmob-dim" },
|
|
11728
|
+
size ? size.w + "\xD7" + size.h + "px" : "",
|
|
11729
|
+
"\uFF08\u2264820px \u5BBD\uFF0C\u6216\u4E3B\u6307\u9488\u4E3A\u89E6\u5C4F\u65E0\u60AC\u505C\u65F6\u547D\u4E2D\uFF1B\u684C\u9762\u628A\u7A97\u53E3\u62D6\u7A84\u4E5F\u4F1A\u547D\u4E2D\uFF0C\u65B9\u4FBF\u8C03\u8BD5\uFF09"
|
|
11730
|
+
)
|
|
11731
|
+
),
|
|
11732
|
+
import_react22.default.createElement(
|
|
11733
|
+
"div",
|
|
11734
|
+
{ className: "dkmob-row" },
|
|
11735
|
+
import_react22.default.createElement("span", { className: "dkmob-label" }, "\u6D6E\u52A8\u4FA7\u680F\u6309\u94AE"),
|
|
11736
|
+
import_react22.default.createElement("button", {
|
|
11737
|
+
type: "button",
|
|
11738
|
+
className: "dock-sw" + (floating ? " on" : ""),
|
|
11739
|
+
role: "switch",
|
|
11740
|
+
"aria-checked": floating,
|
|
11741
|
+
"aria-label": (floating ? "\u9690\u85CF" : "\u663E\u793A") + "\u6D6E\u52A8\u4FA7\u680F\u6309\u94AE",
|
|
11742
|
+
title: floating ? "\u9690\u85CF\u5DE6\u4E0B\u89D2\u7684\u6D6E\u52A8\u4FA7\u680F\u5F00\u5173" : "\u663E\u793A\u5DE6\u4E0B\u89D2\u7684\u6D6E\u52A8\u4FA7\u680F\u5F00\u5173",
|
|
11743
|
+
onClick: () => setFloatingShown(!floating)
|
|
11744
|
+
}),
|
|
11745
|
+
import_react22.default.createElement("span", { className: "dkmob-dim" }, "44px \u5706\u94AE\u56FA\u5B9A\u5728\u5DE6\u4E0B\u89D2\uFF0C\u8C03\u7528 dsh \u5B98\u65B9 toggleSidebar \u5F00\u5408\u7A84\u5C4F\u62BD\u5C49\uFF1B\u4E0D\u9700\u8981\u65F6\u53EF\u5728\u6B64\u5173\u95ED\u3002")
|
|
11746
|
+
),
|
|
11747
|
+
import_react22.default.createElement(
|
|
11748
|
+
"div",
|
|
11749
|
+
{ className: "dkmob-note" },
|
|
11750
|
+
"\u751F\u6548\u4E2D\u7684\u4F18\u5316\uFF1A\u8F93\u5165\u7C7B\u63A7\u4EF6\u5B57\u53F7\u62C9\u5230 16px\uFF08\u907F\u514D iOS \u805A\u7126\u7F29\u653E\u6574\u9875\uFF09\xB7 \u7EAF\u56FE\u6807\u6309\u94AE\u9762\u79EF\u515C\u5E95 \u226536px \xB7 ",
|
|
11751
|
+
"\u53BB\u6389\u70B9\u6309\u9AD8\u4EAE\u4E0E\u53CC\u51FB\u7F29\u653E\u5224\u5B9A \xB7 \u4EE3\u7801\u5757\u6A2A\u5411\u6EDA\u52A8\u3001\u884C\u5185\u4EE3\u7801\u81EA\u52A8\u6362\u884C \xB7 viewport meta \u8865 viewport-fit=cover",
|
|
11752
|
+
"\uFF08standalone \u5168\u5C4F\u65F6\u7ED9\u5706\u89D2/\u5218\u6D77\u7559\u5B89\u5168\u533A\uFF09\u3002\u505C\u7528\u672C\u529F\u80FD\u5373\u5168\u90E8\u8FD8\u539F\u3002"
|
|
11753
|
+
)
|
|
11754
|
+
);
|
|
11755
|
+
}
|
|
11756
|
+
function MobileStat() {
|
|
11757
|
+
const [active, setActive] = (0, import_react23.useState)(() => mobileActive());
|
|
11758
|
+
const [floating, setFloating] = (0, import_react23.useState)(() => floatingShown());
|
|
11759
|
+
(0, import_react23.useEffect)(() => {
|
|
11760
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return void 0;
|
|
11761
|
+
let mqs = [];
|
|
11762
|
+
try {
|
|
11763
|
+
mqs = [window.matchMedia(MOBILE_QUERY_NARROW), window.matchMedia(MOBILE_QUERY_COARSE)];
|
|
11764
|
+
} catch {
|
|
11765
|
+
return void 0;
|
|
11766
|
+
}
|
|
11767
|
+
const update = () => setActive(mqs.some((mq) => mq.matches));
|
|
11768
|
+
update();
|
|
11769
|
+
for (const mq of mqs) {
|
|
11770
|
+
if (typeof mq.addEventListener === "function") mq.addEventListener("change", update);
|
|
11771
|
+
else if (typeof mq.addListener === "function") mq.addListener(update);
|
|
11772
|
+
}
|
|
11773
|
+
return () => {
|
|
11774
|
+
for (const mq of mqs) {
|
|
11775
|
+
if (typeof mq.removeEventListener === "function") mq.removeEventListener("change", update);
|
|
11776
|
+
else if (typeof mq.removeListener === "function") mq.removeListener(update);
|
|
11777
|
+
}
|
|
11778
|
+
};
|
|
11779
|
+
}, []);
|
|
11780
|
+
(0, import_react23.useEffect)(() => subscribePref(() => setFloating(floatingShown())), []);
|
|
11781
|
+
if (!active) return import_react22.default.createElement("span", null, "\u5F53\u524D\u89C6\u53E3\u672A\u547D\u4E2D\u624B\u673A\u5F62\u6001\uFF0C\u6837\u5F0F\u672A\u6CE8\u5165");
|
|
11782
|
+
return import_react22.default.createElement("span", null, "\u624B\u673A\u6A21\u5F0F\u751F\u6548\u4E2D \xB7 \u6D6E\u52A8\u4FA7\u680F\u6309\u94AE" + (floating ? "\u663E\u793A" : "\u5DF2\u9690\u85CF"));
|
|
11783
|
+
}
|
|
11784
|
+
var css6 = [
|
|
11785
|
+
// 浮动侧栏按钮:44px 触控面积(Apple HIG 最低建议),token 取主题变量自动适配亮暗色;
|
|
11786
|
+
// z-index 190 压在功能坞弹层(dockm-backdrop,200)之下,弹层打开时被遮罩盖住不误触。
|
|
11787
|
+
".dkmob-fab{position:fixed;left:calc(env(safe-area-inset-left,0px) + 62px);bottom:calc(env(safe-area-inset-bottom,0px) + 74px);z-index:190;width:44px;height:44px;border-radius:50%;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);display:inline-flex;align-items:center;justify-content:center;padding:0;box-shadow:0 4px 14px rgb(0 0 0 / .22);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--ds-ease-in-out),background .15s var(--ds-ease-in-out),color .15s var(--ds-ease-in-out);}",
|
|
11788
|
+
".dkmob-fab:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}",
|
|
11789
|
+
".dkmob-fab:active{transform:scale(.94);}",
|
|
11790
|
+
// 输入类控件 16px:防 iOS 聚焦自动放大(<16px 的输入框聚焦时 Safari 强制缩放页面)
|
|
11791
|
+
'body[data-dk-mobile="1"] :is(textarea, input:not([type]), input[type="text"], input[type="search"], input[type="url"], input[type="password"], input[type="number"], input[type="email"], [contenteditable="true"]){font-size:16px !important;}',
|
|
11792
|
+
// 触控基础:去点按高亮、消双击缩放判定
|
|
11793
|
+
'body[data-dk-mobile="1"] :is(button, [role="button"]){-webkit-tap-highlight-color:transparent;touch-action:manipulation;}',
|
|
11794
|
+
// 纯图标按钮面积兜底:实测窄屏下一批 28×28 的工具钮很难点中;36px 是不引起行高剧变的上限。
|
|
11795
|
+
// 只收「唯一子元素是 svg」的按钮,避免撑坏带文字的行内控件;排除远程访问的抽屉把手
|
|
11796
|
+
// (.dsh-mobile-drawer-btn 贴边设计 30px 宽,被撑到 36 会破坏边缘吸附观感)与本模块 FAB。
|
|
11797
|
+
'body[data-dk-mobile="1"] button:has(> svg:only-child):not(.dsh-mobile-drawer-btn):not(.dkmob-fab){min-width:36px;min-height:36px;}',
|
|
11798
|
+
// 代码块横向滚动、行内代码换行:窄屏不撑破版面
|
|
11799
|
+
'body[data-dk-mobile="1"] pre{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}',
|
|
11800
|
+
'body[data-dk-mobile="1"] code{overflow-wrap:anywhere;}',
|
|
11801
|
+
'body[data-dk-mobile="1"] pre code{overflow-wrap:normal;}',
|
|
11802
|
+
// iOS 横竖屏切换时的字号自动膨胀关掉(:has 挂到 html 上;dsh 自身样式已依赖 :has,基线足够)
|
|
11803
|
+
'html:has(body[data-dk-mobile="1"]){-webkit-text-size-adjust:100%;text-size-adjust:100%;}',
|
|
11804
|
+
// 功能页自身
|
|
11805
|
+
".dkmob-root{display:flex;flex-direction:column;gap:10px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.6;}",
|
|
11806
|
+
".dkmob-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}",
|
|
11807
|
+
".dkmob-label{font-weight:600;flex:none;}",
|
|
11808
|
+
".dkmob-state{flex:none;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);border-radius:999px;padding:1px 10px;font-size:11px;}",
|
|
11809
|
+
".dkmob-state.on{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary);}",
|
|
11810
|
+
".dkmob-dim{color:var(--dsw-alias-label-secondary);font-size:12px;}",
|
|
11811
|
+
".dkmob-note{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.7;border-top:1px solid var(--dsw-alias-border-l1);padding-top:10px;}"
|
|
11812
|
+
].join("\n");
|
|
11813
|
+
var feature11 = {
|
|
11814
|
+
id: "mobile",
|
|
11815
|
+
name: "\u624B\u673A\u9002\u914D",
|
|
11816
|
+
order: 170,
|
|
11817
|
+
accent: "#34d399",
|
|
11818
|
+
description: "\u624B\u673A/\u7A84\u5C4F\u6392\u7248\u4E0E\u89E6\u63A7\u515C\u5E95\uFF1A16px \u8F93\u5165\u9632 iOS \u7F29\u653E\u3001\u56FE\u6807\u6309\u94AE\u89E6\u63A7\u9762\u79EF\u3001\u4EE3\u7801\u5757\u6EDA\u52A8\u3001\u6D6E\u52A8\u4FA7\u680F\u5F00\u5173",
|
|
11819
|
+
defaultEnabled: true,
|
|
11820
|
+
css: css6,
|
|
11821
|
+
Overlay: MobileOverlay,
|
|
11822
|
+
View: MobileView,
|
|
11823
|
+
HomeStat: MobileStat
|
|
11824
|
+
};
|
|
11825
|
+
|
|
11394
11826
|
// src/client.jsx
|
|
11395
|
-
var DOCK_VERSION = "0.
|
|
11396
|
-
var BUILTIN_FEATURES = [feature, feature2, feature3, feature4, feature5, feature6, feature7, feature8, feature9, feature10];
|
|
11827
|
+
var DOCK_VERSION = "0.13.0";
|
|
11828
|
+
var BUILTIN_FEATURES = [feature, feature2, feature3, feature4, feature5, feature6, feature7, feature8, feature9, feature10, feature11];
|
|
11397
11829
|
var PLANNED_FEATURES = [];
|
|
11398
11830
|
var PLANNED_NOTES = {};
|
|
11399
11831
|
var externalDefs = [];
|
|
@@ -11600,8 +12032,8 @@ function ensureCss() {
|
|
|
11600
12032
|
}
|
|
11601
12033
|
}
|
|
11602
12034
|
function useExternalVersion() {
|
|
11603
|
-
const [, bump] =
|
|
11604
|
-
|
|
12035
|
+
const [, bump] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
12036
|
+
import_react24.default.useEffect(() => {
|
|
11605
12037
|
externalListeners.add(bump);
|
|
11606
12038
|
return () => {
|
|
11607
12039
|
externalListeners.delete(bump);
|
|
@@ -11611,44 +12043,44 @@ function useExternalVersion() {
|
|
|
11611
12043
|
var lastGeom = { x: null, y: null, w: null, h: null };
|
|
11612
12044
|
function DockIcon(props) {
|
|
11613
12045
|
const size = props && props.size || 16;
|
|
11614
|
-
return
|
|
12046
|
+
return import_react24.default.createElement(
|
|
11615
12047
|
"svg",
|
|
11616
12048
|
{ width: size, height: size, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.3, "aria-hidden": true },
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
12049
|
+
import_react24.default.createElement("rect", { x: 2.5, y: 2.5, width: 4.4, height: 4.4, rx: 1.2 }),
|
|
12050
|
+
import_react24.default.createElement("rect", { x: 9, y: 2.5, width: 4.4, height: 4.4, rx: 1.2 }),
|
|
12051
|
+
import_react24.default.createElement("rect", { x: 2.5, y: 9, width: 4.4, height: 4.4, rx: 1.2 }),
|
|
12052
|
+
import_react24.default.createElement("rect", { x: 9, y: 9, width: 4.4, height: 4.4, rx: 1.2 })
|
|
11621
12053
|
);
|
|
11622
12054
|
}
|
|
11623
12055
|
function DockEntry(props) {
|
|
11624
12056
|
const wide = !!props.wide;
|
|
11625
|
-
const [open, setOpen] =
|
|
11626
|
-
|
|
11627
|
-
return
|
|
12057
|
+
const [open, setOpen] = import_react24.default.useState(panelNav.open);
|
|
12058
|
+
import_react24.default.useEffect(() => subscribePanel(() => setOpen(panelNav.open)), []);
|
|
12059
|
+
return import_react24.default.createElement("button", {
|
|
11628
12060
|
type: "button",
|
|
11629
12061
|
className: "docke2-btn" + (open ? " docke2-on" : "") + (wide ? "" : " docke2-rail"),
|
|
11630
12062
|
title: "\u529F\u80FD\u575E",
|
|
11631
12063
|
"aria-label": "\u529F\u80FD\u575E",
|
|
11632
12064
|
"aria-expanded": open,
|
|
11633
12065
|
onClick: () => setPanelOpen(!open)
|
|
11634
|
-
},
|
|
12066
|
+
}, import_react24.default.createElement(DockIcon, { size: wide ? 16 : 18 }), wide ? import_react24.default.createElement("span", { className: "docke2-label" }, "\u529F\u80FD\u575E") : null);
|
|
11635
12067
|
}
|
|
11636
12068
|
function DockModal() {
|
|
11637
|
-
const [nav, setNav] =
|
|
11638
|
-
|
|
12069
|
+
const [nav, setNav] = import_react24.default.useState({ open: panelNav.open, active: panelNav.active, params: panelNav.params });
|
|
12070
|
+
import_react24.default.useEffect(() => subscribePanel(() => setNav({ open: panelNav.open, active: panelNav.active, params: panelNav.params })), []);
|
|
11639
12071
|
const open = nav.open || typeof document === "undefined";
|
|
11640
12072
|
const active = nav.active;
|
|
11641
12073
|
const setActive = navigatePanel;
|
|
11642
12074
|
const navParams = nav.params;
|
|
11643
|
-
const [, force] =
|
|
12075
|
+
const [, force] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
11644
12076
|
useExternalVersion();
|
|
11645
|
-
const [win, setWin] =
|
|
11646
|
-
const dlgRef =
|
|
11647
|
-
const contentRef =
|
|
11648
|
-
|
|
12077
|
+
const [win, setWin] = import_react24.default.useState(() => ({ mode: "normal", x: null, y: null, w: null, h: null }));
|
|
12078
|
+
const dlgRef = import_react24.default.useRef(null);
|
|
12079
|
+
const contentRef = import_react24.default.useRef(null);
|
|
12080
|
+
import_react24.default.useEffect(() => {
|
|
11649
12081
|
if (lastGeom.w) setWin({ mode: "normal", x: lastGeom.x, y: lastGeom.y, w: lastGeom.w, h: lastGeom.h });
|
|
11650
12082
|
}, []);
|
|
11651
|
-
|
|
12083
|
+
import_react24.default.useEffect(() => {
|
|
11652
12084
|
if (open && contentRef.current) contentRef.current.scrollTop = 0;
|
|
11653
12085
|
}, [active, open]);
|
|
11654
12086
|
function beginDrag(e, type) {
|
|
@@ -11686,13 +12118,13 @@ function DockModal() {
|
|
|
11686
12118
|
const mod = isHome ? null : MODULES.find((m) => m.id === active) || MODULES[0];
|
|
11687
12119
|
const st = mod ? stateOf(mod.id) : null;
|
|
11688
12120
|
const View = mod ? mod.View : null;
|
|
11689
|
-
const viewNode = mod && View ?
|
|
12121
|
+
const viewNode = mod && View ? import_react24.default.createElement(
|
|
11690
12122
|
"div",
|
|
11691
12123
|
{ className: "dockm-view" },
|
|
11692
|
-
|
|
12124
|
+
import_react24.default.createElement(
|
|
11693
12125
|
FeatureBoundary,
|
|
11694
12126
|
{ key: mod.id, label: mod.name },
|
|
11695
|
-
|
|
12127
|
+
import_react24.default.createElement(View, { ctx: ctxRef.current, feature: mod, params: navParams })
|
|
11696
12128
|
)
|
|
11697
12129
|
) : null;
|
|
11698
12130
|
const enabledCount = MODULES.filter((m) => {
|
|
@@ -11706,10 +12138,10 @@ function DockModal() {
|
|
|
11706
12138
|
width: win.w != null ? win.w : void 0,
|
|
11707
12139
|
height: win.mode === "min" ? "auto" : win.h != null ? win.h : void 0
|
|
11708
12140
|
} : null;
|
|
11709
|
-
return
|
|
12141
|
+
return import_react24.default.createElement(
|
|
11710
12142
|
"div",
|
|
11711
12143
|
{ className: "dockm-backdrop", onClick: () => setPanelOpen(false) },
|
|
11712
|
-
|
|
12144
|
+
import_react24.default.createElement(
|
|
11713
12145
|
"div",
|
|
11714
12146
|
{
|
|
11715
12147
|
className: "dockm-dialog" + (win.mode === "max" ? " dockm-max" : "") + (win.mode === "min" ? " dockm-min" : ""),
|
|
@@ -11717,41 +12149,41 @@ function DockModal() {
|
|
|
11717
12149
|
ref: dlgRef,
|
|
11718
12150
|
onClick: (e) => e.stopPropagation()
|
|
11719
12151
|
},
|
|
11720
|
-
|
|
12152
|
+
import_react24.default.createElement(
|
|
11721
12153
|
"div",
|
|
11722
12154
|
{
|
|
11723
12155
|
className: "dockm-head",
|
|
11724
12156
|
onPointerDown: (e) => beginDrag(e, "move"),
|
|
11725
12157
|
onDoubleClick: () => setWin((s) => Object.assign({}, s, { mode: s.mode === "max" ? "normal" : "max" }))
|
|
11726
12158
|
},
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
12159
|
+
import_react24.default.createElement(DockIcon, null),
|
|
12160
|
+
import_react24.default.createElement("span", { className: "dockm-title" }, "\u529F\u80FD\u575E"),
|
|
12161
|
+
import_react24.default.createElement("span", { className: "dockm-sub" }, "dsh-dock \xB7 \u4E5F\u53EF\u5728 \u8BBE\u7F6E \u2192 \u529F\u80FD\u575E \u6253\u5F00\u7BA1\u7406\u9875"),
|
|
12162
|
+
import_react24.default.createElement(
|
|
11731
12163
|
"span",
|
|
11732
12164
|
{ className: "dockm-ctrls" },
|
|
11733
|
-
|
|
12165
|
+
import_react24.default.createElement("button", {
|
|
11734
12166
|
type: "button",
|
|
11735
12167
|
className: "dockm-win",
|
|
11736
12168
|
title: win.mode === "min" ? "\u8FD8\u539F" : "\u6700\u5C0F\u5316",
|
|
11737
12169
|
onClick: () => setWin((s) => Object.assign({}, s, { mode: s.mode === "min" ? "normal" : "min" }))
|
|
11738
12170
|
}, "\u2581"),
|
|
11739
|
-
|
|
12171
|
+
import_react24.default.createElement("button", {
|
|
11740
12172
|
type: "button",
|
|
11741
12173
|
className: "dockm-win",
|
|
11742
12174
|
title: win.mode === "max" ? "\u8FD8\u539F" : "\u6700\u5927\u5316",
|
|
11743
12175
|
onClick: () => setWin((s) => Object.assign({}, s, { mode: s.mode === "max" ? "normal" : "max" }))
|
|
11744
12176
|
}, win.mode === "max" ? "\u2750" : "\u25A2"),
|
|
11745
|
-
|
|
12177
|
+
import_react24.default.createElement("button", { type: "button", className: "dockm-close", "aria-label": "\u5173\u95ED", title: "\u5173\u95ED", onClick: () => setPanelOpen(false) }, "\u2715")
|
|
11746
12178
|
)
|
|
11747
12179
|
),
|
|
11748
|
-
|
|
12180
|
+
import_react24.default.createElement(
|
|
11749
12181
|
"div",
|
|
11750
12182
|
{ className: "dockm-body" },
|
|
11751
|
-
|
|
12183
|
+
import_react24.default.createElement(
|
|
11752
12184
|
"nav",
|
|
11753
12185
|
{ className: "dockm-nav", "aria-label": "\u529F\u80FD\u6A21\u5757" },
|
|
11754
|
-
|
|
12186
|
+
import_react24.default.createElement(
|
|
11755
12187
|
"button",
|
|
11756
12188
|
{
|
|
11757
12189
|
type: "button",
|
|
@@ -11759,10 +12191,10 @@ function DockModal() {
|
|
|
11759
12191
|
className: "dockm-nav-item" + (isHome ? " on" : ""),
|
|
11760
12192
|
onClick: () => setActive("home")
|
|
11761
12193
|
},
|
|
11762
|
-
|
|
11763
|
-
|
|
12194
|
+
import_react24.default.createElement("span", { className: "dockm-navhome" }, import_react24.default.createElement(DockIcon, null)),
|
|
12195
|
+
import_react24.default.createElement("span", null, "\u9996\u9875")
|
|
11764
12196
|
),
|
|
11765
|
-
MODULES.map((m) =>
|
|
12197
|
+
MODULES.map((m) => import_react24.default.createElement(
|
|
11766
12198
|
"button",
|
|
11767
12199
|
{
|
|
11768
12200
|
type: "button",
|
|
@@ -11770,42 +12202,42 @@ function DockModal() {
|
|
|
11770
12202
|
className: "dockm-nav-item" + (m.id === active ? " on" : ""),
|
|
11771
12203
|
onClick: () => setActive(m.id)
|
|
11772
12204
|
},
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
m.planned ?
|
|
11776
|
-
m.external ?
|
|
12205
|
+
import_react24.default.createElement("span", { className: "dockm-dot", style: { background: m.accent } }),
|
|
12206
|
+
import_react24.default.createElement("span", null, m.name),
|
|
12207
|
+
m.planned ? import_react24.default.createElement("span", { className: "dockm-badge" }, "\u89C4\u5212\u4E2D") : null,
|
|
12208
|
+
m.external ? import_react24.default.createElement("span", { className: "dockm-badge" }, "\u5916\u90E8") : null
|
|
11777
12209
|
))
|
|
11778
12210
|
),
|
|
11779
|
-
|
|
12211
|
+
import_react24.default.createElement(
|
|
11780
12212
|
"div",
|
|
11781
12213
|
{ className: "dockm-content", ref: contentRef },
|
|
11782
|
-
|
|
12214
|
+
import_react24.default.createElement(
|
|
11783
12215
|
"div",
|
|
11784
12216
|
{ className: "dockm-content-head" },
|
|
11785
|
-
|
|
12217
|
+
import_react24.default.createElement(
|
|
11786
12218
|
"div",
|
|
11787
12219
|
{ className: "dockm-name" },
|
|
11788
|
-
isHome ?
|
|
12220
|
+
isHome ? import_react24.default.createElement("span", { className: "dockm-navhome" }, import_react24.default.createElement(DockIcon, null)) : import_react24.default.createElement("span", { className: "dockm-dot", style: { background: mod.accent } }),
|
|
11789
12221
|
isHome ? "\u9996\u9875" : mod.name,
|
|
11790
|
-
!isHome && mod.planned ?
|
|
11791
|
-
!isHome && mod.external ?
|
|
12222
|
+
!isHome && mod.planned ? import_react24.default.createElement("span", { className: "dockm-badge" }, "\u89C4\u5212\u4E2D") : null,
|
|
12223
|
+
!isHome && mod.external ? import_react24.default.createElement("span", { className: "dockm-badge" }, "\u5916\u90E8\u5305" + (mod.package ? " \xB7 " + mod.package : "")) : null
|
|
11792
12224
|
),
|
|
11793
|
-
|
|
12225
|
+
import_react24.default.createElement(
|
|
11794
12226
|
"div",
|
|
11795
12227
|
{ className: "dockm-desc" },
|
|
11796
12228
|
isHome ? "\u6240\u6709\u5B50\u529F\u80FD\u603B\u63FD\uFF1A\u8FD0\u884C\u72B6\u6001\u3001\u6982\u8981\u4E0E\u5FEB\u6377\u5F00\u5173\uFF0C\u70B9\u51FB\u5361\u7247\u8FDB\u5165\u5BF9\u5E94\u529F\u80FD\u9875\u3002" : mod.description
|
|
11797
12229
|
)
|
|
11798
12230
|
),
|
|
11799
|
-
isHome ?
|
|
11800
|
-
|
|
12231
|
+
isHome ? import_react24.default.createElement("div", { className: "dockm-view" }, import_react24.default.createElement(HomeView, { ctx: ctxRef.current, onOpen: setActive, onToggle: force })) : mod.planned ? import_react24.default.createElement("div", { className: "dockm-note" }, PLANNED_NOTES[mod.id] || "\u5F85\u63A5\u5165\uFF1A\u89C1 README \u8DEF\u7EBF\u56FE") : st && st.enabled && viewNode ? viewNode : st && st.error ? import_react24.default.createElement("div", { className: "dockm-note dockm-err" }, "\u529F\u80FD\u51FA\u9519\uFF1A" + st.error) : import_react24.default.createElement("div", { className: "dockm-note" }, "\u8BE5\u529F\u80FD\u5F53\u524D\u4E3A\u505C\u7528\u72B6\u6001\uFF08\u5F00\u5173\u5DF2\u6301\u4E45\u5316\uFF0C\u91CD\u542F\u540E\u4FDD\u6301\uFF09"),
|
|
12232
|
+
import_react24.default.createElement(
|
|
11801
12233
|
"div",
|
|
11802
12234
|
{ className: "dockm-foot" },
|
|
11803
|
-
|
|
11804
|
-
!isHome && mod && !mod.planned && st ?
|
|
12235
|
+
import_react24.default.createElement("span", null, isHome ? "\u529F\u80FD\u575E v" + DOCK_VERSION + " \xB7 \u5171 " + MODULES.length + " \u4E2A\u529F\u80FD\u6A21\u5757\uFF0C" + enabledCount + " \u4E2A\u5DF2\u542F\u7528" : "\u529F\u80FD\u575E v" + DOCK_VERSION + " \xB7 \u65B0\u529F\u80FD\u6309\u8DEF\u7EBF\u56FE\u8FFD\u52A0"),
|
|
12236
|
+
!isHome && mod && !mod.planned && st ? import_react24.default.createElement(
|
|
11805
12237
|
"span",
|
|
11806
12238
|
{ className: "dockm-foot-sw" },
|
|
11807
|
-
|
|
11808
|
-
|
|
12239
|
+
import_react24.default.createElement("span", { className: "dockm-foot-swlabel" + (st.enabled ? " on" : "") }, st.enabled ? "\u5DF2\u542F\u7528" : "\u5DF2\u505C\u7528"),
|
|
12240
|
+
import_react24.default.createElement("button", {
|
|
11809
12241
|
type: "button",
|
|
11810
12242
|
className: "dock-sw" + (st.enabled ? " on" : ""),
|
|
11811
12243
|
role: "switch",
|
|
@@ -11818,11 +12250,11 @@ function DockModal() {
|
|
|
11818
12250
|
}
|
|
11819
12251
|
})
|
|
11820
12252
|
) : null,
|
|
11821
|
-
!isHome && mod && typeof mod.Chip === "function" ?
|
|
12253
|
+
!isHome && mod && typeof mod.Chip === "function" ? import_react24.default.createElement(
|
|
11822
12254
|
"span",
|
|
11823
12255
|
{ className: "dockm-foot-sw" },
|
|
11824
|
-
|
|
11825
|
-
|
|
12256
|
+
import_react24.default.createElement("span", { className: "dockm-foot-swlabel" + (chipShown(mod.id) ? " on" : "") }, "\u4F1A\u8BDD\u9875\u5C0F\u63A7\u4EF6"),
|
|
12257
|
+
import_react24.default.createElement("button", {
|
|
11826
12258
|
type: "button",
|
|
11827
12259
|
className: "dock-sw" + (chipShown(mod.id) ? " on" : ""),
|
|
11828
12260
|
role: "switch",
|
|
@@ -11838,30 +12270,30 @@ function DockModal() {
|
|
|
11838
12270
|
)
|
|
11839
12271
|
)
|
|
11840
12272
|
),
|
|
11841
|
-
win.mode === "normal" ?
|
|
12273
|
+
win.mode === "normal" ? import_react24.default.createElement("div", { className: "dockm-resize", onPointerDown: (e) => beginDrag(e, "size") }) : null
|
|
11842
12274
|
)
|
|
11843
12275
|
);
|
|
11844
12276
|
}
|
|
11845
12277
|
function HomeView(props) {
|
|
11846
12278
|
const ctx = props && props.ctx;
|
|
11847
|
-
const [, force] =
|
|
12279
|
+
const [, force] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
11848
12280
|
useExternalVersion();
|
|
11849
12281
|
const open = (id) => {
|
|
11850
12282
|
if (props && typeof props.onOpen === "function") props.onOpen(id);
|
|
11851
12283
|
};
|
|
11852
|
-
return
|
|
12284
|
+
return import_react24.default.createElement(
|
|
11853
12285
|
"div",
|
|
11854
12286
|
{ className: "dockh-grid" },
|
|
11855
12287
|
allModules().map((m) => {
|
|
11856
12288
|
const st = stateOf(m.id);
|
|
11857
12289
|
const enabled = !!(st && st.enabled);
|
|
11858
12290
|
const Stat = m.HomeStat;
|
|
11859
|
-
const statNode = m.planned ?
|
|
12291
|
+
const statNode = m.planned ? import_react24.default.createElement("span", null, PLANNED_NOTES[m.id] || "\u5F85\u63A5\u5165\uFF1A\u89C1 README \u8DEF\u7EBF\u56FE") : enabled && Stat ? import_react24.default.createElement(
|
|
11860
12292
|
FeatureBoundary,
|
|
11861
12293
|
{ key: m.id, label: m.name },
|
|
11862
|
-
|
|
11863
|
-
) :
|
|
11864
|
-
return
|
|
12294
|
+
import_react24.default.createElement(Stat, { ctx })
|
|
12295
|
+
) : import_react24.default.createElement("span", null, "\u5DF2\u505C\u7528\uFF0C\u542F\u7528\u540E\u5728\u6B64\u5C55\u793A\u8FD0\u884C\u6982\u8981");
|
|
12296
|
+
return import_react24.default.createElement(
|
|
11865
12297
|
"div",
|
|
11866
12298
|
{
|
|
11867
12299
|
key: m.id,
|
|
@@ -11876,21 +12308,21 @@ function HomeView(props) {
|
|
|
11876
12308
|
}
|
|
11877
12309
|
}
|
|
11878
12310
|
},
|
|
11879
|
-
|
|
12311
|
+
import_react24.default.createElement(
|
|
11880
12312
|
"div",
|
|
11881
12313
|
{ className: "dockh-head" },
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
m.external ?
|
|
12314
|
+
import_react24.default.createElement("span", { className: "dockm-dot", style: { background: m.accent } }),
|
|
12315
|
+
import_react24.default.createElement("span", { className: "dockh-name" }, m.name),
|
|
12316
|
+
m.external ? import_react24.default.createElement("span", { className: "dockh-badge", title: m.package || void 0 }, "\u5916\u90E8") : null,
|
|
11885
12317
|
// 状态标识:圆点 + 文字(纯展示,与开关视觉区分)
|
|
11886
|
-
|
|
12318
|
+
import_react24.default.createElement(
|
|
11887
12319
|
"span",
|
|
11888
12320
|
{ className: "dockh-status" + (m.planned ? " plan" : enabled ? "" : " off") },
|
|
11889
|
-
|
|
11890
|
-
|
|
12321
|
+
import_react24.default.createElement("span", { className: "dockh-sdot" }),
|
|
12322
|
+
import_react24.default.createElement("span", null, m.planned ? "\u89C4\u5212\u4E2D" : enabled ? "\u8FD0\u884C\u4E2D" : "\u5DF2\u505C\u7528")
|
|
11891
12323
|
),
|
|
11892
12324
|
// 启停开关(规划中的功能不显示)
|
|
11893
|
-
m.planned ? null :
|
|
12325
|
+
m.planned ? null : import_react24.default.createElement("button", {
|
|
11894
12326
|
type: "button",
|
|
11895
12327
|
className: "dock-sw" + (enabled ? " on" : ""),
|
|
11896
12328
|
role: "switch",
|
|
@@ -11905,12 +12337,12 @@ function HomeView(props) {
|
|
|
11905
12337
|
}
|
|
11906
12338
|
})
|
|
11907
12339
|
),
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
12340
|
+
import_react24.default.createElement("div", { className: "dockh-desc" }, m.description),
|
|
12341
|
+
import_react24.default.createElement("div", { className: "dockh-stat" }, statNode),
|
|
12342
|
+
import_react24.default.createElement(
|
|
11911
12343
|
"div",
|
|
11912
12344
|
{ className: "dockh-foot" },
|
|
11913
|
-
|
|
12345
|
+
import_react24.default.createElement("span", { className: "dockh-go" }, "\u67E5\u770B\u8BE6\u60C5 \u2192")
|
|
11914
12346
|
)
|
|
11915
12347
|
);
|
|
11916
12348
|
})
|
|
@@ -11918,16 +12350,16 @@ function HomeView(props) {
|
|
|
11918
12350
|
}
|
|
11919
12351
|
function DockPanel(props) {
|
|
11920
12352
|
const ctx = ctxRef.current;
|
|
11921
|
-
const [, force] =
|
|
12353
|
+
const [, force] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
11922
12354
|
useExternalVersion();
|
|
11923
12355
|
const toggle = (id) => {
|
|
11924
12356
|
toggleFeature(id);
|
|
11925
12357
|
force();
|
|
11926
12358
|
};
|
|
11927
|
-
return
|
|
12359
|
+
return import_react24.default.createElement(
|
|
11928
12360
|
"div",
|
|
11929
12361
|
{ className: "dock-root" },
|
|
11930
|
-
|
|
12362
|
+
import_react24.default.createElement(
|
|
11931
12363
|
"div",
|
|
11932
12364
|
{ className: "dock-intro" },
|
|
11933
12365
|
"\u529F\u80FD\u575E\uFF08dsh-dock\uFF09\xB7 \u6240\u6709\u5C0F\u529F\u80FD\u96C6\u4E2D\u5728\u8FD9\u4E00\u4E2A\u9762\u677F\u91CC\u7BA1\u7406\u3002v0.4.0 \u8D77\u6BCF\u4E2A\u529F\u80FD\u662F\u72EC\u7ACB\u6A21\u5757\uFF08features/<id>/\uFF09\uFF0C",
|
|
@@ -11936,25 +12368,25 @@ function DockPanel(props) {
|
|
|
11936
12368
|
allModules().map((f) => {
|
|
11937
12369
|
const st = stateOf(f.id);
|
|
11938
12370
|
const View = f.View;
|
|
11939
|
-
const viewNode = !f.planned && st.enabled && View ?
|
|
12371
|
+
const viewNode = !f.planned && st.enabled && View ? import_react24.default.createElement(
|
|
11940
12372
|
"div",
|
|
11941
12373
|
{ className: "dock-body" },
|
|
11942
|
-
|
|
12374
|
+
import_react24.default.createElement(
|
|
11943
12375
|
FeatureBoundary,
|
|
11944
12376
|
{ key: f.id, label: f.name },
|
|
11945
|
-
|
|
12377
|
+
import_react24.default.createElement(View, { ctx, feature: f, params: props && props.params })
|
|
11946
12378
|
)
|
|
11947
12379
|
) : null;
|
|
11948
|
-
return
|
|
12380
|
+
return import_react24.default.createElement(
|
|
11949
12381
|
"div",
|
|
11950
12382
|
{ className: "dock-card", key: f.id },
|
|
11951
|
-
|
|
12383
|
+
import_react24.default.createElement(
|
|
11952
12384
|
"div",
|
|
11953
12385
|
{ className: "dock-card-head" },
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
f.planned ?
|
|
12386
|
+
import_react24.default.createElement("span", { className: "dock-dot" + (st.error ? " err" : st.enabled ? " on" : "") }),
|
|
12387
|
+
import_react24.default.createElement("span", { className: "dock-name" }, f.name),
|
|
12388
|
+
import_react24.default.createElement("span", { className: "dock-desc" }, f.description + (f.external ? "\uFF08\u6765\u81EA\u5916\u90E8\u5305" + (f.package ? " " + f.package : "") + "\uFF09" : "")),
|
|
12389
|
+
f.planned ? import_react24.default.createElement("span", { className: "dock-badge" }, "\u89C4\u5212\u4E2D") : import_react24.default.createElement("button", {
|
|
11958
12390
|
type: "button",
|
|
11959
12391
|
className: "dock-sw" + (st.enabled ? " on" : ""),
|
|
11960
12392
|
role: "switch",
|
|
@@ -11963,11 +12395,11 @@ function DockPanel(props) {
|
|
|
11963
12395
|
title: st.enabled ? "\u505C\u7528\u300C" + f.name + "\u300D" : "\u542F\u7528\u300C" + f.name + "\u300D",
|
|
11964
12396
|
onClick: () => toggle(f.id)
|
|
11965
12397
|
}),
|
|
11966
|
-
!f.planned && typeof f.Chip === "function" ?
|
|
12398
|
+
!f.planned && typeof f.Chip === "function" ? import_react24.default.createElement(
|
|
11967
12399
|
"span",
|
|
11968
12400
|
{ className: "dockm-foot-sw" },
|
|
11969
|
-
|
|
11970
|
-
|
|
12401
|
+
import_react24.default.createElement("span", { className: "dockm-foot-swlabel" + (chipShown(f.id) ? " on" : "") }, "\u4F1A\u8BDD\u9875\u5C0F\u63A7\u4EF6"),
|
|
12402
|
+
import_react24.default.createElement("button", {
|
|
11971
12403
|
type: "button",
|
|
11972
12404
|
className: "dock-sw" + (chipShown(f.id) ? " on" : ""),
|
|
11973
12405
|
role: "switch",
|
|
@@ -11981,22 +12413,22 @@ function DockPanel(props) {
|
|
|
11981
12413
|
})
|
|
11982
12414
|
) : null
|
|
11983
12415
|
),
|
|
11984
|
-
f.planned ?
|
|
12416
|
+
f.planned ? import_react24.default.createElement("div", { className: "dock-body" }, PLANNED_NOTES[f.id] || "\u5F85\u63A5\u5165\uFF1A\u89C1 README \u8DEF\u7EBF\u56FE") : st.error ? import_react24.default.createElement("div", { className: "dock-body dockm-err" }, "\u529F\u80FD\u51FA\u9519\uFF1A" + st.error) : null,
|
|
11985
12417
|
viewNode
|
|
11986
12418
|
);
|
|
11987
12419
|
})
|
|
11988
12420
|
);
|
|
11989
12421
|
}
|
|
11990
12422
|
function DockChips(props) {
|
|
11991
|
-
const [, force] =
|
|
11992
|
-
|
|
12423
|
+
const [, force] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
12424
|
+
import_react24.default.useEffect(() => subscribeFeatureState(() => force()), []);
|
|
11993
12425
|
const items = [];
|
|
11994
12426
|
for (const f of allModules()) {
|
|
11995
12427
|
if (f.planned || !stateOf(f.id).enabled || !chipShown(f.id) || typeof f.Chip !== "function") continue;
|
|
11996
|
-
items.push(
|
|
12428
|
+
items.push(import_react24.default.createElement(
|
|
11997
12429
|
FeatureBoundary,
|
|
11998
12430
|
{ key: f.id, label: f.name },
|
|
11999
|
-
|
|
12431
|
+
import_react24.default.createElement(f.Chip, {
|
|
12000
12432
|
ctx: props.ctx,
|
|
12001
12433
|
feature: f,
|
|
12002
12434
|
session: props.session,
|
|
@@ -12006,23 +12438,23 @@ function DockChips(props) {
|
|
|
12006
12438
|
));
|
|
12007
12439
|
}
|
|
12008
12440
|
if (items.length === 0) return null;
|
|
12009
|
-
return
|
|
12441
|
+
return import_react24.default.createElement("div", { className: "dockchip-row" }, items);
|
|
12010
12442
|
}
|
|
12011
12443
|
function FeatureOverlays() {
|
|
12012
|
-
const [, force] =
|
|
12444
|
+
const [, force] = import_react24.default.useReducer((n) => n + 1, 0);
|
|
12013
12445
|
useExternalVersion();
|
|
12014
|
-
|
|
12446
|
+
import_react24.default.useEffect(() => subscribeFeatureState(() => force()), []);
|
|
12015
12447
|
const items = [];
|
|
12016
12448
|
for (const f of allModules()) {
|
|
12017
12449
|
if (f.planned || !stateOf(f.id).enabled || typeof f.Overlay !== "function") continue;
|
|
12018
|
-
items.push(
|
|
12450
|
+
items.push(import_react24.default.createElement(
|
|
12019
12451
|
FeatureBoundary,
|
|
12020
12452
|
{ key: f.id, label: f.name },
|
|
12021
|
-
|
|
12453
|
+
import_react24.default.createElement(f.Overlay, { ctx: ctxRef.current, feature: f })
|
|
12022
12454
|
));
|
|
12023
12455
|
}
|
|
12024
12456
|
if (items.length === 0) return null;
|
|
12025
|
-
return
|
|
12457
|
+
return import_react24.default.createElement(import_react24.default.Fragment, null, items);
|
|
12026
12458
|
}
|
|
12027
12459
|
var ctxRef = { current: null };
|
|
12028
12460
|
function apply(ctx) {
|
|
@@ -12033,23 +12465,23 @@ function apply(ctx) {
|
|
|
12033
12465
|
if (slots === void 0) return;
|
|
12034
12466
|
slots.inject("sidebar.footer.action", () => slots.register(
|
|
12035
12467
|
{ name: "sidebar.footer.action", id: "dsh-dock", order: 1, label: "\u529F\u80FD\u575E" },
|
|
12036
|
-
(props) =>
|
|
12468
|
+
(props) => import_react24.default.createElement(DockEntry, props)
|
|
12037
12469
|
));
|
|
12038
12470
|
slots.inject("shell.overlay", () => slots.register(
|
|
12039
12471
|
{ name: "shell.overlay", id: "dsh-dock-panel", order: 21, label: "\u529F\u80FD\u575E\u9762\u677F" },
|
|
12040
|
-
() =>
|
|
12472
|
+
() => import_react24.default.createElement(DockModal, null)
|
|
12041
12473
|
));
|
|
12042
12474
|
slots.inject("shell.overlay", () => slots.register(
|
|
12043
12475
|
{ name: "shell.overlay", id: "dsh-dock-feature-overlays", order: 22, label: "\u529F\u80FD\u575E\u5168\u5C40\u6D6E\u5C42" },
|
|
12044
|
-
() =>
|
|
12476
|
+
() => import_react24.default.createElement(FeatureOverlays, null)
|
|
12045
12477
|
));
|
|
12046
12478
|
slots.inject("settings.section", () => slots.register(
|
|
12047
12479
|
{ name: "settings.section", id: "dsh-dock", order: 90, label: "\u529F\u80FD\u575E" },
|
|
12048
|
-
(props) =>
|
|
12480
|
+
(props) => import_react24.default.createElement(DockPanel, props)
|
|
12049
12481
|
));
|
|
12050
12482
|
slots.inject("conversation.input.left", () => slots.register(
|
|
12051
12483
|
{ name: "conversation.input.left", id: "dsh-dock-chips", order: 10, label: "\u529F\u80FD\u575E" },
|
|
12052
|
-
(zone) =>
|
|
12484
|
+
(zone) => import_react24.default.createElement(DockChips, Object.assign({}, zone, { ctx: ctxRef.current }))
|
|
12053
12485
|
));
|
|
12054
12486
|
}
|
|
12055
12487
|
var inject = ["timer"];
|