koishi-plugin-chatluna-affinity 0.3.0-beta.2 → 0.3.0-beta.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/client/AffinityDetailsLoader.vue +10 -6
- package/client/constants.ts +4 -51
- package/dist/index.js +185 -149
- package/lib/index.d.ts +41 -20
- package/lib/index.js +1187 -532
- package/package.json +10 -9
- package/client/components/AffinityNav.vue +0 -161
- package/client/components/NavSection.vue +0 -52
- package/client/components/ToolList.vue +0 -93
- package/client/components/VariableList.vue +0 -102
- package/client/composables/index.ts +0 -6
- package/client/composables/useDraggable.ts +0 -101
- package/client/composables/useScrollSpy.ts +0 -74
- package/client/icons/IconChevronDown.vue +0 -13
- package/client/icons/IconMove.vue +0 -13
- package/client/types.ts +0 -63
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
好感度详情加载器
|
|
3
|
-
|
|
3
|
+
根据当前插件名称决定是否显示共享导航组件
|
|
4
4
|
-->
|
|
5
5
|
<template>
|
|
6
|
-
<
|
|
6
|
+
<SharedNav v-if="isOwn" :sections="navSections" />
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
|
-
import { ComputedRef,
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
10
|
+
import { ComputedRef, computed, inject } from 'vue'
|
|
11
|
+
import { SharedNav } from 'shared-nav'
|
|
12
|
+
import { NAV_SECTIONS, PLUGIN_CANDIDATE_NAMES } from './constants'
|
|
13
13
|
|
|
14
14
|
const pluginName = inject<ComputedRef<string>>('plugin:name')
|
|
15
|
-
const
|
|
15
|
+
const navSections = NAV_SECTIONS
|
|
16
|
+
const isOwn = computed(() => {
|
|
17
|
+
const name = pluginName?.value || ''
|
|
18
|
+
return PLUGIN_CANDIDATE_NAMES.includes(name)
|
|
19
|
+
})
|
|
16
20
|
</script>
|
package/client/constants.ts
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 前端常量定义
|
|
3
|
-
*
|
|
3
|
+
* 包含导航分组与插件候选名称
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
title: string;
|
|
8
|
-
key: string;
|
|
9
|
-
}
|
|
6
|
+
import type { SharedNavSection } from "shared-nav";
|
|
10
7
|
|
|
11
|
-
export
|
|
12
|
-
name: string;
|
|
13
|
-
enableKey: string;
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface VariableItem {
|
|
18
|
-
name: string;
|
|
19
|
-
key: string;
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const NAV_SECTIONS: NavSection[] = [
|
|
8
|
+
export const NAV_SECTIONS: SharedNavSection[] = [
|
|
24
9
|
{ title: "好感度设置", key: "affinity" },
|
|
25
10
|
{ title: "黑名单设置", key: "blacklist" },
|
|
26
11
|
{ title: "关系设置", key: "relationship" },
|
|
@@ -29,37 +14,5 @@ export const NAV_SECTIONS: NavSection[] = [
|
|
|
29
14
|
{ title: "其他设置", key: "otherSettings" },
|
|
30
15
|
];
|
|
31
16
|
|
|
32
|
-
export const TITLE_TO_KEY: Record<string, string> = {
|
|
33
|
-
好感度设置: "affinity",
|
|
34
|
-
黑名单设置: "blacklist",
|
|
35
|
-
关系设置: "relationship",
|
|
36
|
-
变量设置: "variables",
|
|
37
|
-
"XML 工具设置": "xmlTools",
|
|
38
|
-
其他设置: "otherSettings",
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const KEY_TO_TITLE: Record<string, string> = {
|
|
42
|
-
affinity: "好感度设置",
|
|
43
|
-
blacklist: "黑名单设置",
|
|
44
|
-
relationship: "关系设置",
|
|
45
|
-
variables: "变量设置",
|
|
46
|
-
xmlTools: "XML 工具设置",
|
|
47
|
-
otherSettings: "其他设置",
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const VARIABLE_CONFIG: Record<
|
|
51
|
-
string,
|
|
52
|
-
{ section: string; searchKey: string | string[] }
|
|
53
|
-
> = {
|
|
54
|
-
affinity: { section: "变量设置", searchKey: "affinityVariableName" },
|
|
55
|
-
relationshipLevel: {
|
|
56
|
-
section: "变量设置",
|
|
57
|
-
searchKey: "relationshipLevelVariableName",
|
|
58
|
-
},
|
|
59
|
-
blacklistList: {
|
|
60
|
-
section: "变量设置",
|
|
61
|
-
searchKey: "blacklistListVariableName",
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
17
|
export const PLUGIN_NAME = "koishi-plugin-chatluna-affinity";
|
|
18
|
+
export const PLUGIN_CANDIDATE_NAMES = [PLUGIN_NAME, "chatluna-affinity"];
|
package/dist/index.js
CHANGED
|
@@ -1,226 +1,262 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { openBlock as m, createElementBlock as _, createElementVNode as v, defineComponent as $, Fragment as R, renderList as E, normalizeClass as y, toDisplayString as z, reactive as I, computed as w, onUnmounted as N, ref as T, onMounted as A, normalizeStyle as B, unref as k, createVNode as x, withModifiers as D, inject as K, createBlock as X, createCommentVNode as O } from "vue";
|
|
2
|
+
const M = (s, o) => {
|
|
3
|
+
const r = s.__vccOpts || s;
|
|
4
|
+
for (const [c, t] of o)
|
|
5
|
+
r[c] = t;
|
|
6
|
+
return r;
|
|
7
|
+
}, V = {}, Y = {
|
|
8
8
|
viewBox: "0 0 1024 1024",
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
width: "20",
|
|
11
11
|
height: "20"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
|
|
13
|
+
function P(s, o) {
|
|
14
|
+
return m(), _("svg", Y, [...o[0] || (o[0] = [
|
|
15
|
+
v("path", {
|
|
16
16
|
d: "M288 224c0-35.3 28.7-64 64-64s64 28.7 64 64-28.7 64-64 64-64-28.7-64-64zm320 0c0-35.3 28.7-64 64-64s64 28.7 64 64-28.7 64-64 64-64-28.7-64-64zM288 512c0-35.3 28.7-64 64-64s64 28.7 64 64-28.7 64-64 64-64-28.7-64-64zm320 0c0-35.3 28.7-64 64-64s64 28.7 64 64-28.7 64-64 64-64-28.7-64-64zM352 864c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm320 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z",
|
|
17
17
|
fill: "currentColor"
|
|
18
18
|
}, null, -1)
|
|
19
19
|
])]);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const q = /* @__PURE__ */ M(V, [["render", P]]), U = {}, W = {
|
|
22
22
|
viewBox: "0 0 1024 1024",
|
|
23
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24
24
|
width: "20",
|
|
25
25
|
height: "20"
|
|
26
26
|
};
|
|
27
|
-
function j(
|
|
28
|
-
return
|
|
29
|
-
|
|
27
|
+
function j(s, o) {
|
|
28
|
+
return m(), _("svg", W, [...o[0] || (o[0] = [
|
|
29
|
+
v("path", {
|
|
30
30
|
d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z",
|
|
31
31
|
fill: "currentColor"
|
|
32
32
|
}, null, -1)
|
|
33
33
|
])]);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const G = /* @__PURE__ */ M(U, [["render", j]]), F = ["onClick"], H = /* @__PURE__ */ $({
|
|
36
36
|
__name: "NavSection",
|
|
37
37
|
props: {
|
|
38
38
|
sections: {},
|
|
39
39
|
activeKey: {}
|
|
40
40
|
},
|
|
41
41
|
emits: ["select"],
|
|
42
|
-
setup(
|
|
43
|
-
return (
|
|
44
|
-
key:
|
|
45
|
-
class:
|
|
46
|
-
onClick: (
|
|
47
|
-
},
|
|
42
|
+
setup(s) {
|
|
43
|
+
return (o, r) => (m(!0), _(R, null, E(s.sections, (c) => (m(), _("div", {
|
|
44
|
+
key: c.key,
|
|
45
|
+
class: y([o.$style.item, s.activeKey === c.key ? o.$style.active : ""]),
|
|
46
|
+
onClick: (t) => o.$emit("select", c)
|
|
47
|
+
}, z(c.title), 11, F))), 128));
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
50
|
-
item:
|
|
51
|
-
active:
|
|
52
|
-
},
|
|
53
|
-
$style:
|
|
54
|
-
},
|
|
55
|
-
function
|
|
56
|
-
|
|
49
|
+
}), J = "_item_1m2kp_1", Q = "_active_1m2kp_16", Z = {
|
|
50
|
+
item: J,
|
|
51
|
+
active: Q
|
|
52
|
+
}, tt = {
|
|
53
|
+
$style: Z
|
|
54
|
+
}, et = /* @__PURE__ */ M(H, [["__cssModules", tt]]);
|
|
55
|
+
function L(s) {
|
|
56
|
+
return s instanceof TouchEvent ? {
|
|
57
|
+
x: s.touches[0].clientX,
|
|
58
|
+
y: s.touches[0].clientY
|
|
59
|
+
} : {
|
|
60
|
+
x: s.clientX,
|
|
61
|
+
y: s.clientY
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function ot(s = {}) {
|
|
65
|
+
const {
|
|
66
|
+
initialTop: o = 100,
|
|
67
|
+
initialRight: r = 20,
|
|
68
|
+
boundarySelector: c = ".plugin-view"
|
|
69
|
+
} = s, t = I({
|
|
57
70
|
isDragging: !1,
|
|
58
|
-
top:
|
|
59
|
-
right:
|
|
71
|
+
top: o,
|
|
72
|
+
right: r,
|
|
60
73
|
startTop: 0,
|
|
61
74
|
startRight: 0,
|
|
62
75
|
startX: 0,
|
|
63
76
|
startY: 0,
|
|
64
77
|
width: 0,
|
|
65
78
|
height: 0
|
|
66
|
-
}),
|
|
67
|
-
top: t.top
|
|
68
|
-
right: t.right
|
|
69
|
-
})),
|
|
70
|
-
var
|
|
71
|
-
if (!t.isDragging)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}, d = () => {
|
|
79
|
+
}), g = w(() => ({
|
|
80
|
+
top: `${t.top}px`,
|
|
81
|
+
right: `${t.right}px`
|
|
82
|
+
})), i = (d) => {
|
|
83
|
+
var C;
|
|
84
|
+
if (!t.isDragging)
|
|
85
|
+
return;
|
|
86
|
+
const a = L(d), l = t.startTop + (a.y - t.startY), e = t.startRight - (a.x - t.startX), n = (C = document.querySelector(c)) == null ? void 0 : C.getBoundingClientRect();
|
|
87
|
+
let h = 0, f = window.innerHeight - t.height, S = 0, b = window.innerWidth - t.width;
|
|
88
|
+
n && (h = n.top, f = n.bottom - t.height, S = window.innerWidth - n.right, b = window.innerWidth - n.left - t.width), t.top = Math.max(h, Math.min(f, l)), t.right = Math.max(S, Math.min(b, e));
|
|
89
|
+
}, p = (d, a) => {
|
|
90
|
+
const l = L(d), e = a == null ? void 0 : a.getBoundingClientRect();
|
|
91
|
+
e && (t.width = e.width, t.height = e.height), t.startTop = t.top, t.startRight = t.right, t.startX = l.x, t.startY = l.y, t.isDragging = !0;
|
|
92
|
+
}, u = () => {
|
|
81
93
|
t.isDragging = !1;
|
|
82
94
|
};
|
|
83
|
-
return window.addEventListener("mousemove",
|
|
84
|
-
window.removeEventListener("mousemove",
|
|
95
|
+
return window.addEventListener("mousemove", i), window.addEventListener("mouseup", u), window.addEventListener("touchmove", i), window.addEventListener("touchend", u), N(() => {
|
|
96
|
+
window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", u), window.removeEventListener("touchmove", i), window.removeEventListener("touchend", u);
|
|
85
97
|
}), {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
startDrag: g,
|
|
89
|
-
endDrag: d
|
|
98
|
+
position: g,
|
|
99
|
+
startDrag: p
|
|
90
100
|
};
|
|
91
101
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
function nt(s) {
|
|
103
|
+
const {
|
|
104
|
+
titleToKeyMap: o,
|
|
105
|
+
headerSelector: r = ".k-schema-header",
|
|
106
|
+
rootMargin: c = "-20% 0px -60% 0px",
|
|
107
|
+
threshold: t = 0
|
|
108
|
+
} = s, g = T("");
|
|
109
|
+
let i = null;
|
|
110
|
+
const p = /* @__PURE__ */ new Map(), u = () => {
|
|
111
|
+
i == null || i.disconnect(), p.clear(), i = new IntersectionObserver(
|
|
112
|
+
(l) => {
|
|
113
|
+
for (const e of l) {
|
|
114
|
+
if (!e.isIntersecting)
|
|
115
|
+
continue;
|
|
116
|
+
const n = p.get(e.target);
|
|
117
|
+
n && (g.value = n);
|
|
118
|
+
}
|
|
103
119
|
},
|
|
104
120
|
{
|
|
105
121
|
root: null,
|
|
106
|
-
rootMargin:
|
|
107
|
-
threshold:
|
|
122
|
+
rootMargin: c,
|
|
123
|
+
threshold: t
|
|
108
124
|
}
|
|
109
|
-
), document.querySelectorAll(
|
|
110
|
-
const
|
|
111
|
-
for (const [
|
|
112
|
-
if (
|
|
113
|
-
|
|
125
|
+
), document.querySelectorAll(r).forEach((l) => {
|
|
126
|
+
const e = l.textContent || "";
|
|
127
|
+
for (const [n, h] of Object.entries(o))
|
|
128
|
+
if (e.includes(n)) {
|
|
129
|
+
i == null || i.observe(l), p.set(l, h);
|
|
114
130
|
break;
|
|
115
131
|
}
|
|
116
132
|
});
|
|
117
133
|
}, d = () => {
|
|
118
|
-
setTimeout(
|
|
134
|
+
setTimeout(u, 500);
|
|
119
135
|
};
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
}), x(() => {
|
|
123
|
-
n == null || n.disconnect();
|
|
136
|
+
return A(d), N(() => {
|
|
137
|
+
i == null || i.disconnect();
|
|
124
138
|
}), {
|
|
125
|
-
activeSection:
|
|
139
|
+
activeSection: g,
|
|
126
140
|
refresh: d
|
|
127
141
|
};
|
|
128
142
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
o.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}, d =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
143
|
+
const st = /* @__PURE__ */ $({
|
|
144
|
+
__name: "SharedNav",
|
|
145
|
+
props: {
|
|
146
|
+
sections: {},
|
|
147
|
+
headerSelector: { default: ".k-schema-header" },
|
|
148
|
+
boundarySelector: { default: ".plugin-view" },
|
|
149
|
+
initialTop: { default: 100 },
|
|
150
|
+
initialRight: { default: 20 },
|
|
151
|
+
rootMargin: { default: "-20% 0px -60% 0px" },
|
|
152
|
+
threshold: { default: 0 }
|
|
153
|
+
},
|
|
154
|
+
setup(s) {
|
|
155
|
+
const o = s, r = T(!1), c = T(null), t = w(
|
|
156
|
+
() => o.sections.reduce(
|
|
157
|
+
(e, n) => (e[n.matchText ?? n.title] = n.key, e),
|
|
158
|
+
{}
|
|
159
|
+
)
|
|
160
|
+
), g = w(
|
|
161
|
+
() => o.sections.reduce(
|
|
162
|
+
(e, n) => (e[n.key] = n.matchText ?? n.title, e),
|
|
163
|
+
{}
|
|
164
|
+
)
|
|
165
|
+
), i = (e) => {
|
|
166
|
+
e.stopPropagation(), r.value = !r.value;
|
|
167
|
+
}, { position: p, startDrag: u } = ot({
|
|
168
|
+
initialTop: o.initialTop,
|
|
169
|
+
initialRight: o.initialRight,
|
|
170
|
+
boundarySelector: o.boundarySelector
|
|
171
|
+
}), d = (e) => {
|
|
172
|
+
u(e, c.value);
|
|
173
|
+
}, { activeSection: a } = nt({
|
|
174
|
+
titleToKeyMap: t.value,
|
|
175
|
+
headerSelector: o.headerSelector,
|
|
176
|
+
rootMargin: o.rootMargin,
|
|
177
|
+
threshold: o.threshold
|
|
178
|
+
}), l = (e) => {
|
|
179
|
+
a.value = e.key;
|
|
180
|
+
const n = document.querySelectorAll(o.headerSelector);
|
|
181
|
+
for (let h = 0; h < n.length; h += 1) {
|
|
182
|
+
const f = n[h];
|
|
183
|
+
if ((f.textContent || "").includes(g.value[e.key])) {
|
|
184
|
+
f.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
164
185
|
return;
|
|
165
186
|
}
|
|
166
187
|
}
|
|
167
188
|
};
|
|
168
|
-
return (
|
|
169
|
-
|
|
170
|
-
|
|
189
|
+
return (e, n) => (m(), _("div", {
|
|
190
|
+
ref_key: "containerRef",
|
|
191
|
+
ref: c,
|
|
192
|
+
class: y([e.$style.container, r.value ? e.$style.collapsed : ""]),
|
|
193
|
+
style: B(k(p))
|
|
171
194
|
}, [
|
|
172
|
-
|
|
173
|
-
class:
|
|
174
|
-
onMousedown:
|
|
175
|
-
onTouchstart:
|
|
195
|
+
v("div", {
|
|
196
|
+
class: y(e.$style.header),
|
|
197
|
+
onMousedown: d,
|
|
198
|
+
onTouchstart: d
|
|
176
199
|
}, [
|
|
177
|
-
|
|
178
|
-
class:
|
|
200
|
+
x(q, {
|
|
201
|
+
class: y(e.$style.move)
|
|
179
202
|
}, null, 8, ["class"]),
|
|
180
|
-
|
|
181
|
-
class:
|
|
182
|
-
onClick:
|
|
183
|
-
onMousedown:
|
|
203
|
+
v("div", {
|
|
204
|
+
class: y(e.$style.toggle),
|
|
205
|
+
onClick: i,
|
|
206
|
+
onMousedown: n[0] || (n[0] = D(() => {
|
|
184
207
|
}, ["stop"])),
|
|
185
|
-
onTouchstart:
|
|
208
|
+
onTouchstart: n[1] || (n[1] = D(() => {
|
|
186
209
|
}, ["stop"]))
|
|
187
210
|
}, [
|
|
188
|
-
|
|
211
|
+
x(G)
|
|
189
212
|
], 34)
|
|
190
213
|
], 34),
|
|
191
|
-
|
|
192
|
-
class:
|
|
214
|
+
v("div", {
|
|
215
|
+
class: y(e.$style.body)
|
|
193
216
|
}, [
|
|
194
|
-
|
|
195
|
-
sections:
|
|
196
|
-
"active-key":
|
|
197
|
-
onSelect:
|
|
217
|
+
x(et, {
|
|
218
|
+
sections: s.sections,
|
|
219
|
+
"active-key": k(a),
|
|
220
|
+
onSelect: l
|
|
198
221
|
}, null, 8, ["sections", "active-key"])
|
|
199
222
|
], 2)
|
|
200
223
|
], 6));
|
|
201
224
|
}
|
|
202
|
-
}),
|
|
203
|
-
container:
|
|
204
|
-
header:
|
|
205
|
-
move:
|
|
206
|
-
toggle:
|
|
207
|
-
body:
|
|
208
|
-
collapsed:
|
|
209
|
-
},
|
|
210
|
-
$style:
|
|
211
|
-
},
|
|
225
|
+
}), it = "_container_pbgsl_2", ct = "_header_pbgsl_21", rt = "_move_pbgsl_36", lt = "_toggle_pbgsl_45", at = "_body_pbgsl_56", dt = "_collapsed_pbgsl_67", ut = {
|
|
226
|
+
container: it,
|
|
227
|
+
header: ct,
|
|
228
|
+
move: rt,
|
|
229
|
+
toggle: lt,
|
|
230
|
+
body: at,
|
|
231
|
+
collapsed: dt
|
|
232
|
+
}, ht = {
|
|
233
|
+
$style: ut
|
|
234
|
+
}, gt = /* @__PURE__ */ M(st, [["__cssModules", ht]]), pt = [
|
|
235
|
+
{ title: "好感度设置", key: "affinity" },
|
|
236
|
+
{ title: "黑名单设置", key: "blacklist" },
|
|
237
|
+
{ title: "关系设置", key: "relationship" },
|
|
238
|
+
{ title: "变量设置", key: "variables" },
|
|
239
|
+
{ title: "XML 工具设置", key: "xmlTools" },
|
|
240
|
+
{ title: "其他设置", key: "otherSettings" }
|
|
241
|
+
], yt = "koishi-plugin-chatluna-affinity", mt = [yt, "chatluna-affinity"], ft = /* @__PURE__ */ $({
|
|
212
242
|
__name: "AffinityDetailsLoader",
|
|
213
|
-
setup(
|
|
214
|
-
const
|
|
215
|
-
|
|
243
|
+
setup(s) {
|
|
244
|
+
const o = K("plugin:name"), r = pt, c = w(() => {
|
|
245
|
+
const t = (o == null ? void 0 : o.value) || "";
|
|
246
|
+
return mt.includes(t);
|
|
247
|
+
});
|
|
248
|
+
return (t, g) => c.value ? (m(), X(k(gt), {
|
|
249
|
+
key: 0,
|
|
250
|
+
sections: k(r)
|
|
251
|
+
}, null, 8, ["sections"])) : O("", !0);
|
|
216
252
|
}
|
|
217
|
-
}),
|
|
218
|
-
|
|
253
|
+
}), _t = (s) => {
|
|
254
|
+
s.slot({
|
|
219
255
|
type: "plugin-details",
|
|
220
|
-
component:
|
|
256
|
+
component: ft,
|
|
221
257
|
order: -999
|
|
222
258
|
});
|
|
223
259
|
};
|
|
224
260
|
export {
|
|
225
|
-
|
|
261
|
+
_t as default
|
|
226
262
|
};
|