xechat-dsh 0.2.3 → 0.2.4
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 +86 -2
- package/lib/client.js +2 -2
- package/lib/xechat-app.css +174 -57
- package/lib/xechat-app.js +602 -106
- package/package.json +2 -2
package/lib/xechat-app.js
CHANGED
|
@@ -35,6 +35,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35
35
|
const isMap$1 = (val) => toTypeString(val) === "[object Map]";
|
|
36
36
|
const isSet$2 = (val) => toTypeString(val) === "[object Set]";
|
|
37
37
|
const isDate$1 = (val) => toTypeString(val) === "[object Date]";
|
|
38
|
+
const isRegExp$1 = (val) => toTypeString(val) === "[object RegExp]";
|
|
38
39
|
const isFunction$3 = (val) => typeof val === "function";
|
|
39
40
|
const isString$1 = (val) => typeof val === "string";
|
|
40
41
|
const isSymbol$1 = (val) => typeof val === "symbol";
|
|
@@ -3439,6 +3440,215 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3439
3440
|
getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
3440
3441
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
3441
3442
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
3443
|
+
const KeepAliveImpl = {
|
|
3444
|
+
name: `KeepAlive`,
|
|
3445
|
+
// Marker for special handling inside the renderer. We are not using a ===
|
|
3446
|
+
// check directly on KeepAlive in the renderer, because importing it directly
|
|
3447
|
+
// would prevent it from being tree-shaken.
|
|
3448
|
+
__isKeepAlive: true,
|
|
3449
|
+
props: {
|
|
3450
|
+
include: [String, RegExp, Array],
|
|
3451
|
+
exclude: [String, RegExp, Array],
|
|
3452
|
+
max: [String, Number]
|
|
3453
|
+
},
|
|
3454
|
+
setup(props, { slots }) {
|
|
3455
|
+
const instance = getCurrentInstance();
|
|
3456
|
+
const sharedContext = instance.ctx;
|
|
3457
|
+
if (!sharedContext.renderer) {
|
|
3458
|
+
return () => {
|
|
3459
|
+
const children = slots.default && slots.default();
|
|
3460
|
+
return children && children.length === 1 ? children[0] : children;
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
3464
|
+
const keys2 = /* @__PURE__ */ new Set();
|
|
3465
|
+
let current = null;
|
|
3466
|
+
const parentSuspense = instance.suspense;
|
|
3467
|
+
const {
|
|
3468
|
+
renderer: {
|
|
3469
|
+
p: patch,
|
|
3470
|
+
m: move,
|
|
3471
|
+
um: _unmount,
|
|
3472
|
+
o: { createElement }
|
|
3473
|
+
}
|
|
3474
|
+
} = sharedContext;
|
|
3475
|
+
const storageContainer = createElement("div");
|
|
3476
|
+
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
3477
|
+
const instance2 = vnode.component;
|
|
3478
|
+
move(vnode, container, anchor, 0, parentSuspense);
|
|
3479
|
+
patch(
|
|
3480
|
+
instance2.vnode,
|
|
3481
|
+
vnode,
|
|
3482
|
+
container,
|
|
3483
|
+
anchor,
|
|
3484
|
+
instance2,
|
|
3485
|
+
parentSuspense,
|
|
3486
|
+
namespace,
|
|
3487
|
+
vnode.slotScopeIds,
|
|
3488
|
+
optimized
|
|
3489
|
+
);
|
|
3490
|
+
queuePostRenderEffect(() => {
|
|
3491
|
+
instance2.isDeactivated = false;
|
|
3492
|
+
if (instance2.a) {
|
|
3493
|
+
invokeArrayFns(instance2.a);
|
|
3494
|
+
}
|
|
3495
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
3496
|
+
if (vnodeHook) {
|
|
3497
|
+
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
|
|
3498
|
+
}
|
|
3499
|
+
}, parentSuspense);
|
|
3500
|
+
};
|
|
3501
|
+
sharedContext.deactivate = (vnode) => {
|
|
3502
|
+
const instance2 = vnode.component;
|
|
3503
|
+
invalidateMount(instance2.m);
|
|
3504
|
+
invalidateMount(instance2.a);
|
|
3505
|
+
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
3506
|
+
queuePostRenderEffect(() => {
|
|
3507
|
+
if (instance2.da) {
|
|
3508
|
+
invokeArrayFns(instance2.da);
|
|
3509
|
+
}
|
|
3510
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
3511
|
+
if (vnodeHook) {
|
|
3512
|
+
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
|
|
3513
|
+
}
|
|
3514
|
+
instance2.isDeactivated = true;
|
|
3515
|
+
}, parentSuspense);
|
|
3516
|
+
};
|
|
3517
|
+
function unmount(vnode) {
|
|
3518
|
+
resetShapeFlag(vnode);
|
|
3519
|
+
_unmount(vnode, instance, parentSuspense, true);
|
|
3520
|
+
}
|
|
3521
|
+
function pruneCache(filter) {
|
|
3522
|
+
cache2.forEach((vnode, key) => {
|
|
3523
|
+
const name = getComponentName(
|
|
3524
|
+
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
|
|
3525
|
+
);
|
|
3526
|
+
if (name && !filter(name)) {
|
|
3527
|
+
pruneCacheEntry(key);
|
|
3528
|
+
}
|
|
3529
|
+
});
|
|
3530
|
+
}
|
|
3531
|
+
function pruneCacheEntry(key) {
|
|
3532
|
+
const cached = cache2.get(key);
|
|
3533
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
3534
|
+
unmount(cached);
|
|
3535
|
+
} else if (current) {
|
|
3536
|
+
resetShapeFlag(current);
|
|
3537
|
+
if (cached) resetShapeFlag(cached);
|
|
3538
|
+
}
|
|
3539
|
+
cache2.delete(key);
|
|
3540
|
+
keys2.delete(key);
|
|
3541
|
+
}
|
|
3542
|
+
watch(
|
|
3543
|
+
() => [props.include, props.exclude],
|
|
3544
|
+
([include, exclude]) => {
|
|
3545
|
+
include && pruneCache((name) => matches(include, name));
|
|
3546
|
+
exclude && pruneCache((name) => !matches(exclude, name));
|
|
3547
|
+
},
|
|
3548
|
+
// prune post-render after `current` has been updated
|
|
3549
|
+
{ flush: "post", deep: true }
|
|
3550
|
+
);
|
|
3551
|
+
let pendingCacheKey = null;
|
|
3552
|
+
const cacheSubtree = () => {
|
|
3553
|
+
if (pendingCacheKey != null) {
|
|
3554
|
+
if (isSuspense(instance.subTree.type)) {
|
|
3555
|
+
queuePostRenderEffect(() => {
|
|
3556
|
+
const vnode = getInnerChild(instance.subTree);
|
|
3557
|
+
if (vnode.component) {
|
|
3558
|
+
cache2.set(pendingCacheKey, vnode);
|
|
3559
|
+
}
|
|
3560
|
+
}, instance.subTree.suspense);
|
|
3561
|
+
} else {
|
|
3562
|
+
cache2.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
};
|
|
3566
|
+
onMounted(cacheSubtree);
|
|
3567
|
+
onUpdated(cacheSubtree);
|
|
3568
|
+
onBeforeUnmount(() => {
|
|
3569
|
+
cache2.forEach((cached) => {
|
|
3570
|
+
const { subTree, suspense } = instance;
|
|
3571
|
+
const vnode = getInnerChild(subTree);
|
|
3572
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
3573
|
+
resetShapeFlag(vnode);
|
|
3574
|
+
const da = vnode.component.da;
|
|
3575
|
+
da && queuePostRenderEffect(da, suspense);
|
|
3576
|
+
return;
|
|
3577
|
+
}
|
|
3578
|
+
unmount(cached);
|
|
3579
|
+
});
|
|
3580
|
+
});
|
|
3581
|
+
return () => {
|
|
3582
|
+
pendingCacheKey = null;
|
|
3583
|
+
if (!slots.default) {
|
|
3584
|
+
return current = null;
|
|
3585
|
+
}
|
|
3586
|
+
const children = slots.default();
|
|
3587
|
+
const rawVNode = children[0];
|
|
3588
|
+
if (children.length > 1) {
|
|
3589
|
+
current = null;
|
|
3590
|
+
return children;
|
|
3591
|
+
} else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
|
|
3592
|
+
current = null;
|
|
3593
|
+
return rawVNode;
|
|
3594
|
+
}
|
|
3595
|
+
let vnode = getInnerChild(rawVNode);
|
|
3596
|
+
if (vnode.type === Comment) {
|
|
3597
|
+
current = null;
|
|
3598
|
+
return vnode;
|
|
3599
|
+
}
|
|
3600
|
+
const comp = vnode.type;
|
|
3601
|
+
const name = getComponentName(
|
|
3602
|
+
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
3603
|
+
);
|
|
3604
|
+
const { include, exclude, max: max2 } = props;
|
|
3605
|
+
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
|
|
3606
|
+
vnode.shapeFlag &= -257;
|
|
3607
|
+
current = vnode;
|
|
3608
|
+
return rawVNode;
|
|
3609
|
+
}
|
|
3610
|
+
const key = vnode.key == null ? comp : vnode.key;
|
|
3611
|
+
const cachedVNode = cache2.get(key);
|
|
3612
|
+
if (vnode.el) {
|
|
3613
|
+
vnode = cloneVNode(vnode);
|
|
3614
|
+
if (rawVNode.shapeFlag & 128) {
|
|
3615
|
+
rawVNode.ssContent = vnode;
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
pendingCacheKey = key;
|
|
3619
|
+
if (cachedVNode) {
|
|
3620
|
+
vnode.el = cachedVNode.el;
|
|
3621
|
+
vnode.component = cachedVNode.component;
|
|
3622
|
+
if (vnode.transition) {
|
|
3623
|
+
setTransitionHooks(vnode, vnode.transition);
|
|
3624
|
+
}
|
|
3625
|
+
vnode.shapeFlag |= 512;
|
|
3626
|
+
keys2.delete(key);
|
|
3627
|
+
keys2.add(key);
|
|
3628
|
+
} else {
|
|
3629
|
+
keys2.add(key);
|
|
3630
|
+
if (max2 && keys2.size > parseInt(max2, 10)) {
|
|
3631
|
+
pruneCacheEntry(keys2.values().next().value);
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
vnode.shapeFlag |= 256;
|
|
3635
|
+
current = vnode;
|
|
3636
|
+
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
3637
|
+
};
|
|
3638
|
+
}
|
|
3639
|
+
};
|
|
3640
|
+
const KeepAlive = KeepAliveImpl;
|
|
3641
|
+
function matches(pattern, name) {
|
|
3642
|
+
if (isArray$2(pattern)) {
|
|
3643
|
+
return pattern.some((p2) => matches(p2, name));
|
|
3644
|
+
} else if (isString$1(pattern)) {
|
|
3645
|
+
return pattern.split(",").includes(name);
|
|
3646
|
+
} else if (isRegExp$1(pattern)) {
|
|
3647
|
+
pattern.lastIndex = 0;
|
|
3648
|
+
return pattern.test(name);
|
|
3649
|
+
}
|
|
3650
|
+
return false;
|
|
3651
|
+
}
|
|
3442
3652
|
function onActivated(hook, target) {
|
|
3443
3653
|
registerKeepAliveHook(hook, "a", target);
|
|
3444
3654
|
}
|
|
@@ -3479,6 +3689,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3479
3689
|
remove(keepAliveRoot[type], injected);
|
|
3480
3690
|
}, target);
|
|
3481
3691
|
}
|
|
3692
|
+
function resetShapeFlag(vnode) {
|
|
3693
|
+
vnode.shapeFlag &= -257;
|
|
3694
|
+
vnode.shapeFlag &= -513;
|
|
3695
|
+
}
|
|
3696
|
+
function getInnerChild(vnode) {
|
|
3697
|
+
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
3698
|
+
}
|
|
3482
3699
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
3483
3700
|
if (target) {
|
|
3484
3701
|
const hooks = target[type] || (target[type] = []);
|
|
@@ -11209,15 +11426,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
11209
11426
|
const isSupported = /* @__PURE__ */ useSupported$1(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
11210
11427
|
const ssrSupport = /* @__PURE__ */ shallowRef(typeof ssrWidth === "number");
|
|
11211
11428
|
const mediaQuery = /* @__PURE__ */ shallowRef();
|
|
11212
|
-
const
|
|
11429
|
+
const matches2 = /* @__PURE__ */ shallowRef(false);
|
|
11213
11430
|
const handler = (event) => {
|
|
11214
|
-
|
|
11431
|
+
matches2.value = event.matches;
|
|
11215
11432
|
};
|
|
11216
11433
|
watchEffect(() => {
|
|
11217
11434
|
if (ssrSupport.value) {
|
|
11218
11435
|
ssrSupport.value = !isSupported.value;
|
|
11219
11436
|
const queryStrings = toValue(query).split(",");
|
|
11220
|
-
|
|
11437
|
+
matches2.value = queryStrings.some((queryString) => {
|
|
11221
11438
|
const not = queryString.includes("not all");
|
|
11222
11439
|
const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
11223
11440
|
const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
@@ -11230,10 +11447,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
11230
11447
|
}
|
|
11231
11448
|
if (!isSupported.value) return;
|
|
11232
11449
|
mediaQuery.value = window2.matchMedia(toValue(query));
|
|
11233
|
-
|
|
11450
|
+
matches2.value = mediaQuery.value.matches;
|
|
11234
11451
|
});
|
|
11235
11452
|
useEventListener$1(mediaQuery, "change", handler, { passive: true });
|
|
11236
|
-
return computed(() =>
|
|
11453
|
+
return computed(() => matches2.value);
|
|
11237
11454
|
}
|
|
11238
11455
|
function cloneFnJSON(source) {
|
|
11239
11456
|
return JSON.parse(JSON.stringify(source));
|
|
@@ -11573,8 +11790,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
11573
11790
|
useEventListener$1("resize", update, listenerOptions);
|
|
11574
11791
|
if (window2 && type === "visual" && window2.visualViewport) useEventListener$1(window2.visualViewport, "resize", update, listenerOptions);
|
|
11575
11792
|
if (listenOrientation) {
|
|
11576
|
-
const
|
|
11577
|
-
watch(
|
|
11793
|
+
const matches2 = useMediaQuery$1("(orientation: portrait)");
|
|
11794
|
+
watch(matches2, () => update());
|
|
11578
11795
|
}
|
|
11579
11796
|
return {
|
|
11580
11797
|
width,
|
|
@@ -33426,7 +33643,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
33426
33643
|
const _hoisted_3$s = ["onMouseenter", "onClick"];
|
|
33427
33644
|
const _hoisted_4$n = ["aria-label"];
|
|
33428
33645
|
const _hoisted_5$k = { key: 0 };
|
|
33429
|
-
const _hoisted_6$
|
|
33646
|
+
const _hoisted_6$e = {
|
|
33430
33647
|
key: 2,
|
|
33431
33648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33432
33649
|
version: "1.1",
|
|
@@ -33547,7 +33764,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
33547
33764
|
}), 128))], 2)) : createCommentVNode("v-if", true)]),
|
|
33548
33765
|
_: 1
|
|
33549
33766
|
}),
|
|
33550
|
-
__props.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6$
|
|
33767
|
+
__props.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6$e, [..._cache[8] || (_cache[8] = [createBaseVNode("defs", null, [createBaseVNode("filter", { id: "elCarouselHorizontal" }, [createBaseVNode("feGaussianBlur", {
|
|
33551
33768
|
in: "SourceGraphic",
|
|
33552
33769
|
stdDeviation: "12,0"
|
|
33553
33770
|
})]), createBaseVNode("filter", { id: "elCarouselVertical" }, [createBaseVNode("feGaussianBlur", {
|
|
@@ -42008,7 +42225,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
42008
42225
|
const _hoisted_3$p = ["aria-label", "disabled"];
|
|
42009
42226
|
const _hoisted_4$m = ["tabindex", "aria-disabled"];
|
|
42010
42227
|
const _hoisted_5$j = ["tabindex", "aria-disabled"];
|
|
42011
|
-
const _hoisted_6$
|
|
42228
|
+
const _hoisted_6$d = ["aria-label", "disabled"];
|
|
42012
42229
|
const _hoisted_7$b = ["aria-label", "disabled"];
|
|
42013
42230
|
var panel_date_pick_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
42014
42231
|
__name: "panel-date-pick",
|
|
@@ -42571,7 +42788,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
42571
42788
|
}, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
|
|
42572
42789
|
default: withCtx(() => [createVNode(unref(arrow_right_default))]),
|
|
42573
42790
|
_: 1
|
|
42574
|
-
})])], 10, _hoisted_6$
|
|
42791
|
+
})])], 10, _hoisted_6$d), [[vShow, currentView.value === "date"]]), createBaseVNode("button", {
|
|
42575
42792
|
type: "button",
|
|
42576
42793
|
"aria-label": unref(t)(`el.datepicker.nextYear`),
|
|
42577
42794
|
class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
|
|
@@ -42893,7 +43110,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
42893
43110
|
const _hoisted_3$o = ["aria-label", "disabled"];
|
|
42894
43111
|
const _hoisted_4$l = ["disabled", "aria-label"];
|
|
42895
43112
|
const _hoisted_5$i = ["disabled", "aria-label"];
|
|
42896
|
-
const _hoisted_6$
|
|
43113
|
+
const _hoisted_6$c = ["tabindex", "aria-disabled"];
|
|
42897
43114
|
const _hoisted_7$a = ["tabindex", "aria-disabled"];
|
|
42898
43115
|
const _hoisted_8$a = ["disabled", "aria-label"];
|
|
42899
43116
|
const _hoisted_9$a = ["disabled", "aria-label"];
|
|
@@ -43370,7 +43587,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
43370
43587
|
"aria-disabled": _ctx.disabled,
|
|
43371
43588
|
onKeydown: _cache[10] || (_cache[10] = withKeys(($event) => unref(showLeftPicker)("year"), ["enter"])),
|
|
43372
43589
|
onClick: _cache[11] || (_cache[11] = ($event) => unref(showLeftPicker)("year"))
|
|
43373
|
-
}, toDisplayString(unref(leftYearLabel)), 43, _hoisted_6$
|
|
43590
|
+
}, toDisplayString(unref(leftYearLabel)), 43, _hoisted_6$c), withDirectives(createBaseVNode("span", {
|
|
43374
43591
|
role: "button",
|
|
43375
43592
|
"aria-live": "polite",
|
|
43376
43593
|
tabindex: _ctx.disabled ? void 0 : 0,
|
|
@@ -47051,7 +47268,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
47051
47268
|
const _hoisted_3$i = ["stop-color"];
|
|
47052
47269
|
const _hoisted_4$g = ["stop-color"];
|
|
47053
47270
|
const _hoisted_5$e = ["id"];
|
|
47054
|
-
const _hoisted_6$
|
|
47271
|
+
const _hoisted_6$b = ["stop-color"];
|
|
47055
47272
|
const _hoisted_7$9 = ["stop-color"];
|
|
47056
47273
|
const _hoisted_8$9 = ["id"];
|
|
47057
47274
|
const _hoisted_9$9 = {
|
|
@@ -47071,7 +47288,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
47071
47288
|
const _hoisted_18$4 = ["fill"];
|
|
47072
47289
|
const _hoisted_19$3 = ["fill"];
|
|
47073
47290
|
const _hoisted_20$3 = { transform: "translate(53.000000, 45.000000)" };
|
|
47074
|
-
const _hoisted_21$
|
|
47291
|
+
const _hoisted_21$3 = ["fill", "xlink:href"];
|
|
47075
47292
|
const _hoisted_22$2 = ["fill", "mask"];
|
|
47076
47293
|
const _hoisted_23$2 = ["fill"];
|
|
47077
47294
|
var img_empty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -47104,7 +47321,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
47104
47321
|
}, [createBaseVNode("stop", {
|
|
47105
47322
|
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
|
|
47106
47323
|
offset: "0%"
|
|
47107
|
-
}, null, 8, _hoisted_6$
|
|
47324
|
+
}, null, 8, _hoisted_6$b), createBaseVNode("stop", {
|
|
47108
47325
|
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`,
|
|
47109
47326
|
offset: "100%"
|
|
47110
47327
|
}, null, 8, _hoisted_7$9)], 8, _hoisted_5$e),
|
|
@@ -47160,7 +47377,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
47160
47377
|
fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`,
|
|
47161
47378
|
transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
|
|
47162
47379
|
"xlink:href": `#path-3-${unref(id)}`
|
|
47163
|
-
}, null, 8, _hoisted_21$
|
|
47380
|
+
}, null, 8, _hoisted_21$3), createBaseVNode("polygon", {
|
|
47164
47381
|
fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`,
|
|
47165
47382
|
mask: `url(#mask-4-${unref(id)})`,
|
|
47166
47383
|
transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
|
|
@@ -56262,8 +56479,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
56262
56479
|
return column;
|
|
56263
56480
|
};
|
|
56264
56481
|
const getColumnByCell = function(table2, cell, namespace) {
|
|
56265
|
-
const
|
|
56266
|
-
if (
|
|
56482
|
+
const matches2 = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
|
|
56483
|
+
if (matches2) return getColumnById(table2, matches2[0]);
|
|
56267
56484
|
return null;
|
|
56268
56485
|
};
|
|
56269
56486
|
const getRowIdentity = (row, rowKey2) => {
|
|
@@ -67110,7 +67327,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
67110
67327
|
const _hoisted_3$c = ["onClick"];
|
|
67111
67328
|
const _hoisted_4$b = ["title"];
|
|
67112
67329
|
const _hoisted_5$a = ["onClick"];
|
|
67113
|
-
const _hoisted_6$
|
|
67330
|
+
const _hoisted_6$a = ["onClick"];
|
|
67114
67331
|
var upload_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
67115
67332
|
name: "ElUploadList",
|
|
67116
67333
|
__name: "upload-list",
|
|
@@ -67244,7 +67461,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
67244
67461
|
}, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("delete")) }, {
|
|
67245
67462
|
default: withCtx(() => [createVNode(unref(delete_default))]),
|
|
67246
67463
|
_: 1
|
|
67247
|
-
}, 8, ["class"])], 10, _hoisted_6$
|
|
67464
|
+
}, 8, ["class"])], 10, _hoisted_6$a)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
|
|
67248
67465
|
])], 42, _hoisted_1$l);
|
|
67249
67466
|
}), 128)), renderSlot(_ctx.$slots, "append")]),
|
|
67250
67467
|
_: 3
|
|
@@ -72956,6 +73173,39 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
72956
73173
|
}
|
|
72957
73174
|
}
|
|
72958
73175
|
};
|
|
73176
|
+
const PLATFORM_FALLBACK = "WEB";
|
|
73177
|
+
const PLATFORM_FALLBACK_KEY = "xechat_platform_fallback_v1";
|
|
73178
|
+
function readFallbackKeys() {
|
|
73179
|
+
try {
|
|
73180
|
+
const arr = JSON.parse(localStorage.getItem(PLATFORM_FALLBACK_KEY) || "[]");
|
|
73181
|
+
return Array.isArray(arr) ? arr : [];
|
|
73182
|
+
} catch (e) {
|
|
73183
|
+
return [];
|
|
73184
|
+
}
|
|
73185
|
+
}
|
|
73186
|
+
function needsPlatformFallback(key) {
|
|
73187
|
+
return !!key && readFallbackKeys().indexOf(key) >= 0;
|
|
73188
|
+
}
|
|
73189
|
+
function rememberPlatformFallback(key) {
|
|
73190
|
+
if (!key) return;
|
|
73191
|
+
try {
|
|
73192
|
+
const keys2 = readFallbackKeys();
|
|
73193
|
+
if (keys2.indexOf(key) >= 0) return;
|
|
73194
|
+
keys2.push(key);
|
|
73195
|
+
localStorage.setItem(PLATFORM_FALLBACK_KEY, JSON.stringify(keys2.slice(-50)));
|
|
73196
|
+
} catch (e) {
|
|
73197
|
+
}
|
|
73198
|
+
}
|
|
73199
|
+
function shouldDowngradePlatform(opts) {
|
|
73200
|
+
const o2 = opts || {};
|
|
73201
|
+
if (o2.downgraded) return false;
|
|
73202
|
+
if (o2.acked) return false;
|
|
73203
|
+
if (!/消息内容解析异常/.test(String(o2.text || ""))) return false;
|
|
73204
|
+
const raw = String(o2.platform || "").toUpperCase();
|
|
73205
|
+
if (!raw) return false;
|
|
73206
|
+
if (raw === "WEB" || raw === "IDEA" || raw === "COMMAND") return false;
|
|
73207
|
+
return true;
|
|
73208
|
+
}
|
|
72959
73209
|
class WebSocketTransport {
|
|
72960
73210
|
constructor(url) {
|
|
72961
73211
|
this.name = "websocket";
|
|
@@ -72970,6 +73220,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
72970
73220
|
this._intentionalClose = false;
|
|
72971
73221
|
this._everConnected = false;
|
|
72972
73222
|
this._loggedIn = false;
|
|
73223
|
+
this._loginPayload = null;
|
|
73224
|
+
this._loginKey = "";
|
|
73225
|
+
this._loginAcked = false;
|
|
73226
|
+
this._platformDowngraded = false;
|
|
72973
73227
|
}
|
|
72974
73228
|
/** 当前 WebSocket 连接地址(用于推导 HTTP 图片下载地址) */
|
|
72975
73229
|
get wsUrl() {
|
|
@@ -73023,6 +73277,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73023
73277
|
}
|
|
73024
73278
|
_dispatch(msg) {
|
|
73025
73279
|
const type = msg.action || msg.type;
|
|
73280
|
+
if (type !== "SYSTEM" && type !== "HEARTBEAT") this._loginAcked = true;
|
|
73026
73281
|
switch (type) {
|
|
73027
73282
|
case "USER":
|
|
73028
73283
|
case "CHAT":
|
|
@@ -73037,6 +73292,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73037
73292
|
break;
|
|
73038
73293
|
case "SYSTEM":
|
|
73039
73294
|
const sysText = typeof msg.body === "string" ? msg.body : msg.body && msg.body.content || "";
|
|
73295
|
+
if (this._maybeDowngradePlatform(sysText)) break;
|
|
73040
73296
|
this._emit("message", { type: "system", text: sysText, time: msg.time });
|
|
73041
73297
|
this._emit("system", { text: sysText, time: msg.time });
|
|
73042
73298
|
break;
|
|
@@ -73089,6 +73345,15 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73089
73345
|
const url = "ws://" + host + ":" + wsPort + "/xechat";
|
|
73090
73346
|
const prevUrl = this._url;
|
|
73091
73347
|
console.log("[WS][loginToServer] host=" + host + ", port=" + port + ", wsPort=" + wsPort + ", url=" + url + ", loginPayload=" + JSON.stringify(loginPayload));
|
|
73348
|
+
this._loginPayload = loginPayload;
|
|
73349
|
+
this._loginKey = host + ":" + wsPort;
|
|
73350
|
+
this._loginAcked = false;
|
|
73351
|
+
this._platformDowngraded = false;
|
|
73352
|
+
if (loginPayload && loginPayload.body && needsPlatformFallback(this._loginKey)) {
|
|
73353
|
+
console.log("[WS][loginToServer] 该塘曾因平台不支持降级,本次直接上报 " + PLATFORM_FALLBACK);
|
|
73354
|
+
loginPayload.body.platform = PLATFORM_FALLBACK;
|
|
73355
|
+
this._platformDowngraded = true;
|
|
73356
|
+
}
|
|
73092
73357
|
if (this._ws && this._ws.readyState === WebSocket.OPEN && prevUrl === url) {
|
|
73093
73358
|
console.log("[WS][loginToServer] 复用现有连接");
|
|
73094
73359
|
this._intentionalClose = false;
|
|
@@ -73101,18 +73366,41 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73101
73366
|
this._url = url;
|
|
73102
73367
|
const self2 = this;
|
|
73103
73368
|
return new Promise(function(resolve2, reject) {
|
|
73369
|
+
let settled = false;
|
|
73370
|
+
let opened = false;
|
|
73371
|
+
let timer = null;
|
|
73372
|
+
const fail = function(reason) {
|
|
73373
|
+
if (settled) return;
|
|
73374
|
+
settled = true;
|
|
73375
|
+
if (timer) clearTimeout(timer);
|
|
73376
|
+
reject(new Error(reason));
|
|
73377
|
+
};
|
|
73378
|
+
const succeed = function() {
|
|
73379
|
+
if (settled) return;
|
|
73380
|
+
settled = true;
|
|
73381
|
+
if (timer) clearTimeout(timer);
|
|
73382
|
+
resolve2();
|
|
73383
|
+
};
|
|
73384
|
+
timer = setTimeout(function() {
|
|
73385
|
+
fail("连接 " + url + " 超时:10s 内未完成 WebSocket 握手");
|
|
73386
|
+
try {
|
|
73387
|
+
if (self2._ws) self2._ws.close();
|
|
73388
|
+
} catch (e) {
|
|
73389
|
+
}
|
|
73390
|
+
}, 1e4);
|
|
73104
73391
|
const ws = new WebSocket(url);
|
|
73105
73392
|
self2._ws = ws;
|
|
73106
73393
|
console.log("[WS][loginToServer] WebSocket 实例已创建, url=" + url + ", readyState=" + ws.readyState);
|
|
73107
73394
|
ws.onopen = function() {
|
|
73108
73395
|
console.log("[WS][loginToServer] onopen 触发, connected to", url);
|
|
73396
|
+
opened = true;
|
|
73109
73397
|
self2._everConnected = true;
|
|
73110
73398
|
self2._startHeartbeat();
|
|
73111
73399
|
self2._emit("connected", {});
|
|
73112
73400
|
if (loginPayload) {
|
|
73113
73401
|
self2._send(loginPayload);
|
|
73114
73402
|
}
|
|
73115
|
-
|
|
73403
|
+
succeed();
|
|
73116
73404
|
};
|
|
73117
73405
|
ws.onmessage = function(event) {
|
|
73118
73406
|
try {
|
|
@@ -73126,11 +73414,16 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73126
73414
|
console.log("[WS][loginToServer] onclose 触发, code=" + event.code + ", reason=" + event.reason + ", wasClean=" + event.wasClean);
|
|
73127
73415
|
self2._stopHeartbeat();
|
|
73128
73416
|
self2._loggedIn = false;
|
|
73417
|
+
if (!opened) {
|
|
73418
|
+
fail("WebSocket 握手失败(close code=" + event.code + (event.reason ? ", " + event.reason : "") + "):" + url);
|
|
73419
|
+
return;
|
|
73420
|
+
}
|
|
73129
73421
|
if (!self2._intentionalClose) self2._scheduleReconnect();
|
|
73130
73422
|
};
|
|
73131
73423
|
ws.onerror = function(err) {
|
|
73132
|
-
|
|
73133
|
-
|
|
73424
|
+
const detail = err && err.message ? err.message : err && err.type ? err.type : "unknown";
|
|
73425
|
+
console.warn("[WS][loginToServer] onerror 触发, url=" + url + ", detail=" + detail);
|
|
73426
|
+
if (!opened) fail("无法建立 WebSocket 连接(" + detail + "):" + url);
|
|
73134
73427
|
};
|
|
73135
73428
|
});
|
|
73136
73429
|
}
|
|
@@ -73275,6 +73568,38 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73275
73568
|
return null;
|
|
73276
73569
|
}
|
|
73277
73570
|
}
|
|
73571
|
+
/**
|
|
73572
|
+
* 老服务端不认识 DSH 时的静默降级。
|
|
73573
|
+
*
|
|
73574
|
+
* 触发条件(同时满足才降级):
|
|
73575
|
+
* 1) 服务端回了「消息内容解析异常」,且这次登录还没收到任何业务帧(_loginAcked=false);
|
|
73576
|
+
* 2) 本次上报的平台不是老枚举里已有的值(WEB / IDEA / COMMAND);
|
|
73577
|
+
* 3) 同一个塘只降级一次,避免死循环。
|
|
73578
|
+
*
|
|
73579
|
+
* 命中后就地把 LOGIN 的 platform 改成 WEB 重发——第一次 LOGIN 在反序列化阶段就失败了,
|
|
73580
|
+
* 服务端并没有绑定这个 channel,所以同一连接重发不会撞「已登录」。同时记住这个塘,
|
|
73581
|
+
* 下次直接按降级值发。
|
|
73582
|
+
*
|
|
73583
|
+
* @returns {boolean} true 表示这条 SYSTEM 已被当作降级中间态吞掉,不要展示给用户
|
|
73584
|
+
*/
|
|
73585
|
+
_maybeDowngradePlatform(sysText) {
|
|
73586
|
+
const payload = this._loginPayload;
|
|
73587
|
+
if (!payload || !payload.body) return false;
|
|
73588
|
+
const ok = shouldDowngradePlatform({
|
|
73589
|
+
platform: payload.body.platform,
|
|
73590
|
+
text: sysText,
|
|
73591
|
+
acked: this._loginAcked,
|
|
73592
|
+
downgraded: this._platformDowngraded
|
|
73593
|
+
});
|
|
73594
|
+
if (!ok) return false;
|
|
73595
|
+
const raw = String(payload.body.platform || "").toUpperCase();
|
|
73596
|
+
console.log("[WS] 目标塘不认识平台 " + raw + ",降级为 " + PLATFORM_FALLBACK + " 重发 LOGIN");
|
|
73597
|
+
this._platformDowngraded = true;
|
|
73598
|
+
payload.body.platform = PLATFORM_FALLBACK;
|
|
73599
|
+
rememberPlatformFallback(this._loginKey);
|
|
73600
|
+
this._send(payload);
|
|
73601
|
+
return true;
|
|
73602
|
+
}
|
|
73278
73603
|
_send(data) {
|
|
73279
73604
|
if (this._ws && this._ws.readyState === WebSocket.OPEN) {
|
|
73280
73605
|
if (data && data.action === "LOGIN") this._loggedIn = true;
|
|
@@ -73925,7 +74250,13 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73925
74250
|
/** @提醒通知等级:1 正常(ElNotification 标准卡片)/ 2 隐晦(右下角低调轻提示 3s)/ 3 关闭;默认 2(摸鱼场景低调优先) */
|
|
73926
74251
|
msgNotify: 2,
|
|
73927
74252
|
/** 管理员 Token:登录时作为 LOGIN 的 token 字段上报,与服务端 application.yml 的 token 一致即获得管理员权限 */
|
|
73928
|
-
adminToken: ""
|
|
74253
|
+
adminToken: "",
|
|
74254
|
+
/**
|
|
74255
|
+
* 界面极简模式:true = 隐藏左侧导航栏,只留聊天区(消息列表 + 输入框);
|
|
74256
|
+
* 其它页面(浏览器/游戏/在线列表/设置)改由 #browser/#games/#users/#settings 命令打开。
|
|
74257
|
+
* 开关入口:右上角悬浮按钮,或 #ui 0/1 命令(#minimal 等价 #ui 1)。
|
|
74258
|
+
*/
|
|
74259
|
+
minimalMode: false
|
|
73929
74260
|
};
|
|
73930
74261
|
const BROWSER_THEMES = ["auto", "dark", "light", "off"];
|
|
73931
74262
|
function normalizeBrowserTheme(raw) {
|
|
@@ -73973,7 +74304,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73973
74304
|
}
|
|
73974
74305
|
const useSettingsStore = /* @__PURE__ */ defineStore("settings", {
|
|
73975
74306
|
state: () => {
|
|
73976
|
-
var _a, _b, _c, _d, _e;
|
|
74307
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73977
74308
|
const saved2 = loadSettings() || {};
|
|
73978
74309
|
return {
|
|
73979
74310
|
pluginOpacity: (_a = saved2.pluginOpacity) != null ? _a : defaults$1.pluginOpacity,
|
|
@@ -73988,7 +74319,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73988
74319
|
msgNotify: (_d = normalizeNotifyLevel(saved2.msgNotify)) != null ? _d : defaults$1.msgNotify,
|
|
73989
74320
|
adminToken: (_e = saved2.adminToken) != null ? _e : defaults$1.adminToken,
|
|
73990
74321
|
browserTheme: normalizeBrowserTheme(saved2.browserTheme),
|
|
73991
|
-
browserDim: normalizeBrowserDim(saved2.browserDim)
|
|
74322
|
+
browserDim: normalizeBrowserDim(saved2.browserDim),
|
|
74323
|
+
minimalMode: (_f = saved2.minimalMode) != null ? _f : defaults$1.minimalMode
|
|
73992
74324
|
};
|
|
73993
74325
|
},
|
|
73994
74326
|
actions: {
|
|
@@ -74051,6 +74383,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74051
74383
|
this.browserDim = normalizeBrowserDim(value);
|
|
74052
74384
|
this.persist();
|
|
74053
74385
|
},
|
|
74386
|
+
/** 切换界面极简模式(true = 极简,只留聊天区与输入框) */
|
|
74387
|
+
setMinimalMode(value) {
|
|
74388
|
+
this.minimalMode = !!value;
|
|
74389
|
+
this.persist();
|
|
74390
|
+
},
|
|
74054
74391
|
persist() {
|
|
74055
74392
|
saveSettings({
|
|
74056
74393
|
pluginOpacity: this.pluginOpacity,
|
|
@@ -74065,7 +74402,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74065
74402
|
msgNotify: this.msgNotify,
|
|
74066
74403
|
adminToken: this.adminToken,
|
|
74067
74404
|
browserTheme: this.browserTheme,
|
|
74068
|
-
browserDim: this.browserDim
|
|
74405
|
+
browserDim: this.browserDim,
|
|
74406
|
+
minimalMode: this.minimalMode
|
|
74069
74407
|
});
|
|
74070
74408
|
}
|
|
74071
74409
|
}
|
|
@@ -74591,15 +74929,15 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74591
74929
|
const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
74592
74930
|
const ssrSupport = /* @__PURE__ */ shallowRef(typeof ssrWidth === "number");
|
|
74593
74931
|
const mediaQuery = /* @__PURE__ */ shallowRef();
|
|
74594
|
-
const
|
|
74932
|
+
const matches2 = /* @__PURE__ */ shallowRef(false);
|
|
74595
74933
|
const handler = (event) => {
|
|
74596
|
-
|
|
74934
|
+
matches2.value = event.matches;
|
|
74597
74935
|
};
|
|
74598
74936
|
watchEffect(() => {
|
|
74599
74937
|
if (ssrSupport.value) {
|
|
74600
74938
|
ssrSupport.value = !isSupported.value;
|
|
74601
74939
|
const queryStrings = toValue(query).split(",");
|
|
74602
|
-
|
|
74940
|
+
matches2.value = queryStrings.some((queryString) => {
|
|
74603
74941
|
const not = queryString.includes("not all");
|
|
74604
74942
|
const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
74605
74943
|
const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
@@ -74617,10 +74955,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74617
74955
|
if (!isSupported.value)
|
|
74618
74956
|
return;
|
|
74619
74957
|
mediaQuery.value = window2.matchMedia(toValue(query));
|
|
74620
|
-
|
|
74958
|
+
matches2.value = mediaQuery.value.matches;
|
|
74621
74959
|
});
|
|
74622
74960
|
useEventListener(mediaQuery, "change", handler, { passive: true });
|
|
74623
|
-
return computed(() =>
|
|
74961
|
+
return computed(() => matches2.value);
|
|
74624
74962
|
}
|
|
74625
74963
|
const _global$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
74626
74964
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
@@ -75025,8 +75363,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75025
75363
|
const COMMAND_DEFS = [
|
|
75026
75364
|
{ command: "alive", args: "{0|1}", desc: "活着,0关闭 / 1开启" },
|
|
75027
75365
|
{ command: "backgroundImage", desc: "切换背景图片" },
|
|
75366
|
+
{ command: "browser", desc: "打开内置浏览器" },
|
|
75367
|
+
{ command: "chat", desc: "回到聊天页" },
|
|
75028
75368
|
{ command: "clean", desc: "清屏" },
|
|
75029
75369
|
{ command: "exit", desc: "退出登录" },
|
|
75370
|
+
{ command: "games", desc: "打开游戏大厅" },
|
|
75030
75371
|
{ command: "help", desc: "显示此帮助" },
|
|
75031
75372
|
{ command: "login", args: "{昵称} [-s 编号 -h IP -p 端口 -c]", desc: "登录鱼塘" },
|
|
75032
75373
|
{ command: "loging", desc: "快速登录(默认服务器0)", inHelp: false },
|
|
@@ -75036,11 +75377,14 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75036
75377
|
{ command: "notify", args: "{1|2|3}", desc: "通知:1正常 / 2隐晦 / 3关闭" },
|
|
75037
75378
|
{ command: "open", args: "[{编号}]", desc: "打开工具" },
|
|
75038
75379
|
{ command: "setStatus", args: "{状态值}", desc: "设置当前状态" },
|
|
75380
|
+
{ command: "settings", desc: "打开设置页" },
|
|
75039
75381
|
{ command: "showGame", desc: "跳转游戏大厅" },
|
|
75040
75382
|
{ command: "showKey", desc: "查看当前快捷键" },
|
|
75041
75383
|
{ command: "showMode", desc: "查看模式选项" },
|
|
75042
75384
|
{ command: "showServer", args: "[-c]", desc: "鱼塘列表,-c 清理缓存" },
|
|
75043
75385
|
{ command: "showStatus", desc: "查看可用状态值" },
|
|
75386
|
+
{ command: "ui", args: "{0|1}", desc: "界面模式:0 普通 / 1 极简(只留聊天区)" },
|
|
75387
|
+
{ command: "users", desc: "打开在线列表" },
|
|
75044
75388
|
{ command: "weather", args: "{地名} [-d 0|3|7]", desc: "天气查询" }
|
|
75045
75389
|
];
|
|
75046
75390
|
function buildFull(def2) {
|
|
@@ -75078,6 +75422,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75078
75422
|
|
|
75079
75423
|
> *Tips*: \`{ }\` 必填参数,\`[ ]\` 可选参数,参数以空格分隔。
|
|
75080
75424
|
|
|
75425
|
+
> *Tips*: 右上角小按钮或 \`#ui 1\` 进入**极简模式**(只留聊天区 + 输入框,不占地方);
|
|
75426
|
+
> 浏览器/游戏/在线列表/设置用 \`#browser\` / \`#games\` / \`#users\` / \`#settings\` 打开,\`#chat\` 回聊天,\`#ui 0\` 回普通模式。
|
|
75427
|
+
|
|
75081
75428
|
[开源](https://github.com/anlingyi/xechat-idea) · [更多](https://xeblog.cn/?tag=xechat-idea)`;
|
|
75082
75429
|
const useHelpStore = /* @__PURE__ */ defineStore("help", {
|
|
75083
75430
|
getters: {
|
|
@@ -82663,7 +83010,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
82663
83010
|
class: "image-msg-preview"
|
|
82664
83011
|
};
|
|
82665
83012
|
const _hoisted_5$9 = ["src"];
|
|
82666
|
-
const _hoisted_6$
|
|
83013
|
+
const _hoisted_6$9 = {
|
|
82667
83014
|
key: 1,
|
|
82668
83015
|
class: "image-only-placeholder"
|
|
82669
83016
|
};
|
|
@@ -82992,7 +83339,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
82992
83339
|
onClick: _cache[1] || (_cache[1] = ($event) => imageLoaded.value = false)
|
|
82993
83340
|
}, "×")
|
|
82994
83341
|
]))
|
|
82995
|
-
])) : hasMarkdownImage.value && !showImage.value ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
83342
|
+
])) : hasMarkdownImage.value && !showImage.value ? (openBlock(), createElementBlock("div", _hoisted_6$9, [
|
|
82996
83343
|
createVNode(_component_el_button, {
|
|
82997
83344
|
size: "small",
|
|
82998
83345
|
onClick: _cache[2] || (_cache[2] = ($event) => showImage.value = true)
|
|
@@ -95215,44 +95562,45 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95215
95562
|
lines.push("", pick(ENDS), "", "欢迎加入摸鱼技术交流群:754126966");
|
|
95216
95563
|
return mdBreak(lines.join("\n"));
|
|
95217
95564
|
}
|
|
95218
|
-
const _hoisted_1$8 = { class: "
|
|
95219
|
-
const _hoisted_2$8 = { class: "system-msg-
|
|
95220
|
-
const _hoisted_3$8 = { class: "system-msg-
|
|
95221
|
-
const _hoisted_4$8 = { class: "system-msg-
|
|
95222
|
-
const _hoisted_5$8 = {
|
|
95223
|
-
const _hoisted_6$7 = {
|
|
95565
|
+
const _hoisted_1$8 = { class: "system-msg-icon" };
|
|
95566
|
+
const _hoisted_2$8 = { class: "system-msg-body" };
|
|
95567
|
+
const _hoisted_3$8 = { class: "system-msg-title" };
|
|
95568
|
+
const _hoisted_4$8 = { class: "system-msg-text" };
|
|
95569
|
+
const _hoisted_5$8 = {
|
|
95224
95570
|
key: 0,
|
|
95225
95571
|
class: "empty-hint"
|
|
95226
95572
|
};
|
|
95227
|
-
const
|
|
95228
|
-
const
|
|
95229
|
-
const
|
|
95573
|
+
const _hoisted_6$8 = { class: "scroll-float" };
|
|
95574
|
+
const _hoisted_7$7 = ["title"];
|
|
95575
|
+
const _hoisted_8$7 = { class: "ui-mode-label" };
|
|
95576
|
+
const _hoisted_9$7 = { class: "input-area" };
|
|
95577
|
+
const _hoisted_10$6 = {
|
|
95230
95578
|
key: 0,
|
|
95231
95579
|
class: "at-panel"
|
|
95232
95580
|
};
|
|
95233
|
-
const
|
|
95581
|
+
const _hoisted_11$6 = {
|
|
95234
95582
|
key: 0,
|
|
95235
95583
|
class: "at-empty"
|
|
95236
95584
|
};
|
|
95237
|
-
const
|
|
95238
|
-
const
|
|
95239
|
-
const
|
|
95240
|
-
const
|
|
95585
|
+
const _hoisted_12$4 = ["onMousedown", "onMouseenter"];
|
|
95586
|
+
const _hoisted_13$4 = { class: "at-status" };
|
|
95587
|
+
const _hoisted_14$3 = { class: "at-name" };
|
|
95588
|
+
const _hoisted_15$3 = {
|
|
95241
95589
|
key: 0,
|
|
95242
95590
|
class: "at-region"
|
|
95243
95591
|
};
|
|
95244
|
-
const
|
|
95592
|
+
const _hoisted_16$3 = {
|
|
95245
95593
|
key: 1,
|
|
95246
95594
|
class: "cmd-panel"
|
|
95247
95595
|
};
|
|
95248
|
-
const
|
|
95596
|
+
const _hoisted_17$3 = {
|
|
95249
95597
|
key: 0,
|
|
95250
95598
|
class: "cmd-empty"
|
|
95251
95599
|
};
|
|
95252
|
-
const
|
|
95253
|
-
const
|
|
95254
|
-
const
|
|
95255
|
-
const
|
|
95600
|
+
const _hoisted_18$3 = ["onMousedown", "onMouseenter"];
|
|
95601
|
+
const _hoisted_19$2 = { class: "cmd-name" };
|
|
95602
|
+
const _hoisted_20$2 = { class: "cmd-desc" };
|
|
95603
|
+
const _hoisted_21$2 = { class: "input-row" };
|
|
95256
95604
|
const _sfc_main$8 = {
|
|
95257
95605
|
__name: "ChatPanel",
|
|
95258
95606
|
setup(__props) {
|
|
@@ -95267,6 +95615,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95267
95615
|
const maskStore = useMaskStore();
|
|
95268
95616
|
const modeStore = useModeStore();
|
|
95269
95617
|
const aliveStore = useAliveStore();
|
|
95618
|
+
const minimalMode = computed(() => settingsStore.minimalMode);
|
|
95270
95619
|
const messageListRef = /* @__PURE__ */ ref(null);
|
|
95271
95620
|
const inputRef = /* @__PURE__ */ ref(null);
|
|
95272
95621
|
const inputText = /* @__PURE__ */ ref("");
|
|
@@ -95291,6 +95640,15 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95291
95640
|
el.scrollTop = el.scrollHeight;
|
|
95292
95641
|
});
|
|
95293
95642
|
}
|
|
95643
|
+
function onToggleUiMode(val) {
|
|
95644
|
+
settingsStore.setMinimalMode(val === true);
|
|
95645
|
+
if (!val) return;
|
|
95646
|
+
nextTick(() => {
|
|
95647
|
+
var _a;
|
|
95648
|
+
scrollToBottom();
|
|
95649
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
95650
|
+
});
|
|
95651
|
+
}
|
|
95294
95652
|
watch(() => chatStore.messages.length, (newLen, oldLen) => {
|
|
95295
95653
|
console.log("[ChatPanel] messages.length 变化: " + oldLen + " -> " + newLen);
|
|
95296
95654
|
nextTick(() => {
|
|
@@ -95418,7 +95776,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95418
95776
|
saveSession({ host, port, username, pondName, status: "FISHING" });
|
|
95419
95777
|
chatStore.addMessage("已连接到 " + host + ":" + port + ",登录中...");
|
|
95420
95778
|
} catch (e) {
|
|
95421
|
-
|
|
95779
|
+
const detail = e && e.message ? e.message : "未知错误";
|
|
95780
|
+
console.error("[ChatPanel] 连接服务器失败: " + detail);
|
|
95781
|
+
state.online = false;
|
|
95782
|
+
state.username = "";
|
|
95783
|
+
chatStore.addMessage("登录失败:" + detail);
|
|
95422
95784
|
}
|
|
95423
95785
|
}
|
|
95424
95786
|
async function restoreSession() {
|
|
@@ -95677,6 +96039,35 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95677
96039
|
state.online = false;
|
|
95678
96040
|
return true;
|
|
95679
96041
|
}
|
|
96042
|
+
const ROUTE_CMD_MAP = {
|
|
96043
|
+
"#chat": "chat",
|
|
96044
|
+
"#browser": "browser",
|
|
96045
|
+
"#games": "games",
|
|
96046
|
+
"#users": "users",
|
|
96047
|
+
"#settings": "settings"
|
|
96048
|
+
};
|
|
96049
|
+
function handleRouteCmd(cmd) {
|
|
96050
|
+
const route = ROUTE_CMD_MAP[cmd];
|
|
96051
|
+
if (!route) return false;
|
|
96052
|
+
state.currentRoute = route;
|
|
96053
|
+
return true;
|
|
96054
|
+
}
|
|
96055
|
+
function handleUiCmd(text2) {
|
|
96056
|
+
const arg = text2.trim().split(/\s+/).slice(1)[0] || "";
|
|
96057
|
+
if (!arg) {
|
|
96058
|
+
chatStore.addMessage("当前界面模式:**" + (settingsStore.minimalMode ? "极简" : "普通") + "**\n\n用法:`#ui 0` 普通模式(左侧导航栏) / `#ui 1` 极简模式(只有聊天区 + 输入框)");
|
|
96059
|
+
return true;
|
|
96060
|
+
}
|
|
96061
|
+
const num = parseInt(arg, 10);
|
|
96062
|
+
if (num !== 0 && num !== 1) {
|
|
96063
|
+
chatStore.addMessage("用法:`#ui 0` 普通模式 / `#ui 1` 极简模式");
|
|
96064
|
+
return true;
|
|
96065
|
+
}
|
|
96066
|
+
settingsStore.setMinimalMode(num === 1);
|
|
96067
|
+
if (num === 1) state.currentRoute = "chat";
|
|
96068
|
+
chatStore.addMessage("已切换到【" + (num === 1 ? "极简" : "普通") + "】模式" + (num === 1 ? "\n\n> 其它页面用 `#browser` / `#games` / `#users` / `#settings` 打开,`#chat` 返回聊天。" : ""));
|
|
96069
|
+
return true;
|
|
96070
|
+
}
|
|
95680
96071
|
function handleShowGameCmd(text2) {
|
|
95681
96072
|
if (!text2.startsWith("#showGame")) return false;
|
|
95682
96073
|
state.currentRoute = "games";
|
|
@@ -95871,6 +96262,18 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95871
96262
|
return handleExitCmd(text2);
|
|
95872
96263
|
case "#showgame":
|
|
95873
96264
|
return handleShowGameCmd(text2);
|
|
96265
|
+
// 页面跳转(极简模式下没有侧栏,靠这些命令切换页面)
|
|
96266
|
+
case "#chat":
|
|
96267
|
+
case "#browser":
|
|
96268
|
+
case "#games":
|
|
96269
|
+
case "#users":
|
|
96270
|
+
case "#settings":
|
|
96271
|
+
return handleRouteCmd(cmd);
|
|
96272
|
+
// 界面模式:普通 / 极简(#minimal 直接切极简,等价 #ui 1)
|
|
96273
|
+
case "#ui":
|
|
96274
|
+
return handleUiCmd(text2);
|
|
96275
|
+
case "#minimal":
|
|
96276
|
+
return handleUiCmd("#ui 1");
|
|
95874
96277
|
case "#showserver":
|
|
95875
96278
|
return await handleShowServerCmd(text2);
|
|
95876
96279
|
case "#showstatus":
|
|
@@ -95993,13 +96396,40 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95993
96396
|
});
|
|
95994
96397
|
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
95995
96398
|
});
|
|
96399
|
+
let savedScrollTop = 0;
|
|
96400
|
+
let keepAtBottom = true;
|
|
96401
|
+
function _isAtBottom() {
|
|
96402
|
+
const el = messageListRef.value;
|
|
96403
|
+
if (!el) return true;
|
|
96404
|
+
return el.scrollHeight - el.scrollTop - el.clientHeight < 40;
|
|
96405
|
+
}
|
|
96406
|
+
onDeactivated(() => {
|
|
96407
|
+
const el = messageListRef.value;
|
|
96408
|
+
if (el) savedScrollTop = el.scrollTop;
|
|
96409
|
+
keepAtBottom = _isAtBottom();
|
|
96410
|
+
});
|
|
96411
|
+
onActivated(() => {
|
|
96412
|
+
var _a;
|
|
96413
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
96414
|
+
nextTick(() => {
|
|
96415
|
+
requestAnimationFrame(() => {
|
|
96416
|
+
const el = messageListRef.value;
|
|
96417
|
+
if (!el) return;
|
|
96418
|
+
el.scrollTop = keepAtBottom ? el.scrollHeight : savedScrollTop;
|
|
96419
|
+
onMessageScroll();
|
|
96420
|
+
});
|
|
96421
|
+
});
|
|
96422
|
+
});
|
|
95996
96423
|
return (_ctx, _cache) => {
|
|
96424
|
+
const _component_el_switch = resolveComponent("el-switch");
|
|
95997
96425
|
const _component_Top = resolveComponent("Top");
|
|
95998
96426
|
const _component_el_icon = resolveComponent("el-icon");
|
|
95999
96427
|
const _component_el_button = resolveComponent("el-button");
|
|
96000
96428
|
const _component_Bottom = resolveComponent("Bottom");
|
|
96001
96429
|
const _component_el_input = resolveComponent("el-input");
|
|
96002
|
-
return openBlock(), createElementBlock("div",
|
|
96430
|
+
return openBlock(), createElementBlock("div", {
|
|
96431
|
+
class: normalizeClass(["chat-panel", { "is-minimal": minimalMode.value }])
|
|
96432
|
+
}, [
|
|
96003
96433
|
createBaseVNode("div", {
|
|
96004
96434
|
class: "message-list",
|
|
96005
96435
|
ref_key: "messageListRef",
|
|
@@ -96015,10 +96445,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96015
96445
|
key: 0,
|
|
96016
96446
|
class: normalizeClass(["system-msg-box", classifySystemMsg(msg.text)])
|
|
96017
96447
|
}, [
|
|
96018
|
-
createBaseVNode("span",
|
|
96019
|
-
createBaseVNode("div",
|
|
96020
|
-
createBaseVNode("div",
|
|
96021
|
-
createBaseVNode("div",
|
|
96448
|
+
createBaseVNode("span", _hoisted_1$8, toDisplayString(systemMsgIcon(msg.text)), 1),
|
|
96449
|
+
createBaseVNode("div", _hoisted_2$8, [
|
|
96450
|
+
createBaseVNode("div", _hoisted_3$8, toDisplayString(systemMsgTitle(msg.text)), 1),
|
|
96451
|
+
createBaseVNode("div", _hoisted_4$8, toDisplayString(stripHtml(msg.text)), 1)
|
|
96022
96452
|
])
|
|
96023
96453
|
], 2)) : (openBlock(), createBlock(MarkdownMessage, {
|
|
96024
96454
|
key: 1,
|
|
@@ -96028,9 +96458,20 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96028
96458
|
}, null, 8, ["content", "msg-type", "file-name"]))
|
|
96029
96459
|
]);
|
|
96030
96460
|
}), 128)),
|
|
96031
|
-
unref(chatStore).isEmpty ? (openBlock(), createElementBlock("div",
|
|
96461
|
+
unref(chatStore).isEmpty ? (openBlock(), createElementBlock("div", _hoisted_5$8, " 暂无消息 ")) : createCommentVNode("", true)
|
|
96032
96462
|
], 544),
|
|
96033
|
-
createBaseVNode("div",
|
|
96463
|
+
createBaseVNode("div", _hoisted_6$8, [
|
|
96464
|
+
createBaseVNode("div", {
|
|
96465
|
+
class: normalizeClass(["ui-mode-switch", { "is-minimal": minimalMode.value }]),
|
|
96466
|
+
title: minimalMode.value ? "当前极简模式,点击切回普通模式(#ui 0)" : "当前普通模式,点击切到极简模式(#ui 1)"
|
|
96467
|
+
}, [
|
|
96468
|
+
createBaseVNode("span", _hoisted_8$7, toDisplayString(minimalMode.value ? "极简" : "普通"), 1),
|
|
96469
|
+
createVNode(_component_el_switch, {
|
|
96470
|
+
"model-value": minimalMode.value,
|
|
96471
|
+
size: "small",
|
|
96472
|
+
onChange: onToggleUiMode
|
|
96473
|
+
}, null, 8, ["model-value"])
|
|
96474
|
+
], 10, _hoisted_7$7),
|
|
96034
96475
|
showTopBtn.value ? (openBlock(), createBlock(_component_el_button, {
|
|
96035
96476
|
key: 0,
|
|
96036
96477
|
class: "float-btn",
|
|
@@ -96068,9 +96509,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96068
96509
|
_: 1
|
|
96069
96510
|
})) : createCommentVNode("", true)
|
|
96070
96511
|
]),
|
|
96071
|
-
createBaseVNode("div",
|
|
96072
|
-
atPanelVisible.value ? (openBlock(), createElementBlock("div",
|
|
96073
|
-
atFilteredUsers.value.length === 0 ? (openBlock(), createElementBlock("div",
|
|
96512
|
+
createBaseVNode("div", _hoisted_9$7, [
|
|
96513
|
+
atPanelVisible.value ? (openBlock(), createElementBlock("div", _hoisted_10$6, [
|
|
96514
|
+
atFilteredUsers.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_11$6, "无匹配用户")) : createCommentVNode("", true),
|
|
96074
96515
|
(openBlock(true), createElementBlock(Fragment, null, renderList(atFilteredUsers.value, (u2, i) => {
|
|
96075
96516
|
return openBlock(), createElementBlock("div", {
|
|
96076
96517
|
key: u2.username,
|
|
@@ -96078,14 +96519,14 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96078
96519
|
onMousedown: withModifiers(($event) => selectAtUser(u2), ["prevent"]),
|
|
96079
96520
|
onMouseenter: ($event) => atActiveIndex.value = i
|
|
96080
96521
|
}, [
|
|
96081
|
-
createBaseVNode("span",
|
|
96082
|
-
createBaseVNode("span",
|
|
96083
|
-
u2.shortRegion ? (openBlock(), createElementBlock("span",
|
|
96084
|
-
], 42,
|
|
96522
|
+
createBaseVNode("span", _hoisted_13$4, toDisplayString(atStatusIcon(u2.status)), 1),
|
|
96523
|
+
createBaseVNode("span", _hoisted_14$3, toDisplayString(u2.username), 1),
|
|
96524
|
+
u2.shortRegion ? (openBlock(), createElementBlock("span", _hoisted_15$3, "[" + toDisplayString(u2.shortRegion) + "]", 1)) : createCommentVNode("", true)
|
|
96525
|
+
], 42, _hoisted_12$4);
|
|
96085
96526
|
}), 128))
|
|
96086
96527
|
])) : createCommentVNode("", true),
|
|
96087
|
-
cmdPanelVisible.value ? (openBlock(), createElementBlock("div",
|
|
96088
|
-
cmdFilteredCommands.value.length === 0 ? (openBlock(), createElementBlock("div",
|
|
96528
|
+
cmdPanelVisible.value ? (openBlock(), createElementBlock("div", _hoisted_16$3, [
|
|
96529
|
+
cmdFilteredCommands.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_17$3, "无匹配命令")) : createCommentVNode("", true),
|
|
96089
96530
|
(openBlock(true), createElementBlock(Fragment, null, renderList(cmdFilteredCommands.value, (c2, i) => {
|
|
96090
96531
|
return openBlock(), createElementBlock("div", {
|
|
96091
96532
|
key: c2.name,
|
|
@@ -96093,12 +96534,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96093
96534
|
onMousedown: withModifiers(($event) => selectCmdCommand(c2), ["prevent"]),
|
|
96094
96535
|
onMouseenter: ($event) => cmdActiveIndex.value = i
|
|
96095
96536
|
}, [
|
|
96096
|
-
createBaseVNode("span",
|
|
96097
|
-
createBaseVNode("span",
|
|
96098
|
-
], 42,
|
|
96537
|
+
createBaseVNode("span", _hoisted_19$2, toDisplayString(c2.full), 1),
|
|
96538
|
+
createBaseVNode("span", _hoisted_20$2, toDisplayString(c2.desc), 1)
|
|
96539
|
+
], 42, _hoisted_18$3);
|
|
96099
96540
|
}), 128))
|
|
96100
96541
|
])) : createCommentVNode("", true),
|
|
96101
|
-
createBaseVNode("div",
|
|
96542
|
+
createBaseVNode("div", _hoisted_21$2, [
|
|
96102
96543
|
createVNode(StyleSelector, { onSelect: onStyleSelect }),
|
|
96103
96544
|
createVNode(_component_el_input, {
|
|
96104
96545
|
ref_key: "inputRef",
|
|
@@ -96119,11 +96560,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96119
96560
|
}, null, 8, ["modelValue"])
|
|
96120
96561
|
])
|
|
96121
96562
|
])
|
|
96122
|
-
]);
|
|
96563
|
+
], 2);
|
|
96123
96564
|
};
|
|
96124
96565
|
}
|
|
96125
96566
|
};
|
|
96126
|
-
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
96567
|
+
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-06baa24a"]]);
|
|
96127
96568
|
const PALETTES = {
|
|
96128
96569
|
dark: {
|
|
96129
96570
|
/** iframe 背后的底色:页面加载中/空白时露出的颜色 */
|
|
@@ -96189,7 +96630,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96189
96630
|
const _hoisted_3$7 = ["disabled"];
|
|
96190
96631
|
const _hoisted_4$7 = ["disabled"];
|
|
96191
96632
|
const _hoisted_5$7 = ["disabled"];
|
|
96192
|
-
const _hoisted_6$
|
|
96633
|
+
const _hoisted_6$7 = ["disabled"];
|
|
96193
96634
|
const _hoisted_7$6 = { class: "preset-bar" };
|
|
96194
96635
|
const _hoisted_8$6 = ["title", "onClick"];
|
|
96195
96636
|
const _hoisted_9$6 = { class: "chip-text" };
|
|
@@ -96506,7 +96947,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96506
96947
|
]),
|
|
96507
96948
|
_: 1
|
|
96508
96949
|
})
|
|
96509
|
-
], 8, _hoisted_6$
|
|
96950
|
+
], 8, _hoisted_6$7)
|
|
96510
96951
|
]),
|
|
96511
96952
|
createBaseVNode("div", _hoisted_7$6, [
|
|
96512
96953
|
_cache[6] || (_cache[6] = createBaseVNode("span", { class: "group-label" }, "内嵌", -1)),
|
|
@@ -97039,10 +97480,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
97039
97480
|
}
|
|
97040
97481
|
};
|
|
97041
97482
|
const matchAll = (regExp, str) => {
|
|
97042
|
-
let
|
|
97483
|
+
let matches2;
|
|
97043
97484
|
const arr = [];
|
|
97044
|
-
while ((
|
|
97045
|
-
arr.push(
|
|
97485
|
+
while ((matches2 = regExp.exec(str)) !== null) {
|
|
97486
|
+
arr.push(matches2);
|
|
97046
97487
|
}
|
|
97047
97488
|
return arr;
|
|
97048
97489
|
};
|
|
@@ -100794,7 +101235,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100794
101235
|
key: 0,
|
|
100795
101236
|
class: "field"
|
|
100796
101237
|
};
|
|
100797
|
-
const _hoisted_6$
|
|
101238
|
+
const _hoisted_6$6 = { class: "field" };
|
|
100798
101239
|
const _hoisted_7$5 = {
|
|
100799
101240
|
key: 1,
|
|
100800
101241
|
class: "error-msg"
|
|
@@ -100870,7 +101311,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100870
101311
|
[vModelText, form.nickname]
|
|
100871
101312
|
])
|
|
100872
101313
|
])) : createCommentVNode("", true),
|
|
100873
|
-
createBaseVNode("div", _hoisted_6$
|
|
101314
|
+
createBaseVNode("div", _hoisted_6$6, [
|
|
100874
101315
|
withDirectives(createBaseVNode("input", {
|
|
100875
101316
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.password = $event),
|
|
100876
101317
|
class: "input",
|
|
@@ -100935,7 +101376,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
100935
101376
|
key: 2,
|
|
100936
101377
|
class: "empty-hint"
|
|
100937
101378
|
};
|
|
100938
|
-
const _hoisted_6$
|
|
101379
|
+
const _hoisted_6$5 = {
|
|
100939
101380
|
key: 3,
|
|
100940
101381
|
class: "game-grid"
|
|
100941
101382
|
};
|
|
@@ -101024,7 +101465,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101024
101465
|
}, toDisplayString(cat.name), 11, _hoisted_3$5);
|
|
101025
101466
|
}), 128))
|
|
101026
101467
|
])) : createCommentVNode("", true),
|
|
101027
|
-
loading.value ? (openBlock(), createElementBlock("div", _hoisted_4$5, "加载中...")) : games.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$5, "暂无可用游戏")) : (openBlock(), createElementBlock("div", _hoisted_6$
|
|
101468
|
+
loading.value ? (openBlock(), createElementBlock("div", _hoisted_4$5, "加载中...")) : games.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$5, "暂无可用游戏")) : (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
101028
101469
|
(openBlock(true), createElementBlock(Fragment, null, renderList(games.value, (game) => {
|
|
101029
101470
|
return openBlock(), createElementBlock("div", {
|
|
101030
101471
|
key: game.id,
|
|
@@ -101066,7 +101507,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101066
101507
|
class: "user-name"
|
|
101067
101508
|
};
|
|
101068
101509
|
const _hoisted_5$4 = { class: "game-player" };
|
|
101069
|
-
const _hoisted_6$
|
|
101510
|
+
const _hoisted_6$4 = { class: "player-bar" };
|
|
101070
101511
|
const _hoisted_7$3 = { class: "player-title" };
|
|
101071
101512
|
const _hoisted_8$3 = { class: "bar-actions" };
|
|
101072
101513
|
const _hoisted_9$3 = { class: "opacity-control" };
|
|
@@ -101137,7 +101578,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101137
101578
|
style: normalizeStyle({ opacity: unref(settingsStore).gamePanelOpacity })
|
|
101138
101579
|
}, [
|
|
101139
101580
|
createBaseVNode("div", _hoisted_5$4, [
|
|
101140
|
-
createBaseVNode("div", _hoisted_6$
|
|
101581
|
+
createBaseVNode("div", _hoisted_6$4, [
|
|
101141
101582
|
createBaseVNode("span", _hoisted_7$3, toDisplayString(playingGame.value.gameNameZhCn || playingGame.value.gameName), 1),
|
|
101142
101583
|
createBaseVNode("div", _hoisted_8$3, [
|
|
101143
101584
|
createBaseVNode("div", _hoisted_9$3, [
|
|
@@ -101189,7 +101630,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101189
101630
|
};
|
|
101190
101631
|
const _hoisted_4$3 = { class: "group-header" };
|
|
101191
101632
|
const _hoisted_5$3 = { class: "user-status-icon" };
|
|
101192
|
-
const _hoisted_6$
|
|
101633
|
+
const _hoisted_6$3 = { class: "user-name" };
|
|
101193
101634
|
const _hoisted_7$2 = {
|
|
101194
101635
|
key: 0,
|
|
101195
101636
|
class: "user-region"
|
|
@@ -101338,7 +101779,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101338
101779
|
class: "user-item"
|
|
101339
101780
|
}, [
|
|
101340
101781
|
createBaseVNode("span", _hoisted_5$3, toDisplayString(statusIcon(u2.status)), 1),
|
|
101341
|
-
createBaseVNode("span", _hoisted_6$
|
|
101782
|
+
createBaseVNode("span", _hoisted_6$3, toDisplayString(u2.username), 1),
|
|
101342
101783
|
u2.displayRegion ? (openBlock(), createElementBlock("span", _hoisted_7$2, "[" + toDisplayString(u2.displayRegion) + "]", 1)) : createCommentVNode("", true),
|
|
101343
101784
|
createBaseVNode("span", {
|
|
101344
101785
|
class: "user-platform",
|
|
@@ -101378,7 +101819,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101378
101819
|
const _hoisted_3$2 = { class: "header-left" };
|
|
101379
101820
|
const _hoisted_4$2 = { class: "editor-body" };
|
|
101380
101821
|
const _hoisted_5$2 = { class: "style-list" };
|
|
101381
|
-
const _hoisted_6$
|
|
101822
|
+
const _hoisted_6$2 = { class: "style-name" };
|
|
101382
101823
|
const _hoisted_7$1 = ["innerHTML"];
|
|
101383
101824
|
const _hoisted_8$1 = ["onClick"];
|
|
101384
101825
|
const _hoisted_9$1 = { class: "style-name" };
|
|
@@ -101499,7 +101940,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101499
101940
|
key: s2.id,
|
|
101500
101941
|
class: "style-item builtin"
|
|
101501
101942
|
}, [
|
|
101502
|
-
createBaseVNode("span", _hoisted_6$
|
|
101943
|
+
createBaseVNode("span", _hoisted_6$2, toDisplayString(s2.name), 1),
|
|
101503
101944
|
createBaseVNode("span", {
|
|
101504
101945
|
class: "style-preview",
|
|
101505
101946
|
innerHTML: s2.tag.replace("{text}", "测试文字")
|
|
@@ -101678,7 +102119,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101678
102119
|
};
|
|
101679
102120
|
const _hoisted_4$1 = { class: "setting-inline" };
|
|
101680
102121
|
const _hoisted_5$1 = { class: "setting-inline" };
|
|
101681
|
-
const _hoisted_6 = { class: "setting-hint" };
|
|
102122
|
+
const _hoisted_6$1 = { class: "setting-hint" };
|
|
101682
102123
|
const _hoisted_7 = { class: "setting-row" };
|
|
101683
102124
|
const _hoisted_8 = { class: "setting-row" };
|
|
101684
102125
|
const _hoisted_9 = { class: "setting-row" };
|
|
@@ -101910,7 +102351,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101910
102351
|
onKeyup: withKeys(applyDockSize, ["enter"])
|
|
101911
102352
|
}, null, 8, ["modelValue", "min", "max"])
|
|
101912
102353
|
]),
|
|
101913
|
-
createBaseVNode("div", _hoisted_6, [
|
|
102354
|
+
createBaseVNode("div", _hoisted_6$1, [
|
|
101914
102355
|
createTextVNode(" 宽度 " + toDisplayString(dockLimits.value.minWidth) + "–" + toDisplayString(dockLimits.value.maxWidth) + " px,高度 " + toDisplayString(dockLimits.value.minHeight) + "–" + toDisplayString(dockLimits.value.maxHeight) + " px; 高度留空表示铺满窗口。回车或失焦立即生效。", 1),
|
|
101915
102356
|
_cache[14] || (_cache[14] = createBaseVNode("br", null, null, -1)),
|
|
101916
102357
|
_cache[15] || (_cache[15] = createTextVNode(" 也可以拖动面板左边缘(调宽)、上边缘或下边缘(调高)的拖拽条。 ", -1))
|
|
@@ -102167,9 +102608,13 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102167
102608
|
const SettingsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e4f41080"]]);
|
|
102168
102609
|
const _hoisted_1 = { class: "nav-buttons" };
|
|
102169
102610
|
const _hoisted_2 = { class: "nav-bottom" };
|
|
102170
|
-
const _hoisted_3 =
|
|
102611
|
+
const _hoisted_3 = {
|
|
102612
|
+
key: 0,
|
|
102613
|
+
class: "minimal-float"
|
|
102614
|
+
};
|
|
102171
102615
|
const _hoisted_4 = ["src"];
|
|
102172
|
-
const _hoisted_5 =
|
|
102616
|
+
const _hoisted_5 = ["src"];
|
|
102617
|
+
const _hoisted_6 = {
|
|
102173
102618
|
key: 2,
|
|
102174
102619
|
class: "panic-empty"
|
|
102175
102620
|
};
|
|
@@ -102181,6 +102626,24 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102181
102626
|
const currentRoute = computed(() => state.currentRoute);
|
|
102182
102627
|
const settingsStore = useSettingsStore();
|
|
102183
102628
|
const pluginOpacity = computed(() => settingsStore.pluginOpacity);
|
|
102629
|
+
const minimalMode = computed(() => settingsStore.minimalMode);
|
|
102630
|
+
const VIEW_MAP = {
|
|
102631
|
+
chat: ChatPanel,
|
|
102632
|
+
browser: BrowserPanel,
|
|
102633
|
+
games: GamePanel,
|
|
102634
|
+
users: OnlineUsersPanel,
|
|
102635
|
+
"style-editor": StyleEditor,
|
|
102636
|
+
settings: SettingsPanel
|
|
102637
|
+
};
|
|
102638
|
+
const currentView = computed(() => VIEW_MAP[currentRoute.value] || ChatPanel);
|
|
102639
|
+
function goRoute(route) {
|
|
102640
|
+
state.currentRoute = route;
|
|
102641
|
+
}
|
|
102642
|
+
function toggleMinimal() {
|
|
102643
|
+
const next = !settingsStore.minimalMode;
|
|
102644
|
+
settingsStore.setMinimalMode(next);
|
|
102645
|
+
if (next) state.currentRoute = "chat";
|
|
102646
|
+
}
|
|
102184
102647
|
const isPanicMode = /* @__PURE__ */ ref(false);
|
|
102185
102648
|
const panicUrl = computed(() => settingsStore.panicUrl);
|
|
102186
102649
|
const isPanicImage = computed(() => {
|
|
@@ -102256,13 +102719,14 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102256
102719
|
const _component_el_aside = resolveComponent("el-aside");
|
|
102257
102720
|
const _component_el_main = resolveComponent("el-main");
|
|
102258
102721
|
const _component_el_container = resolveComponent("el-container");
|
|
102722
|
+
const _component_ScaleToOriginal = resolveComponent("ScaleToOriginal");
|
|
102259
102723
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
102260
102724
|
createVNode(_component_el_container, {
|
|
102261
102725
|
class: "app-container",
|
|
102262
102726
|
style: normalizeStyle({ opacity: pluginOpacity.value })
|
|
102263
102727
|
}, {
|
|
102264
102728
|
default: withCtx(() => [
|
|
102265
|
-
createVNode(_component_el_aside, {
|
|
102729
|
+
withDirectives(createVNode(_component_el_aside, {
|
|
102266
102730
|
width: "48px",
|
|
102267
102731
|
class: "app-sidebar"
|
|
102268
102732
|
}, {
|
|
@@ -102333,18 +102797,50 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102333
102797
|
])
|
|
102334
102798
|
]),
|
|
102335
102799
|
_: 1
|
|
102336
|
-
}),
|
|
102337
|
-
|
|
102800
|
+
}, 512), [
|
|
102801
|
+
[vShow, !minimalMode.value]
|
|
102802
|
+
]),
|
|
102803
|
+
createVNode(_component_el_main, {
|
|
102804
|
+
class: normalizeClass(["app-main", { "is-minimal": minimalMode.value }])
|
|
102805
|
+
}, {
|
|
102338
102806
|
default: withCtx(() => [
|
|
102339
|
-
|
|
102807
|
+
(openBlock(), createBlock(KeepAlive, null, [
|
|
102808
|
+
(openBlock(), createBlock(resolveDynamicComponent(currentView.value)))
|
|
102809
|
+
], 1024))
|
|
102340
102810
|
]),
|
|
102341
102811
|
_: 1
|
|
102342
|
-
})
|
|
102812
|
+
}, 8, ["class"])
|
|
102343
102813
|
]),
|
|
102344
102814
|
_: 1
|
|
102345
102815
|
}, 8, ["style"]),
|
|
102816
|
+
minimalMode.value && currentRoute.value !== "chat" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
102817
|
+
createBaseVNode("button", {
|
|
102818
|
+
class: "mini-ball",
|
|
102819
|
+
title: "返回聊天(#chat)",
|
|
102820
|
+
onClick: _cache[5] || (_cache[5] = ($event) => goRoute("chat"))
|
|
102821
|
+
}, [
|
|
102822
|
+
createVNode(_component_el_icon, { size: 14 }, {
|
|
102823
|
+
default: withCtx(() => [
|
|
102824
|
+
createVNode(_component_ChatDotRound)
|
|
102825
|
+
]),
|
|
102826
|
+
_: 1
|
|
102827
|
+
})
|
|
102828
|
+
]),
|
|
102829
|
+
createBaseVNode("button", {
|
|
102830
|
+
class: "mini-ball",
|
|
102831
|
+
title: "切回普通模式(#ui 0)",
|
|
102832
|
+
onClick: toggleMinimal
|
|
102833
|
+
}, [
|
|
102834
|
+
createVNode(_component_el_icon, { size: 14 }, {
|
|
102835
|
+
default: withCtx(() => [
|
|
102836
|
+
createVNode(_component_ScaleToOriginal)
|
|
102837
|
+
]),
|
|
102838
|
+
_: 1
|
|
102839
|
+
})
|
|
102840
|
+
])
|
|
102841
|
+
])) : createCommentVNode("", true),
|
|
102346
102842
|
isPanicMode.value ? (openBlock(), createElementBlock("div", {
|
|
102347
|
-
key:
|
|
102843
|
+
key: 1,
|
|
102348
102844
|
class: "panic-overlay",
|
|
102349
102845
|
tabindex: "-1",
|
|
102350
102846
|
onClick: focusPanicOverlay
|
|
@@ -102354,12 +102850,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102354
102850
|
src: panicUrl.value,
|
|
102355
102851
|
class: "panic-image",
|
|
102356
102852
|
alt: ""
|
|
102357
|
-
}, null, 8,
|
|
102853
|
+
}, null, 8, _hoisted_4)) : panicUrl.value ? (openBlock(), createElementBlock("iframe", {
|
|
102358
102854
|
key: 1,
|
|
102359
102855
|
src: panicUrl.value,
|
|
102360
102856
|
class: "panic-frame",
|
|
102361
102857
|
allowfullscreen: ""
|
|
102362
|
-
}, null, 8,
|
|
102858
|
+
}, null, 8, _hoisted_5)) : (openBlock(), createElementBlock("div", _hoisted_6, [..._cache[6] || (_cache[6] = [
|
|
102363
102859
|
createBaseVNode("p", { class: "panic-empty-title" }, "紧急模式已开启", -1),
|
|
102364
102860
|
createBaseVNode("p", { class: "panic-empty-tip" }, "在「设置」中配置紧急内容(图片 URL 或网页地址),按快捷键即可切换显示", -1)
|
|
102365
102861
|
])]))
|
|
@@ -102368,7 +102864,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
102368
102864
|
};
|
|
102369
102865
|
}
|
|
102370
102866
|
};
|
|
102371
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
102867
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1cd5de03"]]);
|
|
102372
102868
|
function mountXechat(el) {
|
|
102373
102869
|
const app = createApp(App);
|
|
102374
102870
|
app.use(createPinia());
|