@zhin.js/console 1.0.48 → 1.0.50
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/CHANGELOG.md +16 -0
- package/client/index.html +1 -0
- package/client/src/main.tsx +51 -24
- package/client/src/pages/{dashboard-bots.tsx → bots.tsx} +1 -1
- package/client/src/pages/{dashboard-config.tsx → config.tsx} +1 -1
- package/client/src/pages/{dashboard-home.tsx → dashboard.tsx} +1 -1
- package/client/src/pages/database.tsx +708 -0
- package/client/src/pages/{dashboard-env.tsx → env.tsx} +1 -1
- package/client/src/pages/files.tsx +470 -0
- package/client/src/pages/login-assist.tsx +225 -0
- package/client/src/pages/{dashboard-logs.tsx → logs.tsx} +1 -1
- package/client/src/pages/{dashboard-plugin-detail.tsx → plugin-detail.tsx} +1 -1
- package/client/src/pages/{dashboard-plugins.tsx → plugins.tsx} +1 -1
- package/dist/chunk-efA98nb6.js +13 -0
- package/dist/client.js +1 -1
- package/dist/cva.js +44 -44
- package/dist/index.html +1 -0
- package/dist/index.js +110 -124
- package/dist/lucide-react.js +29540 -19582
- package/dist/radix-ui.js +10036 -11108
- package/dist/react-dom-client.js +7601 -9988
- package/dist/react-dom.js +141 -171
- package/dist/react-jsx-dev-runtime.js +9 -42
- package/dist/react-jsx-runtime.js +22 -59
- package/dist/react-router.js +7658 -10644
- package/dist/react.js +293 -455
- package/dist/style.css +5 -2
- package/lib/index.js +480 -22
- package/lib/websocket.js +431 -0
- package/package.json +6 -6
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @zhin.js/console
|
|
2
2
|
|
|
3
|
+
## 1.0.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- zhin.js@1.0.51
|
|
8
|
+
- @zhin.js/http@1.0.45
|
|
9
|
+
- @zhin.js/core@1.0.51
|
|
10
|
+
|
|
11
|
+
## 1.0.49
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 353de3d: fix: 控制台优化
|
|
16
|
+
- Updated dependencies [353de3d]
|
|
17
|
+
- @zhin.js/client@1.0.12
|
|
18
|
+
|
|
3
19
|
## 1.0.48
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/client/index.html
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Zhin</title>
|
|
7
7
|
<script src="https://cdn.jsdelivr.net.cn/npm/@tailwindcss/browser@4"></script>
|
|
8
|
+
<script src="https://cdn.jsdelivr.net.cn/npm/@highlightjs/cdn-assets@11/highlight.min.js"></script>
|
|
8
9
|
<script type="importmap">
|
|
9
10
|
{
|
|
10
11
|
"imports": {
|
package/client/src/main.tsx
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { StrictMode, useCallback, useEffect, useState } from 'react'
|
|
2
2
|
import { createRoot } from 'react-dom/client'
|
|
3
3
|
import { Provider as ReduxProvider } from 'react-redux'
|
|
4
|
-
import { Home, Package, Bot, FileText, Settings, KeyRound } from 'lucide-react'
|
|
4
|
+
import { Home, Package, Bot, FileText, Settings, KeyRound, FolderOpen, Database, LogIn } from 'lucide-react'
|
|
5
5
|
import { store, DynamicRouter, persistor, addPage, useSelector, useWebSocket } from '@zhin.js/client'
|
|
6
6
|
import DashboardLayout from './layouts/dashboard'
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
7
|
+
import HomePage from './pages/dashboard'
|
|
8
|
+
import PluginsPage from './pages/plugins'
|
|
9
|
+
import PluginDetailPage from './pages/plugin-detail'
|
|
10
|
+
import BotMangePage from './pages/bots'
|
|
11
|
+
import LogsPage from './pages/logs'
|
|
12
|
+
import ConfigPage from './pages/config'
|
|
13
|
+
import EnvMangePage from './pages/env'
|
|
14
|
+
import FileMangePage from './pages/files'
|
|
15
|
+
import DatabasePage from './pages/database'
|
|
14
16
|
import LoginPage from './pages/login'
|
|
17
|
+
import LoginAssistPage from './pages/login-assist'
|
|
15
18
|
import { hasToken } from './utils/auth'
|
|
16
19
|
import './style.css'
|
|
17
20
|
import { PersistGate } from 'redux-persist/integration/react'
|
|
@@ -64,58 +67,82 @@ function RouteInitializer() {
|
|
|
64
67
|
meta: { order: 0 },
|
|
65
68
|
children: [
|
|
66
69
|
{
|
|
67
|
-
key: '
|
|
70
|
+
key: 'homePage',
|
|
68
71
|
path: '/dashboard',
|
|
69
72
|
title: '系统概览',
|
|
70
73
|
icon: <Home className="w-4 h-4" />,
|
|
71
|
-
element: <
|
|
74
|
+
element: <HomePage />,
|
|
72
75
|
},
|
|
73
76
|
{
|
|
74
|
-
key: '
|
|
77
|
+
key: 'loginAssistPage',
|
|
78
|
+
path: '/login-assist',
|
|
79
|
+
title: '登录辅助',
|
|
80
|
+
icon: <LogIn className="w-4 h-4" />,
|
|
81
|
+
element: <LoginAssistPage />,
|
|
82
|
+
meta: { order: 1 }
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: 'pluginsPage',
|
|
75
86
|
path: '/plugins',
|
|
76
87
|
title: '插件管理',
|
|
77
88
|
icon: <Package className="w-4 h-4" />,
|
|
78
|
-
element: <
|
|
89
|
+
element: <PluginsPage />,
|
|
79
90
|
meta: { order: 2 }
|
|
80
91
|
},
|
|
81
92
|
{
|
|
82
|
-
key: '
|
|
93
|
+
key: 'pluginDetailPage',
|
|
83
94
|
title: '插件详情',
|
|
84
95
|
path: '/plugins/:name',
|
|
85
|
-
element: <
|
|
96
|
+
element: <PluginDetailPage />,
|
|
86
97
|
meta: { hideInMenu: true }
|
|
87
98
|
},
|
|
88
99
|
{
|
|
89
|
-
key: '
|
|
100
|
+
key: 'configPage',
|
|
90
101
|
path: '/config',
|
|
91
102
|
title: '配置管理',
|
|
92
103
|
icon: <Settings className="w-4 h-4" />,
|
|
93
|
-
element: <
|
|
104
|
+
element: <ConfigPage />,
|
|
94
105
|
meta: { order: 3 }
|
|
95
106
|
},
|
|
96
107
|
{
|
|
97
|
-
key: '
|
|
108
|
+
key: 'envManagePage',
|
|
98
109
|
path: '/env',
|
|
99
110
|
title: '环境变量',
|
|
100
111
|
icon: <KeyRound className="w-4 h-4" />,
|
|
101
|
-
element: <
|
|
112
|
+
element: <EnvMangePage />,
|
|
102
113
|
meta: { order: 4 }
|
|
103
114
|
},
|
|
104
115
|
{
|
|
105
|
-
key: '
|
|
116
|
+
key: 'fileManagePage',
|
|
117
|
+
path: '/files',
|
|
118
|
+
title: '文件管理',
|
|
119
|
+
icon: <FolderOpen className="w-4 h-4" />,
|
|
120
|
+
element: <FileMangePage />,
|
|
121
|
+
meta: { order: 5 }
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
key: 'databasePage',
|
|
125
|
+
path: '/database',
|
|
126
|
+
title: '数据库',
|
|
127
|
+
icon: <Database className="w-4 h-4" />,
|
|
128
|
+
element: <DatabasePage />,
|
|
129
|
+
meta: { order: 6 }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: 'botManagePage',
|
|
106
133
|
path: '/bots',
|
|
107
134
|
title: '机器人',
|
|
108
135
|
icon: <Bot className="w-4 h-4" />,
|
|
109
|
-
element: <
|
|
110
|
-
meta: { order:
|
|
136
|
+
element: <BotMangePage />,
|
|
137
|
+
meta: { order: 7 }
|
|
111
138
|
},
|
|
112
139
|
{
|
|
113
|
-
key: '
|
|
140
|
+
key: 'logsPage ',
|
|
114
141
|
path: '/logs',
|
|
115
142
|
title: '系统日志',
|
|
116
143
|
icon: <FileText className="w-4 h-4" />,
|
|
117
|
-
element: <
|
|
118
|
-
meta: { order:
|
|
144
|
+
element: <LogsPage />,
|
|
145
|
+
meta: { order: 8 }
|
|
119
146
|
}
|
|
120
147
|
]
|
|
121
148
|
}
|
|
@@ -14,7 +14,7 @@ interface BotInfo {
|
|
|
14
14
|
status: 'online' | 'offline'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export default function
|
|
17
|
+
export default function BotMangePage() {
|
|
18
18
|
const [bots, setBots] = useState<BotInfo[]>([])
|
|
19
19
|
const [loading, setLoading] = useState(true)
|
|
20
20
|
const [error, setError] = useState<string | null>(null)
|
|
@@ -258,7 +258,7 @@ function ConfigFieldEditor({
|
|
|
258
258
|
)
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
export default function
|
|
261
|
+
export default function ConfigPage() {
|
|
262
262
|
const { yaml, pluginKeys, loading, error, load, save } = useConfigYaml()
|
|
263
263
|
const [mode, setMode] = useState<'form' | 'yaml'>('form')
|
|
264
264
|
const [yamlText, setYamlText] = useState('')
|
|
@@ -25,7 +25,7 @@ interface SystemStatus {
|
|
|
25
25
|
nodeVersion: string
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export default function
|
|
28
|
+
export default function HomePage() {
|
|
29
29
|
const navigate = useNavigate()
|
|
30
30
|
const [stats, setStats] = useState<Stats | null>(null)
|
|
31
31
|
const [systemStatus, setSystemStatus] = useState<SystemStatus | null>(null)
|