collabdocchat 2.1.3 → 2.1.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/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
|
|
8
|
+
const files = [
|
|
9
|
+
'../src/pages/optimized-workflow-view.js',
|
|
10
|
+
'../src/pages/optimized-backup-view.js'
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
files.forEach(file => {
|
|
14
|
+
const filePath = path.join(__dirname, file);
|
|
15
|
+
console.log(`\n处理文件: ${file}`);
|
|
16
|
+
|
|
17
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
18
|
+
|
|
19
|
+
// 添加 export 到函数定义
|
|
20
|
+
if (file.includes('workflow')) {
|
|
21
|
+
content = content.replace(
|
|
22
|
+
/^async function renderOptimizedWorkflowView\(/m,
|
|
23
|
+
'export async function renderOptimizedWorkflowView('
|
|
24
|
+
);
|
|
25
|
+
} else if (file.includes('backup')) {
|
|
26
|
+
content = content.replace(
|
|
27
|
+
/^async function renderOptimizedBackupView\(/m,
|
|
28
|
+
'export async function renderOptimizedBackupView('
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
33
|
+
console.log(`✅ 已添加 export`);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
console.log('\n✅ 所有文件处理完成!');
|
|
37
|
+
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ApiService } from '../services/api.js';
|
|
2
2
|
import { AuthService } from '../services/auth.js';
|
|
3
3
|
import 'emoji-picker-element';
|
|
4
|
+
import { renderOptimizedKnowledgeView } from './optimized-knowledge-view.js';
|
|
5
|
+
import { renderOptimizedWorkflowView } from './optimized-workflow-view.js';
|
|
6
|
+
import { renderOptimizedBackupView } from './optimized-backup-view.js';
|
|
4
7
|
|
|
5
8
|
export function renderAdminDashboard(user, wsService) {
|
|
6
9
|
const app = document.getElementById('app');
|
|
@@ -52,6 +55,15 @@ export function renderAdminDashboard(user, wsService) {
|
|
|
52
55
|
<button class="nav-item" data-view="audit">
|
|
53
56
|
<span class="icon">📊</span> 操作记录
|
|
54
57
|
</button>
|
|
58
|
+
<button class="nav-item" data-view="knowledge">
|
|
59
|
+
<span class="icon">📚</span> 知识库
|
|
60
|
+
</button>
|
|
61
|
+
<button class="nav-item" data-view="workflow">
|
|
62
|
+
<span class="icon">⚙️</span> 工作流
|
|
63
|
+
</button>
|
|
64
|
+
<button class="nav-item" data-view="backup">
|
|
65
|
+
<span class="icon">💾</span> 备份管理
|
|
66
|
+
</button>
|
|
55
67
|
</nav>
|
|
56
68
|
|
|
57
69
|
<button class="btn-logout" id="logoutBtn">退出登录</button>
|
|
@@ -106,6 +118,15 @@ export function renderAdminDashboard(user, wsService) {
|
|
|
106
118
|
case 'audit':
|
|
107
119
|
await renderAuditView(contentArea);
|
|
108
120
|
break;
|
|
121
|
+
case 'knowledge':
|
|
122
|
+
await renderOptimizedKnowledgeView(contentArea, currentGroup, apiService, currentUserId);
|
|
123
|
+
break;
|
|
124
|
+
case 'workflow':
|
|
125
|
+
await renderOptimizedWorkflowView(contentArea, currentGroup, apiService);
|
|
126
|
+
break;
|
|
127
|
+
case 'backup':
|
|
128
|
+
await renderOptimizedBackupView(contentArea);
|
|
129
|
+
break;
|
|
109
130
|
}
|
|
110
131
|
}
|
|
111
132
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 优化后的工作流管理界�? * 可视化创建工作流,无需编写JSON代码
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
async function renderOptimizedWorkflowView(container, currentGroup, apiService) {
|
|
5
|
+
export async function renderOptimizedWorkflowView(container, currentGroup, apiService) {
|
|
6
6
|
if (!currentGroup) {
|
|
7
7
|
container.innerHTML = '<div class="empty-state">请先选择一个群�?/div>';
|
|
8
8
|
return;
|
|
@@ -787,4 +787,4 @@ function setupWorkflowEvents(token, container, currentGroup, apiService) {
|
|
|
787
787
|
// 导出函数
|
|
788
788
|
export { renderOptimizedWorkflowView };
|
|
789
789
|
|
|
790
|
-
|
|
790
|
+
|