xechat-dsh 0.2.2 → 0.2.3

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/xechat-app.js CHANGED
@@ -74264,13 +74264,17 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74264
74264
  on("history", (data) => {
74265
74265
  const msgList = data.msgList || [];
74266
74266
  if (!msgList.length) return;
74267
+ const firstUserMsg = msgList.find((x2) => x2 && x2.type === "USER");
74268
+ console.info(
74269
+ "[xechat-dsh][history] 共 " + msgList.length + " 条,首条用户帧 user=" + (firstUserMsg ? firstUserMsg.user ? "ok" : "missing" : "none")
74270
+ );
74267
74271
  const parsed = [];
74268
74272
  for (let i = 0; i < msgList.length; i++) {
74269
74273
  const item = msgList[i];
74270
74274
  if (item.type === "SYSTEM") {
74271
74275
  parsed.push({ text: stripSystemNullTag(item.body || ""), type: "system" });
74272
74276
  } else if (item.type === "USER") {
74273
- const userObj = item.body && item.body.user;
74277
+ const userObj = item.user || item.body && item.body.user;
74274
74278
  const maskStore = useMaskStore();
74275
74279
  const hit = maskStore.masked(userObj);
74276
74280
  if (hit) {
@@ -74282,7 +74286,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74282
74286
  }
74283
74287
  const head = _formatUserMessageHead({
74284
74288
  time: item.time,
74285
- user: item.body && item.body.user
74289
+ user: userObj
74286
74290
  });
74287
74291
  const hText = item.body && item.body.content || "";
74288
74292
  const isImageMsg = item.body && item.body.msgType && String(item.body.msgType).toUpperCase() === "IMAGE";
@@ -101668,40 +101672,104 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101668
101672
  const StyleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-02c4e5e7"]]);
101669
101673
  const _hoisted_1$1 = { class: "settings-panel" };
101670
101674
  const _hoisted_2$1 = { class: "settings-body" };
101671
- const _hoisted_3$1 = { class: "setting-row" };
101672
- const _hoisted_4$1 = { class: "setting-row" };
101673
- const _hoisted_5$1 = { class: "setting-row" };
101674
- const _hoisted_6 = { class: "setting-row" };
101675
- const _hoisted_7 = { class: "slider-wrap" };
101675
+ const _hoisted_3$1 = {
101676
+ key: 0,
101677
+ class: "setting-block"
101678
+ };
101679
+ const _hoisted_4$1 = { class: "setting-inline" };
101680
+ const _hoisted_5$1 = { class: "setting-inline" };
101681
+ const _hoisted_6 = { class: "setting-hint" };
101682
+ const _hoisted_7 = { class: "setting-row" };
101676
101683
  const _hoisted_8 = { class: "setting-row" };
101677
- const _hoisted_9 = { class: "slider-wrap" };
101678
- const _hoisted_10 = { class: "slider-value" };
101684
+ const _hoisted_9 = { class: "setting-row" };
101685
+ const _hoisted_10 = { class: "setting-row" };
101679
101686
  const _hoisted_11 = { class: "setting-row" };
101680
101687
  const _hoisted_12 = { class: "slider-wrap" };
101681
- const _hoisted_13 = { class: "slider-value" };
101682
- const _hoisted_14 = { class: "setting-block" };
101683
- const _hoisted_15 = { class: "shortcut-actions" };
101684
- const _hoisted_16 = ["onClick"];
101685
- const _hoisted_17 = ["onClick"];
101686
- const _hoisted_18 = {
101688
+ const _hoisted_13 = { class: "setting-row" };
101689
+ const _hoisted_14 = { class: "slider-wrap" };
101690
+ const _hoisted_15 = { class: "slider-value" };
101691
+ const _hoisted_16 = { class: "setting-row" };
101692
+ const _hoisted_17 = { class: "slider-wrap" };
101693
+ const _hoisted_18 = { class: "slider-value" };
101694
+ const _hoisted_19 = { class: "setting-block" };
101695
+ const _hoisted_20 = { class: "shortcut-actions" };
101696
+ const _hoisted_21 = ["onClick"];
101697
+ const _hoisted_22 = ["onClick"];
101698
+ const _hoisted_23 = {
101687
101699
  key: 0,
101688
101700
  class: "shortcut-hint"
101689
101701
  };
101690
- const _hoisted_19 = { class: "setting-block" };
101691
- const _hoisted_20 = { class: "setting-inline" };
101692
- const _hoisted_21 = { class: "inline-label" };
101693
- const _hoisted_22 = { class: "setting-inline" };
101694
- const _hoisted_23 = { class: "inline-label" };
101695
- const _hoisted_24 = { class: "setting-row" };
101696
- const _hoisted_25 = {
101697
- key: 0,
101702
+ const _hoisted_24 = { class: "setting-block" };
101703
+ const _hoisted_25 = { class: "setting-inline" };
101704
+ const _hoisted_26 = { class: "inline-label" };
101705
+ const _hoisted_27 = { class: "setting-inline" };
101706
+ const _hoisted_28 = { class: "inline-label" };
101707
+ const _hoisted_29 = { class: "setting-row" };
101708
+ const _hoisted_30 = {
101709
+ key: 1,
101698
101710
  class: "setting-row"
101699
101711
  };
101700
- const _hoisted_26 = { style: { "color": "var(--text-secondary)" } };
101712
+ const _hoisted_31 = { style: { "color": "var(--text-secondary)" } };
101713
+ const DOCK_LAYOUT_KEY = "xechat-dsh:layout";
101714
+ const DOCK_EVENT_LAYOUT = "xechat-dsh:layout";
101715
+ const DOCK_EVENT_SET = "xechat-dsh:set-size";
101716
+ const DOCK_EVENT_OPEN = "xechat-dsh:open-size-settings";
101701
101717
  const _sfc_main$1 = {
101702
101718
  __name: "SettingsPanel",
101703
101719
  setup(__props) {
101704
101720
  const settingsStore = useSettingsStore();
101721
+ const isDsh = typeof window !== "undefined" && (!!window.__XECHAT_DSH_EMBEDDED__ || typeof document !== "undefined" && !!document.querySelector("[data-xechat-dsh]"));
101722
+ const dockLimits = /* @__PURE__ */ ref({ minWidth: 280, maxWidth: 720, minHeight: 240, maxHeight: 800 });
101723
+ const dockWidthDraft = /* @__PURE__ */ ref("380");
101724
+ const dockHeightDraft = /* @__PURE__ */ ref("");
101725
+ const dockEditing = /* @__PURE__ */ ref(false);
101726
+ function onDockLayoutEvent(e) {
101727
+ const d2 = e && e.detail;
101728
+ if (!d2) return;
101729
+ if (typeof d2.minWidth === "number") {
101730
+ dockLimits.value = {
101731
+ minWidth: d2.minWidth,
101732
+ maxWidth: d2.maxWidth,
101733
+ minHeight: d2.minHeight,
101734
+ maxHeight: d2.maxHeight
101735
+ };
101736
+ }
101737
+ if (dockEditing.value) return;
101738
+ if (typeof d2.width === "number") dockWidthDraft.value = String(d2.width);
101739
+ dockHeightDraft.value = d2.height === null || d2.height === void 0 ? "" : String(d2.height);
101740
+ }
101741
+ function onDockInputBlur() {
101742
+ dockEditing.value = false;
101743
+ applyDockSize();
101744
+ }
101745
+ function applyDockSize() {
101746
+ const w2 = String(dockWidthDraft.value).trim();
101747
+ const h2 = String(dockHeightDraft.value).trim();
101748
+ window.dispatchEvent(new CustomEvent(DOCK_EVENT_SET, {
101749
+ detail: {
101750
+ width: w2 === "" ? void 0 : Number(w2),
101751
+ height: h2 === "" ? null : Number(h2)
101752
+ }
101753
+ }));
101754
+ }
101755
+ function resetDockSize() {
101756
+ dockWidthDraft.value = "380";
101757
+ dockHeightDraft.value = "";
101758
+ window.dispatchEvent(new CustomEvent(DOCK_EVENT_SET, { detail: { width: 380, height: null } }));
101759
+ }
101760
+ function openDockSizePanel() {
101761
+ window.dispatchEvent(new CustomEvent(DOCK_EVENT_OPEN));
101762
+ }
101763
+ function readDockLayoutFromStorage() {
101764
+ try {
101765
+ const raw = localStorage.getItem(DOCK_LAYOUT_KEY);
101766
+ if (!raw) return;
101767
+ const l2 = JSON.parse(raw);
101768
+ if (typeof l2.width === "number") dockWidthDraft.value = String(l2.width);
101769
+ dockHeightDraft.value = typeof l2.height === "number" ? String(l2.height) : "";
101770
+ } catch (e) {
101771
+ }
101772
+ }
101705
101773
  const pluginOpacity = computed({
101706
101774
  get: () => settingsStore.pluginOpacity,
101707
101775
  set: (val) => settingsStore.setPluginOpacity(val)
@@ -101771,9 +101839,14 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101771
101839
  }
101772
101840
  onMounted(() => {
101773
101841
  window.addEventListener("keydown", onShortcutKeydown, true);
101842
+ if (isDsh) {
101843
+ window.addEventListener(DOCK_EVENT_LAYOUT, onDockLayoutEvent);
101844
+ readDockLayoutFromStorage();
101845
+ }
101774
101846
  });
101775
101847
  onBeforeUnmount(() => {
101776
101848
  window.removeEventListener("keydown", onShortcutKeydown, true);
101849
+ if (isDsh) window.removeEventListener(DOCK_EVENT_LAYOUT, onDockLayoutEvent);
101777
101850
  window.__xechatShortcutRecording = false;
101778
101851
  });
101779
101852
  const localPanicUrl = /* @__PURE__ */ ref(settingsStore.panicUrl);
@@ -101785,72 +101858,134 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101785
101858
  settingsStore.setAdminToken(val || "");
101786
101859
  }
101787
101860
  return (_ctx, _cache) => {
101788
- const _component_el_switch = resolveComponent("el-switch");
101861
+ const _component_el_input = resolveComponent("el-input");
101789
101862
  const _component_el_button = resolveComponent("el-button");
101863
+ const _component_el_switch = resolveComponent("el-switch");
101790
101864
  const _component_el_radio_button = resolveComponent("el-radio-button");
101791
101865
  const _component_el_radio_group = resolveComponent("el-radio-group");
101792
101866
  const _component_el_slider = resolveComponent("el-slider");
101793
101867
  const _component_InfoFilled = resolveComponent("InfoFilled");
101794
101868
  const _component_el_icon = resolveComponent("el-icon");
101795
101869
  const _component_el_tooltip = resolveComponent("el-tooltip");
101796
- const _component_el_input = resolveComponent("el-input");
101797
101870
  const _component_el_tag = resolveComponent("el-tag");
101798
101871
  const _component_el_form_item = resolveComponent("el-form-item");
101799
101872
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
101800
- _cache[30] || (_cache[30] = createBaseVNode("div", { class: "panel-header" }, [
101873
+ _cache[41] || (_cache[41] = createBaseVNode("div", { class: "panel-header" }, [
101801
101874
  createBaseVNode("span", { class: "panel-title" }, "设置")
101802
101875
  ], -1)),
101803
101876
  createBaseVNode("div", _hoisted_2$1, [
101804
- createBaseVNode("div", _hoisted_3$1, [
101805
- _cache[8] || (_cache[8] = createBaseVNode("span", null, "主题", -1)),
101877
+ unref(isDsh) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
101878
+ _cache[18] || (_cache[18] = createBaseVNode("div", { class: "block-title" }, "面板尺寸", -1)),
101879
+ createBaseVNode("div", _hoisted_4$1, [
101880
+ _cache[12] || (_cache[12] = createBaseVNode("div", { class: "inline-label" }, [
101881
+ createBaseVNode("span", null, "宽度 (px)")
101882
+ ], -1)),
101883
+ createVNode(_component_el_input, {
101884
+ modelValue: dockWidthDraft.value,
101885
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dockWidthDraft.value = $event),
101886
+ type: "number",
101887
+ min: dockLimits.value.minWidth,
101888
+ max: dockLimits.value.maxWidth,
101889
+ placeholder: "380",
101890
+ onFocus: _cache[1] || (_cache[1] = ($event) => dockEditing.value = true),
101891
+ onBlur: onDockInputBlur,
101892
+ onChange: applyDockSize,
101893
+ onKeyup: withKeys(applyDockSize, ["enter"])
101894
+ }, null, 8, ["modelValue", "min", "max"])
101895
+ ]),
101896
+ createBaseVNode("div", _hoisted_5$1, [
101897
+ _cache[13] || (_cache[13] = createBaseVNode("div", { class: "inline-label" }, [
101898
+ createBaseVNode("span", null, "高度 (px)")
101899
+ ], -1)),
101900
+ createVNode(_component_el_input, {
101901
+ modelValue: dockHeightDraft.value,
101902
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dockHeightDraft.value = $event),
101903
+ type: "number",
101904
+ min: dockLimits.value.minHeight,
101905
+ max: dockLimits.value.maxHeight,
101906
+ placeholder: "留空 = 铺满",
101907
+ onFocus: _cache[3] || (_cache[3] = ($event) => dockEditing.value = true),
101908
+ onBlur: onDockInputBlur,
101909
+ onChange: applyDockSize,
101910
+ onKeyup: withKeys(applyDockSize, ["enter"])
101911
+ }, null, 8, ["modelValue", "min", "max"])
101912
+ ]),
101913
+ createBaseVNode("div", _hoisted_6, [
101914
+ createTextVNode(" 宽度 " + toDisplayString(dockLimits.value.minWidth) + "–" + toDisplayString(dockLimits.value.maxWidth) + " px,高度 " + toDisplayString(dockLimits.value.minHeight) + "–" + toDisplayString(dockLimits.value.maxHeight) + " px; 高度留空表示铺满窗口。回车或失焦立即生效。", 1),
101915
+ _cache[14] || (_cache[14] = createBaseVNode("br", null, null, -1)),
101916
+ _cache[15] || (_cache[15] = createTextVNode(" 也可以拖动面板左边缘(调宽)、上边缘或下边缘(调高)的拖拽条。 ", -1))
101917
+ ]),
101918
+ createBaseVNode("div", _hoisted_7, [
101919
+ createVNode(_component_el_button, {
101920
+ size: "small",
101921
+ onClick: resetDockSize
101922
+ }, {
101923
+ default: withCtx(() => [..._cache[16] || (_cache[16] = [
101924
+ createTextVNode("恢复默认", -1)
101925
+ ])]),
101926
+ _: 1
101927
+ }),
101928
+ createVNode(_component_el_button, {
101929
+ size: "small",
101930
+ onClick: openDockSizePanel
101931
+ }, {
101932
+ default: withCtx(() => [..._cache[17] || (_cache[17] = [
101933
+ createTextVNode("在侧栏打开尺寸浮层", -1)
101934
+ ])]),
101935
+ _: 1
101936
+ })
101937
+ ])
101938
+ ])) : createCommentVNode("", true),
101939
+ createBaseVNode("div", _hoisted_8, [
101940
+ _cache[19] || (_cache[19] = createBaseVNode("span", null, "主题", -1)),
101806
101941
  createVNode(_component_el_switch, {
101807
101942
  "model-value": unref(isDark),
101808
- onChange: _cache[0] || (_cache[0] = ($event) => unref(toggleTheme)()),
101943
+ onChange: _cache[4] || (_cache[4] = ($event) => unref(toggleTheme)()),
101809
101944
  "active-text": "暗色",
101810
101945
  "inactive-text": "亮色"
101811
101946
  }, null, 8, ["model-value"])
101812
101947
  ]),
101813
- createBaseVNode("div", _hoisted_4$1, [
101814
- _cache[10] || (_cache[10] = createBaseVNode("span", null, "文字样式", -1)),
101948
+ createBaseVNode("div", _hoisted_9, [
101949
+ _cache[21] || (_cache[21] = createBaseVNode("span", null, "文字样式", -1)),
101815
101950
  createVNode(_component_el_button, {
101816
101951
  size: "small",
101817
- onClick: _cache[1] || (_cache[1] = ($event) => unref(state).currentRoute = "style-editor")
101952
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(state).currentRoute = "style-editor")
101818
101953
  }, {
101819
- default: withCtx(() => [..._cache[9] || (_cache[9] = [
101954
+ default: withCtx(() => [..._cache[20] || (_cache[20] = [
101820
101955
  createTextVNode(" 管理 ", -1)
101821
101956
  ])]),
101822
101957
  _: 1
101823
101958
  })
101824
101959
  ]),
101825
- createBaseVNode("div", _hoisted_5$1, [
101826
- _cache[15] || (_cache[15] = createBaseVNode("span", null, "浏览器配色", -1)),
101960
+ createBaseVNode("div", _hoisted_10, [
101961
+ _cache[26] || (_cache[26] = createBaseVNode("span", null, "浏览器配色", -1)),
101827
101962
  createVNode(_component_el_radio_group, {
101828
101963
  modelValue: browserTheme.value,
101829
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => browserTheme.value = $event),
101964
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => browserTheme.value = $event),
101830
101965
  size: "small",
101831
101966
  onChange: onBrowserThemeChange
101832
101967
  }, {
101833
101968
  default: withCtx(() => [
101834
101969
  createVNode(_component_el_radio_button, { value: "auto" }, {
101835
- default: withCtx(() => [..._cache[11] || (_cache[11] = [
101970
+ default: withCtx(() => [..._cache[22] || (_cache[22] = [
101836
101971
  createTextVNode("跟随主题", -1)
101837
101972
  ])]),
101838
101973
  _: 1
101839
101974
  }),
101840
101975
  createVNode(_component_el_radio_button, { value: "dark" }, {
101841
- default: withCtx(() => [..._cache[12] || (_cache[12] = [
101976
+ default: withCtx(() => [..._cache[23] || (_cache[23] = [
101842
101977
  createTextVNode("深色", -1)
101843
101978
  ])]),
101844
101979
  _: 1
101845
101980
  }),
101846
101981
  createVNode(_component_el_radio_button, { value: "light" }, {
101847
- default: withCtx(() => [..._cache[13] || (_cache[13] = [
101982
+ default: withCtx(() => [..._cache[24] || (_cache[24] = [
101848
101983
  createTextVNode("浅色", -1)
101849
101984
  ])]),
101850
101985
  _: 1
101851
101986
  }),
101852
101987
  createVNode(_component_el_radio_button, { value: "off" }, {
101853
- default: withCtx(() => [..._cache[14] || (_cache[14] = [
101988
+ default: withCtx(() => [..._cache[25] || (_cache[25] = [
101854
101989
  createTextVNode("不做处理", -1)
101855
101990
  ])]),
101856
101991
  _: 1
@@ -101859,12 +101994,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101859
101994
  _: 1
101860
101995
  }, 8, ["modelValue"])
101861
101996
  ]),
101862
- createBaseVNode("div", _hoisted_6, [
101863
- _cache[16] || (_cache[16] = createBaseVNode("span", null, "网页降亮", -1)),
101864
- createBaseVNode("div", _hoisted_7, [
101997
+ createBaseVNode("div", _hoisted_11, [
101998
+ _cache[27] || (_cache[27] = createBaseVNode("span", null, "网页降亮", -1)),
101999
+ createBaseVNode("div", _hoisted_12, [
101865
102000
  createVNode(_component_el_slider, {
101866
102001
  modelValue: browserDim.value,
101867
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => browserDim.value = $event),
102002
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => browserDim.value = $event),
101868
102003
  min: 0,
101869
102004
  max: 0.6,
101870
102005
  step: 0.05,
@@ -101872,70 +102007,70 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101872
102007
  }, null, 8, ["modelValue", "format-tooltip"])
101873
102008
  ])
101874
102009
  ]),
101875
- _cache[29] || (_cache[29] = createBaseVNode("div", { class: "setting-hint" }, " 内置浏览器是 iframe,跨源站点受同源策略保护,插件无法改写其内部元素, 因此这里只能给容器着色并加一层降亮遮罩,无法像 DarkReader 那样逐元素反色。 ", -1)),
101876
- createBaseVNode("div", _hoisted_8, [
101877
- _cache[17] || (_cache[17] = createBaseVNode("span", null, "插件透明度", -1)),
101878
- createBaseVNode("div", _hoisted_9, [
102010
+ _cache[40] || (_cache[40] = createBaseVNode("div", { class: "setting-hint" }, " 内置浏览器是 iframe,跨源站点受同源策略保护,插件无法改写其内部元素, 因此这里只能给容器着色并加一层降亮遮罩,无法像 DarkReader 那样逐元素反色。 ", -1)),
102011
+ createBaseVNode("div", _hoisted_13, [
102012
+ _cache[28] || (_cache[28] = createBaseVNode("span", null, "插件透明度", -1)),
102013
+ createBaseVNode("div", _hoisted_14, [
101879
102014
  createVNode(_component_el_slider, {
101880
102015
  modelValue: pluginOpacity.value,
101881
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => pluginOpacity.value = $event),
102016
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => pluginOpacity.value = $event),
101882
102017
  min: 0,
101883
102018
  max: 1,
101884
102019
  step: 0.05,
101885
102020
  "format-tooltip": (v2) => Math.round(v2 * 100) + "%",
101886
102021
  style: { "width": "130px" }
101887
102022
  }, null, 8, ["modelValue", "format-tooltip"]),
101888
- createBaseVNode("span", _hoisted_10, toDisplayString(Math.round(pluginOpacity.value * 100)) + "%", 1)
102023
+ createBaseVNode("span", _hoisted_15, toDisplayString(Math.round(pluginOpacity.value * 100)) + "%", 1)
101889
102024
  ])
101890
102025
  ]),
101891
- createBaseVNode("div", _hoisted_11, [
101892
- _cache[18] || (_cache[18] = createBaseVNode("span", null, "游戏面板透明度", -1)),
101893
- createBaseVNode("div", _hoisted_12, [
102026
+ createBaseVNode("div", _hoisted_16, [
102027
+ _cache[29] || (_cache[29] = createBaseVNode("span", null, "游戏面板透明度", -1)),
102028
+ createBaseVNode("div", _hoisted_17, [
101894
102029
  createVNode(_component_el_slider, {
101895
102030
  modelValue: gamePanelOpacity.value,
101896
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => gamePanelOpacity.value = $event),
102031
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => gamePanelOpacity.value = $event),
101897
102032
  min: 0.1,
101898
102033
  max: 1,
101899
102034
  step: 0.05,
101900
102035
  "format-tooltip": (v2) => Math.round(v2 * 100) + "%",
101901
102036
  style: { "width": "130px" }
101902
102037
  }, null, 8, ["modelValue", "format-tooltip"]),
101903
- createBaseVNode("span", _hoisted_13, toDisplayString(Math.round(gamePanelOpacity.value * 100)) + "%", 1)
102038
+ createBaseVNode("span", _hoisted_18, toDisplayString(Math.round(gamePanelOpacity.value * 100)) + "%", 1)
101904
102039
  ]),
101905
- _cache[19] || (_cache[19] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px", "width": "100%", "text-align": "right" } }, " 游戏播放时面板透明度 ", -1))
102040
+ _cache[30] || (_cache[30] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px", "width": "100%", "text-align": "right" } }, " 游戏播放时面板透明度 ", -1))
101906
102041
  ]),
101907
- createBaseVNode("div", _hoisted_14, [
101908
- _cache[20] || (_cache[20] = createBaseVNode("div", { class: "block-title" }, "快捷键", -1)),
102042
+ createBaseVNode("div", _hoisted_19, [
102043
+ _cache[31] || (_cache[31] = createBaseVNode("div", { class: "block-title" }, "快捷键", -1)),
101909
102044
  (openBlock(), createElementBlock(Fragment, null, renderList(shortcutItems, (item) => {
101910
102045
  return createBaseVNode("div", {
101911
102046
  key: item.type,
101912
102047
  class: "shortcut-row"
101913
102048
  }, [
101914
102049
  createBaseVNode("span", null, toDisplayString(item.label), 1),
101915
- createBaseVNode("div", _hoisted_15, [
102050
+ createBaseVNode("div", _hoisted_20, [
101916
102051
  createBaseVNode("button", {
101917
102052
  class: normalizeClass(["shortcut-btn", { recording: recordingShortcut.value === item.type }]),
101918
102053
  onClick: ($event) => startRecording(item.type)
101919
- }, toDisplayString(recordingShortcut.value === item.type ? "按下新组合键..." : unref(formatShortcut)(unref(settingsStore)[item.getter])), 11, _hoisted_16),
102054
+ }, toDisplayString(recordingShortcut.value === item.type ? "按下新组合键..." : unref(formatShortcut)(unref(settingsStore)[item.getter])), 11, _hoisted_21),
101920
102055
  createBaseVNode("button", {
101921
102056
  class: "shortcut-reset",
101922
102057
  title: "恢复默认",
101923
102058
  onClick: ($event) => unref(settingsStore)[item.setter](DEFAULT_SHORTCUTS[item.type])
101924
- }, "默认", 8, _hoisted_17)
102059
+ }, "默认", 8, _hoisted_22)
101925
102060
  ])
101926
102061
  ]);
101927
102062
  }), 64)),
101928
- recordingShortcut.value ? (openBlock(), createElementBlock("div", _hoisted_18, " 请按下新的组合键(建议 Ctrl+Alt+主键,避免使用 Shift 以免键位漂移),按 Esc 取消 ")) : createCommentVNode("", true)
102063
+ recordingShortcut.value ? (openBlock(), createElementBlock("div", _hoisted_23, " 请按下新的组合键(建议 Ctrl+Alt+主键,避免使用 Shift 以免键位漂移),按 Esc 取消 ")) : createCommentVNode("", true)
101929
102064
  ]),
101930
- createBaseVNode("div", _hoisted_19, [
101931
- createBaseVNode("div", _hoisted_20, [
101932
- createBaseVNode("div", _hoisted_21, [
101933
- _cache[22] || (_cache[22] = createBaseVNode("span", null, "紧急模式", -1)),
102065
+ createBaseVNode("div", _hoisted_24, [
102066
+ createBaseVNode("div", _hoisted_25, [
102067
+ createBaseVNode("div", _hoisted_26, [
102068
+ _cache[33] || (_cache[33] = createBaseVNode("span", null, "紧急模式", -1)),
101934
102069
  createVNode(_component_el_tooltip, {
101935
102070
  placement: "top",
101936
102071
  effect: "dark"
101937
102072
  }, {
101938
- content: withCtx(() => [..._cache[21] || (_cache[21] = [
102073
+ content: withCtx(() => [..._cache[32] || (_cache[32] = [
101939
102074
  createTextVNode(" 按下快捷键全屏显示伪装内容(图片或网页),再按一次恢复摸鱼页面", -1),
101940
102075
  createBaseVNode("br", null, null, -1),
101941
102076
  createTextVNode(" 以 .png/.jpg/.gif/.webp 等图片扩展名结尾的地址按图片展示,其余按网页加载 ", -1)
@@ -101953,20 +102088,20 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101953
102088
  ]),
101954
102089
  createVNode(_component_el_input, {
101955
102090
  modelValue: localPanicUrl.value,
101956
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => localPanicUrl.value = $event),
102091
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => localPanicUrl.value = $event),
101957
102092
  placeholder: "图片 URL / 网页地址",
101958
102093
  clearable: "",
101959
102094
  onChange: onPanicUrlChange
101960
102095
  }, null, 8, ["modelValue"])
101961
102096
  ]),
101962
- createBaseVNode("div", _hoisted_22, [
101963
- createBaseVNode("div", _hoisted_23, [
101964
- _cache[24] || (_cache[24] = createBaseVNode("span", null, "管理员 Token", -1)),
102097
+ createBaseVNode("div", _hoisted_27, [
102098
+ createBaseVNode("div", _hoisted_28, [
102099
+ _cache[35] || (_cache[35] = createBaseVNode("span", null, "管理员 Token", -1)),
101965
102100
  createVNode(_component_el_tooltip, {
101966
102101
  placement: "top",
101967
102102
  effect: "dark"
101968
102103
  }, {
101969
- content: withCtx(() => [..._cache[23] || (_cache[23] = [
102104
+ content: withCtx(() => [..._cache[34] || (_cache[34] = [
101970
102105
  createTextVNode(" 与服务端 application.yml 的 token 一致时,登录后获得管理员权限", -1),
101971
102106
  createBaseVNode("br", null, null, -1),
101972
102107
  createTextVNode(" 登录时随 LOGIN 帧上报;修改后需重新登录(#login)生效 ", -1)
@@ -101984,7 +102119,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101984
102119
  ]),
101985
102120
  createVNode(_component_el_input, {
101986
102121
  modelValue: localAdminToken.value,
101987
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => localAdminToken.value = $event),
102122
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => localAdminToken.value = $event),
101988
102123
  type: "password",
101989
102124
  "show-password": "",
101990
102125
  clearable: "",
@@ -101999,17 +102134,17 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
101999
102134
  type: "success",
102000
102135
  size: "small"
102001
102136
  }, {
102002
- default: withCtx(() => [..._cache[25] || (_cache[25] = [
102137
+ default: withCtx(() => [..._cache[36] || (_cache[36] = [
102003
102138
  createTextVNode("WebSocket", -1)
102004
102139
  ])]),
102005
102140
  _: 1
102006
102141
  }),
102007
- _cache[26] || (_cache[26] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px" } }, " xechat-dsh 仅支持 WebSocket,服务端地址由 #login 指定 ", -1))
102142
+ _cache[37] || (_cache[37] = createBaseVNode("div", { style: { "font-size": "11px", "color": "var(--el-text-color-secondary)", "margin-top": "4px" } }, " xechat-dsh 仅支持 WebSocket,服务端地址由 #login 指定 ", -1))
102008
102143
  ]),
102009
102144
  _: 1
102010
102145
  }),
102011
- createBaseVNode("div", _hoisted_24, [
102012
- _cache[27] || (_cache[27] = createBaseVNode("span", null, "在线状态", -1)),
102146
+ createBaseVNode("div", _hoisted_29, [
102147
+ _cache[38] || (_cache[38] = createBaseVNode("span", null, "在线状态", -1)),
102013
102148
  createVNode(_component_el_tag, {
102014
102149
  type: unref(state).online ? "success" : "info",
102015
102150
  size: "small"
@@ -102020,16 +102155,16 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
102020
102155
  _: 1
102021
102156
  }, 8, ["type"])
102022
102157
  ]),
102023
- unref(state).username ? (openBlock(), createElementBlock("div", _hoisted_25, [
102024
- _cache[28] || (_cache[28] = createBaseVNode("span", null, "用户名", -1)),
102025
- createBaseVNode("span", _hoisted_26, toDisplayString(unref(state).username), 1)
102158
+ unref(state).username ? (openBlock(), createElementBlock("div", _hoisted_30, [
102159
+ _cache[39] || (_cache[39] = createBaseVNode("span", null, "用户名", -1)),
102160
+ createBaseVNode("span", _hoisted_31, toDisplayString(unref(state).username), 1)
102026
102161
  ])) : createCommentVNode("", true)
102027
102162
  ])
102028
102163
  ]);
102029
102164
  };
102030
102165
  }
102031
102166
  };
102032
- const SettingsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-297e7ab3"]]);
102167
+ const SettingsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e4f41080"]]);
102033
102168
  const _hoisted_1 = { class: "nav-buttons" };
102034
102169
  const _hoisted_2 = { class: "nav-bottom" };
102035
102170
  const _hoisted_3 = ["src"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xechat-dsh",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "xechat side-panel chat client for the DeepSeek Harness Web UI: a dockable sidebar that keeps the XEChat pond conversation available while you work.",
5
5
  "type": "module",
6
6
  "repository": {