@karinjs/plugin-basic 1.2.0 → 1.3.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/LICENSE +21 -21
- package/README.md +31 -31
- package/dist/apps/logger.d.ts +6 -0
- package/dist/apps/logger.js +229 -0
- package/dist/apps/login.js +6 -5
- package/dist/apps/master.d.ts +3 -1
- package/dist/apps/master.js +21 -3
- package/dist/apps/restart.js +4 -3
- package/dist/apps/status.js +5 -6
- package/dist/apps/update.d.ts +4 -5
- package/dist/apps/update.js +167 -83
- package/dist/chunk-PHDIUMOH.js +127 -0
- package/dist/chunk-QUWYQJAF.js +131 -0
- package/dist/index.js +17 -0
- package/dist/web.config.d.ts +4 -0
- package/dist/web.config.js +29 -16
- package/package.json +56 -65
- package/resources/img/logger.png +0 -0
- package/resources/img/plugin.png +0 -0
- package/resources/logger/index.css +214 -0
- package/resources/logger/index.html +37 -0
- package/resources/plugins/index.css +210 -0
- package/resources/plugins/index.html +71 -0
- package/config/config.json +0 -7
- package/dist/chunk-BJBUGOWQ.js +0 -129
package/package.json
CHANGED
|
@@ -1,65 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@karinjs/plugin-basic",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://github.com/KarinJS/karin-plugin-basic",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/KarinJS/karin-plugin-basic/issues"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/KarinJS/karin-plugin-basic.git"
|
|
12
|
-
},
|
|
13
|
-
"author": "shijin",
|
|
14
|
-
"type": "module",
|
|
15
|
-
"main": "dist/index.js",
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"config",
|
|
19
|
-
"resources",
|
|
20
|
-
"LICENSE",
|
|
21
|
-
"package.json",
|
|
22
|
-
"README.md"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc && tsup",
|
|
26
|
-
"pub": "npm publish --access public",
|
|
27
|
-
"sort": "npx sort-package-json",
|
|
28
|
-
"dev": "tsx src/app.ts",
|
|
29
|
-
"watch": "tsx watch src/index.ts",
|
|
30
|
-
"karin": "karin"
|
|
31
|
-
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
],
|
|
50
|
-
"ts-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"config"
|
|
58
|
-
],
|
|
59
|
-
"ts-web": "src/web.config.ts",
|
|
60
|
-
"web": "dist/web.config.js"
|
|
61
|
-
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"internal-ip": "^8.0.0"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@karinjs/plugin-basic",
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"description": "Karin的基础插件,提供最基础的功能",
|
|
5
|
+
"homepage": "https://github.com/KarinJS/karin-plugin-basic",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/KarinJS/karin-plugin-basic/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/KarinJS/karin-plugin-basic.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "shijin",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"config",
|
|
19
|
+
"resources",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"package.json",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc && tsup",
|
|
26
|
+
"pub": "npm publish --access public",
|
|
27
|
+
"sort": "npx sort-package-json",
|
|
28
|
+
"dev": "tsx src/app.ts",
|
|
29
|
+
"watch": "tsx watch src/index.ts",
|
|
30
|
+
"karin": "karin"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"registry": "https://registry.npmjs.org"
|
|
35
|
+
},
|
|
36
|
+
"karin": {
|
|
37
|
+
"main": "src/index.ts",
|
|
38
|
+
"apps": [
|
|
39
|
+
"dist/apps"
|
|
40
|
+
],
|
|
41
|
+
"ts-apps": [
|
|
42
|
+
"src/apps"
|
|
43
|
+
],
|
|
44
|
+
"static": [
|
|
45
|
+
"resources"
|
|
46
|
+
],
|
|
47
|
+
"files": [
|
|
48
|
+
"config"
|
|
49
|
+
],
|
|
50
|
+
"ts-web": "src/web.config.ts",
|
|
51
|
+
"web": "dist/web.config.js"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"internal-ip": "^8.0.1"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Microsoft YaHei';
|
|
9
|
+
background: linear-gradient(135deg, #c7d2fe 0%, #fbcfe8 50%, #a5f3fc 100%);
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
padding: 20px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
max-width: 1400px;
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
background: rgba(255, 255, 255, 0.96);
|
|
18
|
+
border-radius: 18px;
|
|
19
|
+
box-shadow: 0 18px 45px rgba(148, 163, 184, 0.45);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.header {
|
|
24
|
+
position: relative;
|
|
25
|
+
padding: 30px;
|
|
26
|
+
color: #0f172a;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
background: url('../img/logger.png') center/cover no-repeat, #e0f2ff;
|
|
29
|
+
border-bottom: 1px solid rgba(148, 163, 184, 0.35);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.header h1,
|
|
33
|
+
.header .info {
|
|
34
|
+
position: relative;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.header-bg-text {
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
font-size: 92px;
|
|
45
|
+
font-weight: 800;
|
|
46
|
+
letter-spacing: 0.12em;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
color: rgba(30, 64, 175, 0.2);
|
|
49
|
+
filter: blur(2px);
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.header h1 {
|
|
55
|
+
font-size: 32px;
|
|
56
|
+
margin-bottom: 15px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.info {
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 20px;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
opacity: 0.95;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.info span {
|
|
69
|
+
background: rgba(255, 255, 255, 0.2);
|
|
70
|
+
padding: 6px 12px;
|
|
71
|
+
border-radius: 6px;
|
|
72
|
+
backdrop-filter: blur(10px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.logs-container {
|
|
76
|
+
padding: 20px;
|
|
77
|
+
/* 让截图包含全部日志,不使用内部滚动条 */
|
|
78
|
+
overflow: visible;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.log-item {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: flex-start;
|
|
84
|
+
padding: 12px 16px;
|
|
85
|
+
margin-bottom: 8px;
|
|
86
|
+
border-radius: 8px;
|
|
87
|
+
background: #f9fafb;
|
|
88
|
+
border-left: 4px solid #e5e7eb;
|
|
89
|
+
transition: all 0.2s ease;
|
|
90
|
+
font-size: 13px;
|
|
91
|
+
line-height: 1.6;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.log-item:hover {
|
|
95
|
+
transform: translateX(4px);
|
|
96
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.log-time {
|
|
100
|
+
color: #6c757d;
|
|
101
|
+
font-family: 'Consolas', 'Monaco', monospace;
|
|
102
|
+
min-width: 100px;
|
|
103
|
+
margin-right: 12px;
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.log-level {
|
|
108
|
+
display: inline-block;
|
|
109
|
+
padding: 2px 10px;
|
|
110
|
+
border-radius: 4px;
|
|
111
|
+
font-weight: 600;
|
|
112
|
+
text-transform: uppercase;
|
|
113
|
+
font-size: 11px;
|
|
114
|
+
min-width: 60px;
|
|
115
|
+
text-align: center;
|
|
116
|
+
margin-right: 12px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.level-debug {
|
|
120
|
+
background: #9ca3af;
|
|
121
|
+
color: white;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.level-info {
|
|
125
|
+
background: #38bdf8;
|
|
126
|
+
color: white;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.level-mark {
|
|
130
|
+
background: #a855f7;
|
|
131
|
+
color: white;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.level-warn {
|
|
135
|
+
background: #facc15;
|
|
136
|
+
color: #422006;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.level-error {
|
|
140
|
+
background: #ef4444;
|
|
141
|
+
color: white;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.level-fatal {
|
|
145
|
+
background: #000;
|
|
146
|
+
color: white;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.log-message {
|
|
150
|
+
flex: 1;
|
|
151
|
+
word-break: break-all;
|
|
152
|
+
color: #212529;
|
|
153
|
+
font-family: 'Consolas', 'Monaco', monospace;
|
|
154
|
+
white-space: pre-wrap;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* 不同日志级别的边框颜色 */
|
|
158
|
+
.log-debug {
|
|
159
|
+
border-left-color: #d1d5db;
|
|
160
|
+
background: #f9fafb;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.log-info {
|
|
164
|
+
border-left-color: #93c5fd;
|
|
165
|
+
background: #e0f2fe;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.log-mark {
|
|
169
|
+
border-left-color: #c4b5fd;
|
|
170
|
+
background: #f3e8ff;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.log-warn {
|
|
174
|
+
border-left-color: #fcd34d;
|
|
175
|
+
background: #fef3c7;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.log-error {
|
|
179
|
+
border-left-color: #fca5a5;
|
|
180
|
+
background: #fee2e2;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.log-fatal {
|
|
184
|
+
border-left-color: #9ca3af;
|
|
185
|
+
background: #f5f5f5;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.footer {
|
|
189
|
+
background: #f8f9fa;
|
|
190
|
+
padding: 15px 30px;
|
|
191
|
+
text-align: center;
|
|
192
|
+
color: #6c757d;
|
|
193
|
+
font-size: 12px;
|
|
194
|
+
border-top: 1px solid #dee2e6;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* 滚动条样式 */
|
|
198
|
+
.logs-container::-webkit-scrollbar {
|
|
199
|
+
width: 8px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.logs-container::-webkit-scrollbar-track {
|
|
203
|
+
background: #f1f1f1;
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.logs-container::-webkit-scrollbar-thumb {
|
|
208
|
+
background: #888;
|
|
209
|
+
border-radius: 4px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.logs-container::-webkit-scrollbar-thumb:hover {
|
|
213
|
+
background: #555;
|
|
214
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Karin 日志</title>
|
|
8
|
+
<link rel="stylesheet" href="{{pluResPath}}logger/index.css">
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div class="container">
|
|
13
|
+
<div class="header">
|
|
14
|
+
<h1>📋 Karin 日志</h1>
|
|
15
|
+
<div class="info">
|
|
16
|
+
<span class="date">{{date}}</span>
|
|
17
|
+
<span class="count">共 {{total}} 条日志</span>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="logs-container">
|
|
22
|
+
{{each logs}}
|
|
23
|
+
<div class="log-item log-{{$value.level}}">
|
|
24
|
+
<span class="log-time">{{$value.time}}</span>
|
|
25
|
+
<span class="log-level level-{{$value.level}}">{{$value.level}}</span>
|
|
26
|
+
<span class="log-message">{{@ $value.messageHtml}}</span>
|
|
27
|
+
</div>
|
|
28
|
+
{{/each}}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="footer">
|
|
32
|
+
<p>{{sys.copyright}}</p>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</body>
|
|
36
|
+
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Microsoft YaHei';
|
|
9
|
+
background: radial-gradient(circle at 20% 50%, rgba(120, 200, 255, 0.3) 0%, transparent 50%),
|
|
10
|
+
radial-gradient(circle at 80% 80%, rgba(180, 220, 255, 0.3) 0%, transparent 50%),
|
|
11
|
+
radial-gradient(circle at 40% 20%, rgba(200, 230, 255, 0.2) 0%, transparent 50%),
|
|
12
|
+
linear-gradient(135deg, #e3f2fd 0%, #ffffff 50%, #f0f7ff 100%);
|
|
13
|
+
padding: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.container {
|
|
17
|
+
max-width: 1400px;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
background: rgba(255, 255, 255, 0.96);
|
|
20
|
+
border-radius: 18px;
|
|
21
|
+
box-shadow: 0 18px 45px rgba(100, 150, 200, 0.35);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.header {
|
|
26
|
+
position: relative;
|
|
27
|
+
padding: 30px;
|
|
28
|
+
color: #fff;
|
|
29
|
+
background: url('../img/plugin.png') center/cover no-repeat,
|
|
30
|
+
linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
|
|
31
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.header h1 {
|
|
35
|
+
font-size: 32px;
|
|
36
|
+
margin-bottom: 15px;
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.info {
|
|
42
|
+
display: flex;
|
|
43
|
+
gap: 20px;
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
opacity: 0.95;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.info span {
|
|
49
|
+
background: rgba(255, 255, 255, 0.2);
|
|
50
|
+
padding: 6px 12px;
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
backdrop-filter: blur(10px);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.plugins-container {
|
|
56
|
+
padding: 20px;
|
|
57
|
+
display: grid;
|
|
58
|
+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
59
|
+
gap: 20px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.plugin-card {
|
|
63
|
+
background: #fff;
|
|
64
|
+
border-radius: 12px;
|
|
65
|
+
padding: 20px;
|
|
66
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
67
|
+
border: 2px solid #e3f2fd;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.plugin-header {
|
|
74
|
+
margin-bottom: 15px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.plugin-name-row {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
gap: 10px;
|
|
82
|
+
margin-bottom: 8px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.plugin-name {
|
|
86
|
+
font-size: 18px;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
color: #1a202c;
|
|
89
|
+
word-break: break-word;
|
|
90
|
+
flex: 1;
|
|
91
|
+
line-height: 1.4;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.platform-badge {
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: 4px;
|
|
98
|
+
padding: 4px 10px;
|
|
99
|
+
border-radius: 6px;
|
|
100
|
+
font-size: 11px;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
text-transform: uppercase;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.platform-icon {
|
|
108
|
+
font-size: 14px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.platform-npm {
|
|
112
|
+
background: linear-gradient(135deg, #cb3837 0%, #d63031 100%);
|
|
113
|
+
color: white;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.platform-git {
|
|
117
|
+
background: linear-gradient(135deg, #f05032 0%, #ff6b35 100%);
|
|
118
|
+
color: white;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.platform-app {
|
|
122
|
+
background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
|
|
123
|
+
color: white;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.plugin-version {
|
|
127
|
+
display: inline-block;
|
|
128
|
+
padding: 3px 8px;
|
|
129
|
+
background: #e2e8f0;
|
|
130
|
+
color: #4a5568;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
font-size: 12px;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.plugin-body {
|
|
137
|
+
flex: 1;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: 12px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.plugin-description {
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
line-height: 1.6;
|
|
146
|
+
color: #4a5568;
|
|
147
|
+
word-break: break-word;
|
|
148
|
+
flex: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.no-description {
|
|
152
|
+
color: #a0aec0;
|
|
153
|
+
font-style: italic;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.plugin-meta {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: 8px;
|
|
160
|
+
padding-top: 10px;
|
|
161
|
+
border-top: 1px solid #e2e8f0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.meta-item {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: flex-start;
|
|
167
|
+
gap: 8px;
|
|
168
|
+
font-size: 13px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.meta-label {
|
|
172
|
+
color: #718096;
|
|
173
|
+
font-weight: 500;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.meta-value {
|
|
178
|
+
color: #2d3748;
|
|
179
|
+
word-break: break-all;
|
|
180
|
+
flex: 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.plugin-path {
|
|
184
|
+
font-family: 'Consolas', 'Monaco', monospace;
|
|
185
|
+
font-size: 11px;
|
|
186
|
+
color: #42a5f5;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.plugin-footer {
|
|
190
|
+
margin-top: 12px;
|
|
191
|
+
padding-top: 12px;
|
|
192
|
+
border-top: 1px solid #e2e8f0;
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: flex-end;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.plugin-index {
|
|
198
|
+
font-size: 12px;
|
|
199
|
+
color: #a0aec0;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.footer {
|
|
204
|
+
background: #f8f9fa;
|
|
205
|
+
padding: 15px 30px;
|
|
206
|
+
text-align: center;
|
|
207
|
+
color: #6c757d;
|
|
208
|
+
font-size: 12px;
|
|
209
|
+
border-top: 1px solid #dee2e6;
|
|
210
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>插件列表</title>
|
|
8
|
+
<link rel="stylesheet" href="{{pluResPath}}plugins/index.css">
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div class="container">
|
|
13
|
+
<div class="header">
|
|
14
|
+
<h1>🔌 插件列表</h1>
|
|
15
|
+
<div class="info">
|
|
16
|
+
<span class="date">{{date}}</span>
|
|
17
|
+
<span class="count">共 {{total}} 个插件</span>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="plugins-container">
|
|
22
|
+
{{each plugins}}
|
|
23
|
+
<div class="plugin-card">
|
|
24
|
+
<div class="plugin-header">
|
|
25
|
+
<div class="plugin-name-row">
|
|
26
|
+
<h3 class="plugin-name">{{$value.name}}</h3>
|
|
27
|
+
<span class="platform-badge platform-{{$value.type}}">
|
|
28
|
+
<span class="platform-icon">{{$value.typeIcon}}</span>
|
|
29
|
+
{{$value.type}}
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
{{if $value.version}}
|
|
33
|
+
<span class="plugin-version">v{{$value.version}}</span>
|
|
34
|
+
{{/if}}
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="plugin-body">
|
|
38
|
+
{{if $value.description}}
|
|
39
|
+
<p class="plugin-description">{{$value.description}}</p>
|
|
40
|
+
{{else}}
|
|
41
|
+
<p class="plugin-description no-description">暂无描述</p>
|
|
42
|
+
{{/if}}
|
|
43
|
+
|
|
44
|
+
<div class="plugin-meta">
|
|
45
|
+
{{if $value.author}}
|
|
46
|
+
<div class="meta-item">
|
|
47
|
+
<span class="meta-label">👤 作者:</span>
|
|
48
|
+
<span class="meta-value">{{$value.author}}</span>
|
|
49
|
+
</div>
|
|
50
|
+
{{/if}}
|
|
51
|
+
<div class="meta-item">
|
|
52
|
+
<span class="meta-label">📁 路径:</span>
|
|
53
|
+
<span class="meta-value plugin-path">{{$value.dir}}</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="plugin-footer">
|
|
59
|
+
<span class="plugin-index">#{{$value.index}}</span>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
{{/each}}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="footer">
|
|
66
|
+
<p>{{sys.copyright}}</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</body>
|
|
70
|
+
|
|
71
|
+
</html>
|