koishi-plugin-chat-patch 1.3.0 → 2.0.1
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/index.scss +35 -0
- package/client/index.ts +2 -0
- package/client/vue/chat-logic.ts +148 -3715
- package/client/vue/composables/useChatActions.ts +61 -0
- package/client/vue/composables/useChatData.ts +184 -0
- package/client/vue/composables/useImageCache.ts +140 -0
- package/client/vue/index.vue +399 -327
- package/client/vue/types.ts +71 -0
- package/dist/index.js +5 -27
- package/dist/style.css +1 -1
- package/lib/index.js +68 -36
- package/package.json +14 -5
- package/readme.md +1 -1
- package/src/api-handlers.ts +17 -10
- package/src/config.ts +2 -4
- package/src/index.ts +1 -1
- package/src/message-handler.ts +5 -4
- package/src/utils.ts +48 -4
- package/client/vue/style.css +0 -1997
package/client/index.scss
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
@tailwind components;
|
|
2
|
+
@tailwind utilities;
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--chat-bg: var(--k-page-bg);
|
|
6
|
+
--chat-panel-bg: var(--k-card-bg);
|
|
7
|
+
--chat-border: var(--k-border-color);
|
|
8
|
+
--chat-text: var(--k-text-color);
|
|
9
|
+
--chat-text-sub: var(--k-text-color-secondary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.chat-patch-wrapper {
|
|
13
|
+
color: var(--chat-text);
|
|
14
|
+
background-color: var(--chat-bg);
|
|
15
|
+
|
|
16
|
+
.el-aside, .el-main, .el-header, .el-footer {
|
|
17
|
+
background-color: transparent !important;
|
|
18
|
+
color: inherit !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.el-scrollbar {
|
|
22
|
+
background-color: transparent !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.el-input__wrapper, .el-textarea__inner {
|
|
26
|
+
background-color: var(--k-input-bg) !important;
|
|
27
|
+
color: var(--chat-text) !important;
|
|
28
|
+
box-shadow: 0 0 0 1px var(--chat-border) inset !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.el-empty {
|
|
32
|
+
background-color: transparent !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
1
36
|
.layout-iframe {
|
|
2
37
|
width: 100%;
|
|
3
38
|
height: 100%;
|
package/client/index.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { defineComponent, h, resolveComponent } from 'vue'
|
|
3
3
|
import { Context } from '@koishijs/client'
|
|
4
4
|
import Chat from './vue/index.vue'
|
|
5
|
+
// 不导入 Element Plus CSS,Koishi 已经包含了
|
|
6
|
+
// import 'element-plus/dist/index.css'
|
|
5
7
|
import './index.scss'
|
|
6
8
|
import './icons'
|
|
7
9
|
|