xechat-dsh 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +2 -2
- package/lib/xechat-app.css +261 -243
- package/lib/xechat-app.js +389 -125
- package/package.json +97 -97
package/lib/xechat-app.js
CHANGED
|
@@ -71828,6 +71828,24 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
71828
71828
|
if (raw === "WEB" || raw === "IDEA" || raw === "COMMAND") return false;
|
|
71829
71829
|
return true;
|
|
71830
71830
|
}
|
|
71831
|
+
const DEFAULT_RELAY_ORIGIN$1 = "wss://xechat.lesscoding.net";
|
|
71832
|
+
const LOCAL_PONDS = ["lesscoding.net", "xechat.lesscoding.net"];
|
|
71833
|
+
function relayBase() {
|
|
71834
|
+
try {
|
|
71835
|
+
const v2 = localStorage.getItem("xechat_dsh_relay_base");
|
|
71836
|
+
if (v2 !== null) return v2;
|
|
71837
|
+
} catch (e) {
|
|
71838
|
+
}
|
|
71839
|
+
return DEFAULT_RELAY_ORIGIN$1;
|
|
71840
|
+
}
|
|
71841
|
+
function buildWsUrl(host, wsPort) {
|
|
71842
|
+
const h2 = String(host || "").trim();
|
|
71843
|
+
if (!h2) return "";
|
|
71844
|
+
const base2 = relayBase();
|
|
71845
|
+
if (!base2) return "ws://" + h2 + ":" + wsPort + "/xechat";
|
|
71846
|
+
if (LOCAL_PONDS.indexOf(h2.toLowerCase()) >= 0) return base2 + "/xechat";
|
|
71847
|
+
return base2 + "/xechat/relay/" + h2 + "/" + wsPort;
|
|
71848
|
+
}
|
|
71831
71849
|
class WebSocketTransport {
|
|
71832
71850
|
constructor(url) {
|
|
71833
71851
|
this.name = "websocket";
|
|
@@ -71964,7 +71982,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
71964
71982
|
*/
|
|
71965
71983
|
async loginToServer(host, port, loginPayload) {
|
|
71966
71984
|
const wsPort = parseInt(port) + 1;
|
|
71967
|
-
const url =
|
|
71985
|
+
const url = buildWsUrl(host, wsPort);
|
|
71968
71986
|
const prevUrl = this._url;
|
|
71969
71987
|
console.log("[WS][loginToServer] host=" + host + ", port=" + port + ", wsPort=" + wsPort + ", url=" + url + ", loginPayload=" + JSON.stringify(loginPayload));
|
|
71970
71988
|
this._loginPayload = loginPayload;
|
|
@@ -81610,6 +81628,62 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
81610
81628
|
const opts = Object.assign({}, defaults2, options || {});
|
|
81611
81629
|
emoji_plugin$1(md, opts);
|
|
81612
81630
|
}
|
|
81631
|
+
const BORDER_RE = /^[++][\--=_─]+(?:[++][\--=_─]+)+[++]$/;
|
|
81632
|
+
const ROW_RE = /^[||].*[||]$/;
|
|
81633
|
+
function splitCells(line) {
|
|
81634
|
+
return String(line).replace(/^[||]/, "").replace(/[||]$/, "").split(/[||]/).map((c2) => c2.replace(/[\u3000\s]+/g, " ").trim());
|
|
81635
|
+
}
|
|
81636
|
+
function toMarkdownTable(rows) {
|
|
81637
|
+
const width = Math.max.apply(null, rows.map((r) => r.length));
|
|
81638
|
+
const pad = (r) => {
|
|
81639
|
+
const out = r.slice();
|
|
81640
|
+
while (out.length < width) out.push("");
|
|
81641
|
+
return "| " + out.join(" | ") + " |";
|
|
81642
|
+
};
|
|
81643
|
+
const header = pad(rows[0]);
|
|
81644
|
+
const sep = "| " + new Array(width).fill("---").join(" | ") + " |";
|
|
81645
|
+
const body = rows.slice(1).map(pad);
|
|
81646
|
+
return [header, sep].concat(body).join("\n");
|
|
81647
|
+
}
|
|
81648
|
+
const BORDER_ANY_RE = /[++][\--=_─]+(?:[++][\--=_─]+)+[++]/;
|
|
81649
|
+
function hasConsoleTable(text2) {
|
|
81650
|
+
if (!text2 || typeof text2 !== "string") return false;
|
|
81651
|
+
return BORDER_ANY_RE.test(text2);
|
|
81652
|
+
}
|
|
81653
|
+
function normalizeLayout(text2) {
|
|
81654
|
+
return String(text2).replace(new RegExp(BORDER_ANY_RE.source, "g"), "\n$&\n").replace(/[||]([ \u3000]+)[||]/g, "|\n|").replace(/\n{3,}/g, "\n\n");
|
|
81655
|
+
}
|
|
81656
|
+
function consoleTableToMarkdown(text2) {
|
|
81657
|
+
if (!text2 || typeof text2 !== "string" || !hasConsoleTable(text2)) return text2;
|
|
81658
|
+
const lines = normalizeLayout(text2).split(/\r?\n/);
|
|
81659
|
+
const out = [];
|
|
81660
|
+
let rows = [];
|
|
81661
|
+
const flush = () => {
|
|
81662
|
+
if (rows.length) {
|
|
81663
|
+
out.push("", toMarkdownTable(rows), "");
|
|
81664
|
+
rows = [];
|
|
81665
|
+
}
|
|
81666
|
+
};
|
|
81667
|
+
for (const raw of lines) {
|
|
81668
|
+
const line = raw.trim();
|
|
81669
|
+
if (!line) {
|
|
81670
|
+
flush();
|
|
81671
|
+
out.push(raw);
|
|
81672
|
+
continue;
|
|
81673
|
+
}
|
|
81674
|
+
if (BORDER_RE.test(line)) {
|
|
81675
|
+
continue;
|
|
81676
|
+
}
|
|
81677
|
+
if (ROW_RE.test(line)) {
|
|
81678
|
+
rows.push(splitCells(line));
|
|
81679
|
+
continue;
|
|
81680
|
+
}
|
|
81681
|
+
flush();
|
|
81682
|
+
out.push(raw);
|
|
81683
|
+
}
|
|
81684
|
+
flush();
|
|
81685
|
+
return out.join("\n").replace(/\n{3,}/g, "\n\n");
|
|
81686
|
+
}
|
|
81613
81687
|
const _export_sfc = (sfc, props) => {
|
|
81614
81688
|
const target = sfc.__vccOpts || sfc;
|
|
81615
81689
|
for (const [key, val] of props) {
|
|
@@ -81865,7 +81939,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
81865
81939
|
const processed = props.content.replace(/!\[([^]]*)\]\(([^)]+)\)/g, (m2, alt, url) => {
|
|
81866
81940
|
return `})`;
|
|
81867
81941
|
});
|
|
81868
|
-
return parsePlatformMarkup(md.render(preprocessFont(processed)));
|
|
81942
|
+
return parsePlatformMarkup(md.render(preprocessFont(consoleTableToMarkdown(processed))));
|
|
81869
81943
|
});
|
|
81870
81944
|
const isDirectImage = computed(() => {
|
|
81871
81945
|
if (!props.fileName) return false;
|
|
@@ -81993,7 +82067,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
81993
82067
|
};
|
|
81994
82068
|
}
|
|
81995
82069
|
};
|
|
81996
|
-
const MarkdownMessage = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
82070
|
+
const MarkdownMessage = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-9cce9056"]]);
|
|
81997
82071
|
const STORAGE_KEY$2 = "xechat_text_styles";
|
|
81998
82072
|
const BUILTIN_STYLES = [
|
|
81999
82073
|
{ id: "red", name: "红色文字", tag: '<span style="color:#ff4444">{text}</span>' },
|
|
@@ -94225,7 +94299,6 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
94225
94299
|
const _hoisted_19$2 = { class: "cmd-name" };
|
|
94226
94300
|
const _hoisted_20$2 = { class: "cmd-desc" };
|
|
94227
94301
|
const _hoisted_21$2 = { class: "input-row" };
|
|
94228
|
-
const IMAGE_MAX_BYTES = 1 << 20;
|
|
94229
94302
|
const _sfc_main$8 = {
|
|
94230
94303
|
__name: "ChatPanel",
|
|
94231
94304
|
setup(__props) {
|
|
@@ -94246,6 +94319,16 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
94246
94319
|
const inputText = /* @__PURE__ */ ref("");
|
|
94247
94320
|
const fileInputRef = /* @__PURE__ */ ref(null);
|
|
94248
94321
|
const uploading = /* @__PURE__ */ ref(false);
|
|
94322
|
+
const sysStyle = /* @__PURE__ */ ref("block");
|
|
94323
|
+
try {
|
|
94324
|
+
sysStyle.value = localStorage.getItem("xechat_sys_msg_style") || "block";
|
|
94325
|
+
} catch (e) {
|
|
94326
|
+
}
|
|
94327
|
+
if (typeof window !== "undefined") {
|
|
94328
|
+
window.addEventListener("xechat:sys-style-changed", function(e) {
|
|
94329
|
+
sysStyle.value = (e && e.detail) === "inline" ? "inline" : "block";
|
|
94330
|
+
});
|
|
94331
|
+
}
|
|
94249
94332
|
const ctxMenu = /* @__PURE__ */ ref({ show: false, x: 0, y: 0, link: "", selection: "" });
|
|
94250
94333
|
const histIndex = /* @__PURE__ */ ref(-1);
|
|
94251
94334
|
const histDraft = /* @__PURE__ */ ref("");
|
|
@@ -94980,24 +95063,60 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
94980
95063
|
}
|
|
94981
95064
|
}
|
|
94982
95065
|
}
|
|
95066
|
+
function compressImage(file, maxEdge, quality) {
|
|
95067
|
+
return new Promise(function(resolve2, reject) {
|
|
95068
|
+
const img = new Image();
|
|
95069
|
+
const url = URL.createObjectURL(file);
|
|
95070
|
+
img.onload = function() {
|
|
95071
|
+
URL.revokeObjectURL(url);
|
|
95072
|
+
let w2 = img.naturalWidth;
|
|
95073
|
+
let h2 = img.naturalHeight;
|
|
95074
|
+
const scale = Math.min(1, maxEdge / Math.max(w2, h2));
|
|
95075
|
+
w2 = Math.max(1, Math.round(w2 * scale));
|
|
95076
|
+
h2 = Math.max(1, Math.round(h2 * scale));
|
|
95077
|
+
const canvas = document.createElement("canvas");
|
|
95078
|
+
canvas.width = w2;
|
|
95079
|
+
canvas.height = h2;
|
|
95080
|
+
canvas.getContext("2d").drawImage(img, 0, 0, w2, h2);
|
|
95081
|
+
canvas.toBlob(function(blob) {
|
|
95082
|
+
if (!blob) return reject(new Error("压缩失败"));
|
|
95083
|
+
const reader = new FileReader();
|
|
95084
|
+
reader.onload = function() {
|
|
95085
|
+
resolve2({ base64: String(reader.result).split(",")[1], type: "jpg", size: blob.size });
|
|
95086
|
+
};
|
|
95087
|
+
reader.onerror = reject;
|
|
95088
|
+
reader.readAsDataURL(blob);
|
|
95089
|
+
}, "image/jpeg", quality);
|
|
95090
|
+
};
|
|
95091
|
+
img.onerror = function() {
|
|
95092
|
+
URL.revokeObjectURL(url);
|
|
95093
|
+
reject(new Error("图片解码失败"));
|
|
95094
|
+
};
|
|
95095
|
+
img.src = url;
|
|
95096
|
+
});
|
|
95097
|
+
}
|
|
94983
95098
|
function uploadImageFile(file) {
|
|
94984
|
-
const
|
|
94985
|
-
if (["png", "jpeg", "jpg", "gif", "bmp"].indexOf(
|
|
94986
|
-
|
|
94987
|
-
console.warn("[xechat] 图片超过 1MB");
|
|
95099
|
+
const type0 = (file.type || "").split("/")[1] || "png";
|
|
95100
|
+
if (["png", "jpeg", "jpg", "gif", "bmp", "webp"].indexOf(type0) < 0) {
|
|
95101
|
+
console.warn("[xechat] 不支持的图片类型:", type0);
|
|
94988
95102
|
return;
|
|
94989
95103
|
}
|
|
94990
|
-
|
|
94991
|
-
|
|
94992
|
-
|
|
94993
|
-
|
|
94994
|
-
|
|
94995
|
-
|
|
95104
|
+
uploading.value = true;
|
|
95105
|
+
compressImage(file, 2048, 0.85).then(function(out) {
|
|
95106
|
+
if (out.size > 8 * 1024 * 1024) {
|
|
95107
|
+
console.warn("[xechat] 压缩后仍超过上限:", out.size);
|
|
95108
|
+
uploading.value = false;
|
|
95109
|
+
return;
|
|
95110
|
+
}
|
|
95111
|
+
const ok = transport.uploadImage(out.base64, out.type);
|
|
94996
95112
|
setTimeout(function() {
|
|
94997
95113
|
uploading.value = false;
|
|
94998
95114
|
}, ok ? 4e3 : 0);
|
|
94999
|
-
|
|
95000
|
-
|
|
95115
|
+
if (!ok) console.warn("[xechat] 当前端不支持发送图片");
|
|
95116
|
+
}).catch(function(e) {
|
|
95117
|
+
console.warn("[xechat] 图片处理失败:", e && e.message);
|
|
95118
|
+
uploading.value = false;
|
|
95119
|
+
});
|
|
95001
95120
|
}
|
|
95002
95121
|
function onContextMenu(e) {
|
|
95003
95122
|
const sel = window.getSelection ? String(window.getSelection() || "") : "";
|
|
@@ -95028,6 +95147,27 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95028
95147
|
ctxMenu.value.show = false;
|
|
95029
95148
|
if (u2) window.open(u2.indexOf("http") === 0 ? u2 : "https://" + u2, "_blank");
|
|
95030
95149
|
}
|
|
95150
|
+
function lastUsername() {
|
|
95151
|
+
try {
|
|
95152
|
+
const raw = localStorage.getItem("xechat_settings_v1");
|
|
95153
|
+
if (raw) {
|
|
95154
|
+
const v2 = JSON.parse(raw);
|
|
95155
|
+
if (v2 && v2.username) return String(v2.username);
|
|
95156
|
+
}
|
|
95157
|
+
} catch (e) {
|
|
95158
|
+
}
|
|
95159
|
+
return localStorage.getItem("xechat_last_username") || "";
|
|
95160
|
+
}
|
|
95161
|
+
function ctxQuickLogin() {
|
|
95162
|
+
ctxMenu.value.show = false;
|
|
95163
|
+
const name = lastUsername();
|
|
95164
|
+
if (!name) {
|
|
95165
|
+
console.warn("[xechat] 没有可用的历史用户名,请先登录一次");
|
|
95166
|
+
return;
|
|
95167
|
+
}
|
|
95168
|
+
inputText.value = "#login " + name + " -s 0";
|
|
95169
|
+
send();
|
|
95170
|
+
}
|
|
95031
95171
|
function ctxCommand(cmd) {
|
|
95032
95172
|
ctxMenu.value.show = false;
|
|
95033
95173
|
inputText.value = cmd;
|
|
@@ -95039,6 +95179,13 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95039
95179
|
console.log("[ChatPanel] send() 触发, text=" + text2.substring(0, 50));
|
|
95040
95180
|
try {
|
|
95041
95181
|
if (text2.startsWith("#")) {
|
|
95182
|
+
const loginMatch = /^#login\s+(\S+)/i.exec(text2);
|
|
95183
|
+
if (loginMatch && loginMatch[1]) {
|
|
95184
|
+
try {
|
|
95185
|
+
localStorage.setItem("xechat_last_username", loginMatch[1]);
|
|
95186
|
+
} catch (e) {
|
|
95187
|
+
}
|
|
95188
|
+
}
|
|
95042
95189
|
const handled = await dispatchChatCommand(text2);
|
|
95043
95190
|
if (!handled) {
|
|
95044
95191
|
console.log("[ChatPanel] → execCommand: " + text2);
|
|
@@ -95126,6 +95273,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95126
95273
|
});
|
|
95127
95274
|
});
|
|
95128
95275
|
return (_ctx, _cache) => {
|
|
95276
|
+
const _component_font = resolveComponent("font");
|
|
95129
95277
|
const _component_el_switch = resolveComponent("el-switch");
|
|
95130
95278
|
const _component_Top = resolveComponent("Top");
|
|
95131
95279
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -95148,17 +95296,40 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95148
95296
|
key: idx,
|
|
95149
95297
|
class: "message-item"
|
|
95150
95298
|
}, [
|
|
95151
|
-
msg.type === "system" ? (openBlock(), createElementBlock("div", {
|
|
95299
|
+
msg.type === "system" && sysStyle.value === "inline" ? (openBlock(), createElementBlock("div", {
|
|
95152
95300
|
key: 0,
|
|
95301
|
+
class: normalizeClass(["system-msg-inline", classifySystemMsg(msg.text)])
|
|
95302
|
+
}, [
|
|
95303
|
+
createVNode(_component_font, { class: "sys-tag" }, {
|
|
95304
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
95305
|
+
createBaseVNode("strong", null, "【系统提示】", -1)
|
|
95306
|
+
])]),
|
|
95307
|
+
_: 1
|
|
95308
|
+
}),
|
|
95309
|
+
unref(hasConsoleTable)(msg.text) ? (openBlock(), createBlock(MarkdownMessage, {
|
|
95310
|
+
key: 0,
|
|
95311
|
+
content: msg.text
|
|
95312
|
+
}, null, 8, ["content"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
95313
|
+
createTextVNode(toDisplayString(stripHtml(msg.text)), 1)
|
|
95314
|
+
], 64))
|
|
95315
|
+
], 2)) : msg.type === "system" ? (openBlock(), createElementBlock("div", {
|
|
95316
|
+
key: 1,
|
|
95153
95317
|
class: normalizeClass(["system-msg-box", classifySystemMsg(msg.text)])
|
|
95154
95318
|
}, [
|
|
95155
95319
|
createBaseVNode("span", _hoisted_1$8, toDisplayString(systemMsgIcon(msg.text)), 1),
|
|
95156
95320
|
createBaseVNode("div", _hoisted_2$8, [
|
|
95157
95321
|
createBaseVNode("div", _hoisted_3$8, toDisplayString(systemMsgTitle(msg.text)), 1),
|
|
95158
|
-
createBaseVNode("div", _hoisted_4$8,
|
|
95322
|
+
createBaseVNode("div", _hoisted_4$8, [
|
|
95323
|
+
unref(hasConsoleTable)(msg.text) ? (openBlock(), createBlock(MarkdownMessage, {
|
|
95324
|
+
key: 0,
|
|
95325
|
+
content: msg.text
|
|
95326
|
+
}, null, 8, ["content"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
95327
|
+
createTextVNode(toDisplayString(stripHtml(msg.text)), 1)
|
|
95328
|
+
], 64))
|
|
95329
|
+
])
|
|
95159
95330
|
])
|
|
95160
95331
|
], 2)) : (openBlock(), createBlock(MarkdownMessage, {
|
|
95161
|
-
key:
|
|
95332
|
+
key: 2,
|
|
95162
95333
|
content: msg.text,
|
|
95163
95334
|
"msg-type": msg.msgType,
|
|
95164
95335
|
"file-name": msg.fileName
|
|
@@ -95305,7 +95476,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95305
95476
|
key: 0,
|
|
95306
95477
|
class: "ctx-menu",
|
|
95307
95478
|
style: normalizeStyle({ left: ctxMenu.value.x + "px", top: ctxMenu.value.y + "px" }),
|
|
95308
|
-
onClick: _cache[
|
|
95479
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
95309
95480
|
}, ["stop"]))
|
|
95310
95481
|
}, [
|
|
95311
95482
|
createBaseVNode("div", {
|
|
@@ -95316,25 +95487,34 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95316
95487
|
class: normalizeClass(["ctx-item", { disabled: !ctxMenu.value.link }]),
|
|
95317
95488
|
onClick: ctxOpenLink
|
|
95318
95489
|
}, "打开链接", 2),
|
|
95319
|
-
_cache[
|
|
95490
|
+
_cache[7] || (_cache[7] = createBaseVNode("div", { class: "ctx-sep" }, null, -1)),
|
|
95491
|
+
createBaseVNode("div", {
|
|
95492
|
+
class: "ctx-item",
|
|
95493
|
+
onClick: _cache[1] || (_cache[1] = ($event) => ctxCommand("#showServer -c"))
|
|
95494
|
+
}, "获取服务器列表(#showServer -c)"),
|
|
95320
95495
|
createBaseVNode("div", {
|
|
95321
95496
|
class: "ctx-item",
|
|
95322
|
-
onClick:
|
|
95497
|
+
onClick: ctxQuickLogin
|
|
95498
|
+
}, "快捷登录(#login 用户名 -s 0)"),
|
|
95499
|
+
_cache[8] || (_cache[8] = createBaseVNode("div", { class: "ctx-sep" }, null, -1)),
|
|
95500
|
+
createBaseVNode("div", {
|
|
95501
|
+
class: "ctx-item",
|
|
95502
|
+
onClick: _cache[2] || (_cache[2] = ($event) => ctxCommand("#help"))
|
|
95323
95503
|
}, "需要帮助(#help)"),
|
|
95324
95504
|
createBaseVNode("div", {
|
|
95325
95505
|
class: "ctx-item",
|
|
95326
|
-
onClick: _cache[
|
|
95506
|
+
onClick: _cache[3] || (_cache[3] = ($event) => ctxCommand("#clean"))
|
|
95327
95507
|
}, "清屏(#clean)"),
|
|
95328
95508
|
createBaseVNode("div", {
|
|
95329
95509
|
class: "ctx-item",
|
|
95330
|
-
onClick: _cache[
|
|
95510
|
+
onClick: _cache[4] || (_cache[4] = ($event) => ctxCommand("#exit"))
|
|
95331
95511
|
}, "退出鱼塘(#exit)")
|
|
95332
95512
|
], 4)) : createCommentVNode("", true)
|
|
95333
95513
|
], 2);
|
|
95334
95514
|
};
|
|
95335
95515
|
}
|
|
95336
95516
|
};
|
|
95337
|
-
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
95517
|
+
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-21629da5"]]);
|
|
95338
95518
|
const PALETTES = {
|
|
95339
95519
|
dark: {
|
|
95340
95520
|
/** iframe 背后的底色:页面加载中/空白时露出的颜色 */
|
|
@@ -100258,44 +100438,50 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100258
100438
|
const StyleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-02c4e5e7"]]);
|
|
100259
100439
|
const _hoisted_1$1 = { class: "settings-panel" };
|
|
100260
100440
|
const _hoisted_2$1 = { class: "settings-body" };
|
|
100261
|
-
const _hoisted_3$1 = {
|
|
100441
|
+
const _hoisted_3$1 = { class: "setting-block" };
|
|
100442
|
+
const _hoisted_4$1 = { class: "setting-inline" };
|
|
100443
|
+
const _hoisted_5$1 = { class: "setting-block" };
|
|
100444
|
+
const _hoisted_6$1 = { class: "setting-inline" };
|
|
100445
|
+
const _hoisted_7 = { class: "inline-hint" };
|
|
100446
|
+
const _hoisted_8 = {
|
|
100262
100447
|
key: 0,
|
|
100263
100448
|
class: "setting-block"
|
|
100264
100449
|
};
|
|
100265
|
-
const
|
|
100266
|
-
const
|
|
100267
|
-
const
|
|
100268
|
-
const
|
|
100269
|
-
const _hoisted_8 = { class: "setting-row" };
|
|
100270
|
-
const _hoisted_9 = { class: "setting-row" };
|
|
100271
|
-
const _hoisted_10 = { class: "setting-row" };
|
|
100272
|
-
const _hoisted_11 = { class: "setting-row" };
|
|
100273
|
-
const _hoisted_12 = { class: "slider-wrap" };
|
|
100450
|
+
const _hoisted_9 = { class: "setting-inline" };
|
|
100451
|
+
const _hoisted_10 = { class: "setting-inline" };
|
|
100452
|
+
const _hoisted_11 = { class: "setting-hint" };
|
|
100453
|
+
const _hoisted_12 = { class: "setting-row" };
|
|
100274
100454
|
const _hoisted_13 = { class: "setting-row" };
|
|
100275
|
-
const _hoisted_14 = { class: "
|
|
100276
|
-
const _hoisted_15 = { class: "
|
|
100455
|
+
const _hoisted_14 = { class: "setting-row" };
|
|
100456
|
+
const _hoisted_15 = { class: "setting-row" };
|
|
100277
100457
|
const _hoisted_16 = { class: "setting-row" };
|
|
100278
100458
|
const _hoisted_17 = { class: "slider-wrap" };
|
|
100279
|
-
const _hoisted_18 = { class: "
|
|
100280
|
-
const _hoisted_19 = { class: "
|
|
100281
|
-
const _hoisted_20 = { class: "
|
|
100282
|
-
const _hoisted_21 =
|
|
100283
|
-
const _hoisted_22 =
|
|
100284
|
-
const _hoisted_23 = {
|
|
100459
|
+
const _hoisted_18 = { class: "setting-row" };
|
|
100460
|
+
const _hoisted_19 = { class: "slider-wrap" };
|
|
100461
|
+
const _hoisted_20 = { class: "slider-value" };
|
|
100462
|
+
const _hoisted_21 = { class: "setting-row" };
|
|
100463
|
+
const _hoisted_22 = { class: "slider-wrap" };
|
|
100464
|
+
const _hoisted_23 = { class: "slider-value" };
|
|
100465
|
+
const _hoisted_24 = { class: "setting-block" };
|
|
100466
|
+
const _hoisted_25 = { class: "shortcut-actions" };
|
|
100467
|
+
const _hoisted_26 = ["onClick"];
|
|
100468
|
+
const _hoisted_27 = ["onClick"];
|
|
100469
|
+
const _hoisted_28 = {
|
|
100285
100470
|
key: 0,
|
|
100286
100471
|
class: "shortcut-hint"
|
|
100287
100472
|
};
|
|
100288
|
-
const
|
|
100289
|
-
const
|
|
100290
|
-
const
|
|
100291
|
-
const
|
|
100292
|
-
const
|
|
100293
|
-
const
|
|
100294
|
-
const
|
|
100473
|
+
const _hoisted_29 = { class: "setting-block" };
|
|
100474
|
+
const _hoisted_30 = { class: "setting-inline" };
|
|
100475
|
+
const _hoisted_31 = { class: "inline-label" };
|
|
100476
|
+
const _hoisted_32 = { class: "setting-inline" };
|
|
100477
|
+
const _hoisted_33 = { class: "inline-label" };
|
|
100478
|
+
const _hoisted_34 = { class: "setting-row" };
|
|
100479
|
+
const _hoisted_35 = {
|
|
100295
100480
|
key: 1,
|
|
100296
100481
|
class: "setting-row"
|
|
100297
100482
|
};
|
|
100298
|
-
const
|
|
100483
|
+
const _hoisted_36 = { style: { "color": "var(--text-secondary)" } };
|
|
100484
|
+
const DEFAULT_RELAY_ORIGIN = "wss://xechat.lesscoding.net";
|
|
100299
100485
|
const DOCK_LAYOUT_KEY = "xechat-dsh:layout";
|
|
100300
100486
|
const DOCK_EVENT_LAYOUT = "xechat-dsh:layout";
|
|
100301
100487
|
const DOCK_EVENT_SET = "xechat-dsh:set-size";
|
|
@@ -100303,6 +100489,40 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100303
100489
|
const _sfc_main$1 = {
|
|
100304
100490
|
__name: "SettingsPanel",
|
|
100305
100491
|
setup(__props) {
|
|
100492
|
+
const sysStyle = /* @__PURE__ */ ref("block");
|
|
100493
|
+
try {
|
|
100494
|
+
sysStyle.value = localStorage.getItem("xechat_sys_msg_style") || "block";
|
|
100495
|
+
} catch (e) {
|
|
100496
|
+
}
|
|
100497
|
+
function setSysStyle(v2) {
|
|
100498
|
+
sysStyle.value = v2 === "inline" ? "inline" : "block";
|
|
100499
|
+
try {
|
|
100500
|
+
localStorage.setItem("xechat_sys_msg_style", sysStyle.value);
|
|
100501
|
+
} catch (e) {
|
|
100502
|
+
}
|
|
100503
|
+
try {
|
|
100504
|
+
window.dispatchEvent(new CustomEvent("xechat:sys-style-changed", { detail: sysStyle.value }));
|
|
100505
|
+
} catch (e) {
|
|
100506
|
+
}
|
|
100507
|
+
}
|
|
100508
|
+
const relayOrigin = DEFAULT_RELAY_ORIGIN;
|
|
100509
|
+
const useRelay = /* @__PURE__ */ ref(true);
|
|
100510
|
+
try {
|
|
100511
|
+
useRelay.value = localStorage.getItem("xechat_dsh_relay_base") !== "";
|
|
100512
|
+
} catch (e) {
|
|
100513
|
+
}
|
|
100514
|
+
function setUseRelay(on2) {
|
|
100515
|
+
useRelay.value = !!on2;
|
|
100516
|
+
try {
|
|
100517
|
+
if (useRelay.value) localStorage.removeItem("xechat_dsh_relay_base");
|
|
100518
|
+
else localStorage.setItem("xechat_dsh_relay_base", "");
|
|
100519
|
+
} catch (e) {
|
|
100520
|
+
}
|
|
100521
|
+
try {
|
|
100522
|
+
window.dispatchEvent(new CustomEvent("xechat:relay-changed", { detail: useRelay.value }));
|
|
100523
|
+
} catch (e) {
|
|
100524
|
+
}
|
|
100525
|
+
}
|
|
100306
100526
|
const settingsStore = useSettingsStore();
|
|
100307
100527
|
const isDsh = typeof window !== "undefined" && (!!window.__XECHAT_DSH_EMBEDDED__ || typeof document !== "undefined" && !!document.querySelector("[data-xechat-dsh]"));
|
|
100308
100528
|
const dockLimits = /* @__PURE__ */ ref({ minWidth: 280, maxWidth: 720, minHeight: 240, maxHeight: 800 });
|
|
@@ -100444,11 +100664,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100444
100664
|
settingsStore.setAdminToken(val || "");
|
|
100445
100665
|
}
|
|
100446
100666
|
return (_ctx, _cache) => {
|
|
100447
|
-
const _component_el_input = resolveComponent("el-input");
|
|
100448
|
-
const _component_el_button = resolveComponent("el-button");
|
|
100449
|
-
const _component_el_switch = resolveComponent("el-switch");
|
|
100450
100667
|
const _component_el_radio_button = resolveComponent("el-radio-button");
|
|
100451
100668
|
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
100669
|
+
const _component_el_switch = resolveComponent("el-switch");
|
|
100670
|
+
const _component_el_input = resolveComponent("el-input");
|
|
100671
|
+
const _component_el_button = resolveComponent("el-button");
|
|
100452
100672
|
const _component_el_slider = resolveComponent("el-slider");
|
|
100453
100673
|
const _component_InfoFilled = resolveComponent("InfoFilled");
|
|
100454
100674
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -100456,57 +100676,101 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100456
100676
|
const _component_el_tag = resolveComponent("el-tag");
|
|
100457
100677
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
100458
100678
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
100459
|
-
_cache[
|
|
100679
|
+
_cache[49] || (_cache[49] = createBaseVNode("div", { class: "panel-header" }, [
|
|
100460
100680
|
createBaseVNode("span", { class: "panel-title" }, "设置")
|
|
100461
100681
|
], -1)),
|
|
100462
100682
|
createBaseVNode("div", _hoisted_2$1, [
|
|
100463
|
-
|
|
100464
|
-
_cache[
|
|
100683
|
+
createBaseVNode("div", _hoisted_3$1, [
|
|
100684
|
+
_cache[17] || (_cache[17] = createBaseVNode("div", { class: "block-title" }, "消息显示", -1)),
|
|
100465
100685
|
createBaseVNode("div", _hoisted_4$1, [
|
|
100466
|
-
_cache[
|
|
100686
|
+
_cache[16] || (_cache[16] = createBaseVNode("div", { class: "inline-label" }, [
|
|
100687
|
+
createBaseVNode("span", null, "系统提示样式")
|
|
100688
|
+
], -1)),
|
|
100689
|
+
createVNode(_component_el_radio_group, {
|
|
100690
|
+
"model-value": sysStyle.value,
|
|
100691
|
+
size: "small",
|
|
100692
|
+
onChange: _cache[0] || (_cache[0] = (v2) => setSysStyle(v2))
|
|
100693
|
+
}, {
|
|
100694
|
+
default: withCtx(() => [
|
|
100695
|
+
createVNode(_component_el_radio_button, { value: "block" }, {
|
|
100696
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [
|
|
100697
|
+
createTextVNode("卡片块", -1)
|
|
100698
|
+
])]),
|
|
100699
|
+
_: 1
|
|
100700
|
+
}),
|
|
100701
|
+
createVNode(_component_el_radio_button, { value: "inline" }, {
|
|
100702
|
+
default: withCtx(() => [..._cache[15] || (_cache[15] = [
|
|
100703
|
+
createTextVNode("行内【系统提示】", -1)
|
|
100704
|
+
])]),
|
|
100705
|
+
_: 1
|
|
100706
|
+
})
|
|
100707
|
+
]),
|
|
100708
|
+
_: 1
|
|
100709
|
+
}, 8, ["model-value"])
|
|
100710
|
+
])
|
|
100711
|
+
]),
|
|
100712
|
+
createBaseVNode("div", _hoisted_5$1, [
|
|
100713
|
+
_cache[19] || (_cache[19] = createBaseVNode("div", { class: "block-title" }, "网络连接", -1)),
|
|
100714
|
+
createBaseVNode("div", _hoisted_6$1, [
|
|
100715
|
+
_cache[18] || (_cache[18] = createBaseVNode("div", { class: "inline-label" }, [
|
|
100716
|
+
createBaseVNode("span", null, "经中继连接(推荐)")
|
|
100717
|
+
], -1)),
|
|
100718
|
+
createVNode(_component_el_switch, {
|
|
100719
|
+
"model-value": useRelay.value,
|
|
100720
|
+
onChange: _cache[1] || (_cache[1] = (v2) => setUseRelay(v2)),
|
|
100721
|
+
"active-text": "开",
|
|
100722
|
+
"inactive-text": "关"
|
|
100723
|
+
}, null, 8, ["model-value"])
|
|
100724
|
+
]),
|
|
100725
|
+
createBaseVNode("div", _hoisted_7, " 开启后经 " + toDisplayString(unref(relayOrigin)) + " 转发,可发大图;关闭则直连目标鱼塘(64KB 单帧的塘发图会断开)。下次登录生效。 ", 1)
|
|
100726
|
+
]),
|
|
100727
|
+
unref(isDsh) ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
100728
|
+
_cache[26] || (_cache[26] = createBaseVNode("div", { class: "block-title" }, "面板尺寸", -1)),
|
|
100729
|
+
createBaseVNode("div", _hoisted_9, [
|
|
100730
|
+
_cache[20] || (_cache[20] = createBaseVNode("div", { class: "inline-label" }, [
|
|
100467
100731
|
createBaseVNode("span", null, "宽度 (px)")
|
|
100468
100732
|
], -1)),
|
|
100469
100733
|
createVNode(_component_el_input, {
|
|
100470
100734
|
modelValue: dockWidthDraft.value,
|
|
100471
|
-
"onUpdate:modelValue": _cache[
|
|
100735
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dockWidthDraft.value = $event),
|
|
100472
100736
|
type: "number",
|
|
100473
100737
|
min: dockLimits.value.minWidth,
|
|
100474
100738
|
max: dockLimits.value.maxWidth,
|
|
100475
100739
|
placeholder: "380",
|
|
100476
|
-
onFocus: _cache[
|
|
100740
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => dockEditing.value = true),
|
|
100477
100741
|
onBlur: onDockInputBlur,
|
|
100478
100742
|
onChange: applyDockSize,
|
|
100479
100743
|
onKeyup: withKeys(applyDockSize, ["enter"])
|
|
100480
100744
|
}, null, 8, ["modelValue", "min", "max"])
|
|
100481
100745
|
]),
|
|
100482
|
-
createBaseVNode("div",
|
|
100483
|
-
_cache[
|
|
100746
|
+
createBaseVNode("div", _hoisted_10, [
|
|
100747
|
+
_cache[21] || (_cache[21] = createBaseVNode("div", { class: "inline-label" }, [
|
|
100484
100748
|
createBaseVNode("span", null, "高度 (px)")
|
|
100485
100749
|
], -1)),
|
|
100486
100750
|
createVNode(_component_el_input, {
|
|
100487
100751
|
modelValue: dockHeightDraft.value,
|
|
100488
|
-
"onUpdate:modelValue": _cache[
|
|
100752
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => dockHeightDraft.value = $event),
|
|
100489
100753
|
type: "number",
|
|
100490
100754
|
min: dockLimits.value.minHeight,
|
|
100491
100755
|
max: dockLimits.value.maxHeight,
|
|
100492
100756
|
placeholder: "留空 = 铺满",
|
|
100493
|
-
onFocus: _cache[
|
|
100757
|
+
onFocus: _cache[5] || (_cache[5] = ($event) => dockEditing.value = true),
|
|
100494
100758
|
onBlur: onDockInputBlur,
|
|
100495
100759
|
onChange: applyDockSize,
|
|
100496
100760
|
onKeyup: withKeys(applyDockSize, ["enter"])
|
|
100497
100761
|
}, null, 8, ["modelValue", "min", "max"])
|
|
100498
100762
|
]),
|
|
100499
|
-
createBaseVNode("div",
|
|
100763
|
+
createBaseVNode("div", _hoisted_11, [
|
|
100500
100764
|
createTextVNode(" 宽度 " + toDisplayString(dockLimits.value.minWidth) + "–" + toDisplayString(dockLimits.value.maxWidth) + " px,高度 " + toDisplayString(dockLimits.value.minHeight) + "–" + toDisplayString(dockLimits.value.maxHeight) + " px; 高度留空表示铺满窗口。回车或失焦立即生效。", 1),
|
|
100501
|
-
_cache[
|
|
100502
|
-
_cache[
|
|
100765
|
+
_cache[22] || (_cache[22] = createBaseVNode("br", null, null, -1)),
|
|
100766
|
+
_cache[23] || (_cache[23] = createTextVNode(" 也可以拖动面板左边缘(调宽)、上边缘或下边缘(调高)的拖拽条。 ", -1))
|
|
100503
100767
|
]),
|
|
100504
|
-
createBaseVNode("div",
|
|
100768
|
+
createBaseVNode("div", _hoisted_12, [
|
|
100505
100769
|
createVNode(_component_el_button, {
|
|
100506
100770
|
size: "small",
|
|
100507
100771
|
onClick: resetDockSize
|
|
100508
100772
|
}, {
|
|
100509
|
-
default: withCtx(() => [..._cache[
|
|
100773
|
+
default: withCtx(() => [..._cache[24] || (_cache[24] = [
|
|
100510
100774
|
createTextVNode("恢复默认", -1)
|
|
100511
100775
|
])]),
|
|
100512
100776
|
_: 1
|
|
@@ -100515,63 +100779,63 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100515
100779
|
size: "small",
|
|
100516
100780
|
onClick: openDockSizePanel
|
|
100517
100781
|
}, {
|
|
100518
|
-
default: withCtx(() => [..._cache[
|
|
100782
|
+
default: withCtx(() => [..._cache[25] || (_cache[25] = [
|
|
100519
100783
|
createTextVNode("在侧栏打开尺寸浮层", -1)
|
|
100520
100784
|
])]),
|
|
100521
100785
|
_: 1
|
|
100522
100786
|
})
|
|
100523
100787
|
])
|
|
100524
100788
|
])) : createCommentVNode("", true),
|
|
100525
|
-
createBaseVNode("div",
|
|
100526
|
-
_cache[
|
|
100789
|
+
createBaseVNode("div", _hoisted_13, [
|
|
100790
|
+
_cache[27] || (_cache[27] = createBaseVNode("span", null, "主题", -1)),
|
|
100527
100791
|
createVNode(_component_el_switch, {
|
|
100528
100792
|
"model-value": unref(isDark),
|
|
100529
|
-
onChange: _cache[
|
|
100793
|
+
onChange: _cache[6] || (_cache[6] = ($event) => unref(toggleTheme)()),
|
|
100530
100794
|
"active-text": "暗色",
|
|
100531
100795
|
"inactive-text": "亮色"
|
|
100532
100796
|
}, null, 8, ["model-value"])
|
|
100533
100797
|
]),
|
|
100534
|
-
createBaseVNode("div",
|
|
100535
|
-
_cache[
|
|
100798
|
+
createBaseVNode("div", _hoisted_14, [
|
|
100799
|
+
_cache[29] || (_cache[29] = createBaseVNode("span", null, "文字样式", -1)),
|
|
100536
100800
|
createVNode(_component_el_button, {
|
|
100537
100801
|
size: "small",
|
|
100538
|
-
onClick: _cache[
|
|
100802
|
+
onClick: _cache[7] || (_cache[7] = ($event) => unref(state).currentRoute = "style-editor")
|
|
100539
100803
|
}, {
|
|
100540
|
-
default: withCtx(() => [..._cache[
|
|
100804
|
+
default: withCtx(() => [..._cache[28] || (_cache[28] = [
|
|
100541
100805
|
createTextVNode(" 管理 ", -1)
|
|
100542
100806
|
])]),
|
|
100543
100807
|
_: 1
|
|
100544
100808
|
})
|
|
100545
100809
|
]),
|
|
100546
|
-
createBaseVNode("div",
|
|
100547
|
-
_cache[
|
|
100810
|
+
createBaseVNode("div", _hoisted_15, [
|
|
100811
|
+
_cache[34] || (_cache[34] = createBaseVNode("span", null, "浏览器配色", -1)),
|
|
100548
100812
|
createVNode(_component_el_radio_group, {
|
|
100549
100813
|
modelValue: browserTheme.value,
|
|
100550
|
-
"onUpdate:modelValue": _cache[
|
|
100814
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => browserTheme.value = $event),
|
|
100551
100815
|
size: "small",
|
|
100552
100816
|
onChange: onBrowserThemeChange
|
|
100553
100817
|
}, {
|
|
100554
100818
|
default: withCtx(() => [
|
|
100555
100819
|
createVNode(_component_el_radio_button, { value: "auto" }, {
|
|
100556
|
-
default: withCtx(() => [..._cache[
|
|
100820
|
+
default: withCtx(() => [..._cache[30] || (_cache[30] = [
|
|
100557
100821
|
createTextVNode("跟随主题", -1)
|
|
100558
100822
|
])]),
|
|
100559
100823
|
_: 1
|
|
100560
100824
|
}),
|
|
100561
100825
|
createVNode(_component_el_radio_button, { value: "dark" }, {
|
|
100562
|
-
default: withCtx(() => [..._cache[
|
|
100826
|
+
default: withCtx(() => [..._cache[31] || (_cache[31] = [
|
|
100563
100827
|
createTextVNode("深色", -1)
|
|
100564
100828
|
])]),
|
|
100565
100829
|
_: 1
|
|
100566
100830
|
}),
|
|
100567
100831
|
createVNode(_component_el_radio_button, { value: "light" }, {
|
|
100568
|
-
default: withCtx(() => [..._cache[
|
|
100832
|
+
default: withCtx(() => [..._cache[32] || (_cache[32] = [
|
|
100569
100833
|
createTextVNode("浅色", -1)
|
|
100570
100834
|
])]),
|
|
100571
100835
|
_: 1
|
|
100572
100836
|
}),
|
|
100573
100837
|
createVNode(_component_el_radio_button, { value: "off" }, {
|
|
100574
|
-
default: withCtx(() => [..._cache[
|
|
100838
|
+
default: withCtx(() => [..._cache[33] || (_cache[33] = [
|
|
100575
100839
|
createTextVNode("不做处理", -1)
|
|
100576
100840
|
])]),
|
|
100577
100841
|
_: 1
|
|
@@ -100580,12 +100844,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100580
100844
|
_: 1
|
|
100581
100845
|
}, 8, ["modelValue"])
|
|
100582
100846
|
]),
|
|
100583
|
-
createBaseVNode("div",
|
|
100584
|
-
_cache[
|
|
100585
|
-
createBaseVNode("div",
|
|
100847
|
+
createBaseVNode("div", _hoisted_16, [
|
|
100848
|
+
_cache[35] || (_cache[35] = createBaseVNode("span", null, "网页降亮", -1)),
|
|
100849
|
+
createBaseVNode("div", _hoisted_17, [
|
|
100586
100850
|
createVNode(_component_el_slider, {
|
|
100587
100851
|
modelValue: browserDim.value,
|
|
100588
|
-
"onUpdate:modelValue": _cache[
|
|
100852
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => browserDim.value = $event),
|
|
100589
100853
|
min: 0,
|
|
100590
100854
|
max: 0.6,
|
|
100591
100855
|
step: 0.05,
|
|
@@ -100593,70 +100857,70 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100593
100857
|
}, null, 8, ["modelValue", "format-tooltip"])
|
|
100594
100858
|
])
|
|
100595
100859
|
]),
|
|
100596
|
-
_cache[
|
|
100597
|
-
createBaseVNode("div",
|
|
100598
|
-
_cache[
|
|
100599
|
-
createBaseVNode("div",
|
|
100860
|
+
_cache[48] || (_cache[48] = createBaseVNode("div", { class: "setting-hint" }, " 内置浏览器是 iframe,跨源站点受同源策略保护,插件无法改写其内部元素, 因此这里只能给容器着色并加一层降亮遮罩,无法像 DarkReader 那样逐元素反色。 ", -1)),
|
|
100861
|
+
createBaseVNode("div", _hoisted_18, [
|
|
100862
|
+
_cache[36] || (_cache[36] = createBaseVNode("span", null, "插件透明度", -1)),
|
|
100863
|
+
createBaseVNode("div", _hoisted_19, [
|
|
100600
100864
|
createVNode(_component_el_slider, {
|
|
100601
100865
|
modelValue: pluginOpacity.value,
|
|
100602
|
-
"onUpdate:modelValue": _cache[
|
|
100866
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => pluginOpacity.value = $event),
|
|
100603
100867
|
min: 0,
|
|
100604
100868
|
max: 1,
|
|
100605
100869
|
step: 0.05,
|
|
100606
100870
|
"format-tooltip": (v2) => Math.round(v2 * 100) + "%",
|
|
100607
100871
|
style: { "width": "130px" }
|
|
100608
100872
|
}, null, 8, ["modelValue", "format-tooltip"]),
|
|
100609
|
-
createBaseVNode("span",
|
|
100873
|
+
createBaseVNode("span", _hoisted_20, toDisplayString(Math.round(pluginOpacity.value * 100)) + "%", 1)
|
|
100610
100874
|
])
|
|
100611
100875
|
]),
|
|
100612
|
-
createBaseVNode("div",
|
|
100613
|
-
_cache[
|
|
100614
|
-
createBaseVNode("div",
|
|
100876
|
+
createBaseVNode("div", _hoisted_21, [
|
|
100877
|
+
_cache[37] || (_cache[37] = createBaseVNode("span", null, "游戏面板透明度", -1)),
|
|
100878
|
+
createBaseVNode("div", _hoisted_22, [
|
|
100615
100879
|
createVNode(_component_el_slider, {
|
|
100616
100880
|
modelValue: gamePanelOpacity.value,
|
|
100617
|
-
"onUpdate:modelValue": _cache[
|
|
100881
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => gamePanelOpacity.value = $event),
|
|
100618
100882
|
min: 0.1,
|
|
100619
100883
|
max: 1,
|
|
100620
100884
|
step: 0.05,
|
|
100621
100885
|
"format-tooltip": (v2) => Math.round(v2 * 100) + "%",
|
|
100622
100886
|
style: { "width": "130px" }
|
|
100623
100887
|
}, null, 8, ["modelValue", "format-tooltip"]),
|
|
100624
|
-
createBaseVNode("span",
|
|
100888
|
+
createBaseVNode("span", _hoisted_23, toDisplayString(Math.round(gamePanelOpacity.value * 100)) + "%", 1)
|
|
100625
100889
|
]),
|
|
100626
|
-
_cache[
|
|
100890
|
+
_cache[38] || (_cache[38] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px", "width": "100%", "text-align": "right" } }, " 游戏播放时面板透明度 ", -1))
|
|
100627
100891
|
]),
|
|
100628
|
-
createBaseVNode("div",
|
|
100629
|
-
_cache[
|
|
100892
|
+
createBaseVNode("div", _hoisted_24, [
|
|
100893
|
+
_cache[39] || (_cache[39] = createBaseVNode("div", { class: "block-title" }, "快捷键", -1)),
|
|
100630
100894
|
(openBlock(), createElementBlock(Fragment, null, renderList(shortcutItems, (item) => {
|
|
100631
100895
|
return createBaseVNode("div", {
|
|
100632
100896
|
key: item.type,
|
|
100633
100897
|
class: "shortcut-row"
|
|
100634
100898
|
}, [
|
|
100635
100899
|
createBaseVNode("span", null, toDisplayString(item.label), 1),
|
|
100636
|
-
createBaseVNode("div",
|
|
100900
|
+
createBaseVNode("div", _hoisted_25, [
|
|
100637
100901
|
createBaseVNode("button", {
|
|
100638
100902
|
class: normalizeClass(["shortcut-btn", { recording: recordingShortcut.value === item.type }]),
|
|
100639
100903
|
onClick: ($event) => startRecording(item.type)
|
|
100640
|
-
}, toDisplayString(recordingShortcut.value === item.type ? "按下新组合键..." : unref(formatShortcut)(unref(settingsStore)[item.getter])), 11,
|
|
100904
|
+
}, toDisplayString(recordingShortcut.value === item.type ? "按下新组合键..." : unref(formatShortcut)(unref(settingsStore)[item.getter])), 11, _hoisted_26),
|
|
100641
100905
|
createBaseVNode("button", {
|
|
100642
100906
|
class: "shortcut-reset",
|
|
100643
100907
|
title: "恢复默认",
|
|
100644
100908
|
onClick: ($event) => unref(settingsStore)[item.setter](DEFAULT_SHORTCUTS[item.type])
|
|
100645
|
-
}, "默认", 8,
|
|
100909
|
+
}, "默认", 8, _hoisted_27)
|
|
100646
100910
|
])
|
|
100647
100911
|
]);
|
|
100648
100912
|
}), 64)),
|
|
100649
|
-
recordingShortcut.value ? (openBlock(), createElementBlock("div",
|
|
100913
|
+
recordingShortcut.value ? (openBlock(), createElementBlock("div", _hoisted_28, " 请按下新的组合键(建议 Ctrl+Alt+主键,避免使用 Shift 以免键位漂移),按 Esc 取消 ")) : createCommentVNode("", true)
|
|
100650
100914
|
]),
|
|
100651
|
-
createBaseVNode("div",
|
|
100652
|
-
createBaseVNode("div",
|
|
100653
|
-
createBaseVNode("div",
|
|
100654
|
-
_cache[
|
|
100915
|
+
createBaseVNode("div", _hoisted_29, [
|
|
100916
|
+
createBaseVNode("div", _hoisted_30, [
|
|
100917
|
+
createBaseVNode("div", _hoisted_31, [
|
|
100918
|
+
_cache[41] || (_cache[41] = createBaseVNode("span", null, "紧急模式", -1)),
|
|
100655
100919
|
createVNode(_component_el_tooltip, {
|
|
100656
100920
|
placement: "top",
|
|
100657
100921
|
effect: "dark"
|
|
100658
100922
|
}, {
|
|
100659
|
-
content: withCtx(() => [..._cache[
|
|
100923
|
+
content: withCtx(() => [..._cache[40] || (_cache[40] = [
|
|
100660
100924
|
createTextVNode(" 按下快捷键全屏显示伪装内容(图片或网页),再按一次恢复摸鱼页面", -1),
|
|
100661
100925
|
createBaseVNode("br", null, null, -1),
|
|
100662
100926
|
createTextVNode(" 以 .png/.jpg/.gif/.webp 等图片扩展名结尾的地址按图片展示,其余按网页加载 ", -1)
|
|
@@ -100674,20 +100938,20 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100674
100938
|
]),
|
|
100675
100939
|
createVNode(_component_el_input, {
|
|
100676
100940
|
modelValue: localPanicUrl.value,
|
|
100677
|
-
"onUpdate:modelValue": _cache[
|
|
100941
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => localPanicUrl.value = $event),
|
|
100678
100942
|
placeholder: "图片 URL / 网页地址",
|
|
100679
100943
|
clearable: "",
|
|
100680
100944
|
onChange: onPanicUrlChange
|
|
100681
100945
|
}, null, 8, ["modelValue"])
|
|
100682
100946
|
]),
|
|
100683
|
-
createBaseVNode("div",
|
|
100684
|
-
createBaseVNode("div",
|
|
100685
|
-
_cache[
|
|
100947
|
+
createBaseVNode("div", _hoisted_32, [
|
|
100948
|
+
createBaseVNode("div", _hoisted_33, [
|
|
100949
|
+
_cache[43] || (_cache[43] = createBaseVNode("span", null, "管理员 Token", -1)),
|
|
100686
100950
|
createVNode(_component_el_tooltip, {
|
|
100687
100951
|
placement: "top",
|
|
100688
100952
|
effect: "dark"
|
|
100689
100953
|
}, {
|
|
100690
|
-
content: withCtx(() => [..._cache[
|
|
100954
|
+
content: withCtx(() => [..._cache[42] || (_cache[42] = [
|
|
100691
100955
|
createTextVNode(" 与服务端 application.yml 的 token 一致时,登录后获得管理员权限", -1),
|
|
100692
100956
|
createBaseVNode("br", null, null, -1),
|
|
100693
100957
|
createTextVNode(" 登录时随 LOGIN 帧上报;修改后需重新登录(#login)生效 ", -1)
|
|
@@ -100705,7 +100969,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100705
100969
|
]),
|
|
100706
100970
|
createVNode(_component_el_input, {
|
|
100707
100971
|
modelValue: localAdminToken.value,
|
|
100708
|
-
"onUpdate:modelValue": _cache[
|
|
100972
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => localAdminToken.value = $event),
|
|
100709
100973
|
type: "password",
|
|
100710
100974
|
"show-password": "",
|
|
100711
100975
|
clearable: "",
|
|
@@ -100720,17 +100984,17 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100720
100984
|
type: "success",
|
|
100721
100985
|
size: "small"
|
|
100722
100986
|
}, {
|
|
100723
|
-
default: withCtx(() => [..._cache[
|
|
100987
|
+
default: withCtx(() => [..._cache[44] || (_cache[44] = [
|
|
100724
100988
|
createTextVNode("WebSocket", -1)
|
|
100725
100989
|
])]),
|
|
100726
100990
|
_: 1
|
|
100727
100991
|
}),
|
|
100728
|
-
_cache[
|
|
100992
|
+
_cache[45] || (_cache[45] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px" } }, " xechat-dsh 仅支持 WebSocket,服务端地址由 #login 指定 ", -1))
|
|
100729
100993
|
]),
|
|
100730
100994
|
_: 1
|
|
100731
100995
|
}),
|
|
100732
|
-
createBaseVNode("div",
|
|
100733
|
-
_cache[
|
|
100996
|
+
createBaseVNode("div", _hoisted_34, [
|
|
100997
|
+
_cache[46] || (_cache[46] = createBaseVNode("span", null, "在线状态", -1)),
|
|
100734
100998
|
createVNode(_component_el_tag, {
|
|
100735
100999
|
type: unref(state).online ? "success" : "info",
|
|
100736
101000
|
size: "small"
|
|
@@ -100741,16 +101005,16 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100741
101005
|
_: 1
|
|
100742
101006
|
}, 8, ["type"])
|
|
100743
101007
|
]),
|
|
100744
|
-
unref(state).username ? (openBlock(), createElementBlock("div",
|
|
100745
|
-
_cache[
|
|
100746
|
-
createBaseVNode("span",
|
|
101008
|
+
unref(state).username ? (openBlock(), createElementBlock("div", _hoisted_35, [
|
|
101009
|
+
_cache[47] || (_cache[47] = createBaseVNode("span", null, "用户名", -1)),
|
|
101010
|
+
createBaseVNode("span", _hoisted_36, toDisplayString(unref(state).username), 1)
|
|
100747
101011
|
])) : createCommentVNode("", true)
|
|
100748
101012
|
])
|
|
100749
101013
|
]);
|
|
100750
101014
|
};
|
|
100751
101015
|
}
|
|
100752
101016
|
};
|
|
100753
|
-
const SettingsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
101017
|
+
const SettingsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-83d3f6d8"]]);
|
|
100754
101018
|
const _hoisted_1 = { class: "nav-buttons" };
|
|
100755
101019
|
const _hoisted_2 = { class: "nav-bottom" };
|
|
100756
101020
|
const _hoisted_3 = {
|