collabdocchat 2.0.4 → 2.0.5
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 +1 -1
- package/scripts/generate-docs.js +1 -0
- package/scripts/pre-publish-check.js +1 -0
- package/src/components/knowledge-modal.js +15 -17
- package/src/components/optimized-poll-detail.js +17 -20
- package/src/main.js +1 -1
- package/src/pages/admin-dashboard.js +281 -324
- package/src/pages/login.js +7 -7
- package/src/pages/optimized-backup-view.js +32 -35
- package/src/pages/optimized-knowledge-view.js +34 -41
- package/src/pages/optimized-task-detail.js +36 -42
- package/src/pages/optimized-workflow-view.js +64 -81
- package/src/pages/simplified-workflows.js +66 -66
- package/src/pages/user-dashboard.js +95 -111
- package/src/services/api.js +3 -6
- package/src/services/websocket.js +11 -14
- package/src/styles/collaboration-modern.js +8 -10
- package/src/utils/ai-assistant.js +74 -89
- package/src/utils/chat-enhancements.js +18 -18
- package/src/utils/collaboration-enhancer.js +84 -126
- package/src/utils/feature-integrator.js +78 -93
- package/src/utils/onboarding-guide.js +82 -93
- package/src/utils/performance.js +9 -9
- package/src/utils/permission-manager.js +39 -58
- package/src/utils/responsive-handler.js +22 -22
- package/src/utils/theme-manager.js +37 -49
- package/src/utils/ui-enhancements-loader.js +30 -40
|
@@ -42,7 +42,7 @@ export class ThemeManager {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
ocean: {
|
|
45
|
-
name: '
|
|
45
|
+
name: '海洋�?,
|
|
46
46
|
colors: {
|
|
47
47
|
primary: '#0ea5e9',
|
|
48
48
|
primaryDark: '#0284c7',
|
|
@@ -59,7 +59,7 @@ export class ThemeManager {
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
forest: {
|
|
62
|
-
name: '
|
|
62
|
+
name: '森林�?,
|
|
63
63
|
colors: {
|
|
64
64
|
primary: '#22c55e',
|
|
65
65
|
primaryDark: '#16a34a',
|
|
@@ -76,7 +76,7 @@ export class ThemeManager {
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
sunset: {
|
|
79
|
-
name: '
|
|
79
|
+
name: '日落�?,
|
|
80
80
|
colors: {
|
|
81
81
|
primary: '#f97316',
|
|
82
82
|
primaryDark: '#ea580c',
|
|
@@ -93,7 +93,7 @@ export class ThemeManager {
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
purple: {
|
|
96
|
-
name: '
|
|
96
|
+
name: '紫罗�?,
|
|
97
97
|
colors: {
|
|
98
98
|
primary: '#a855f7',
|
|
99
99
|
primaryDark: '#9333ea',
|
|
@@ -110,7 +110,7 @@ export class ThemeManager {
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
midnight: {
|
|
113
|
-
name: '
|
|
113
|
+
name: '午夜�?,
|
|
114
114
|
colors: {
|
|
115
115
|
primary: '#3b82f6',
|
|
116
116
|
primaryDark: '#2563eb',
|
|
@@ -127,7 +127,7 @@ export class ThemeManager {
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
rose: {
|
|
130
|
-
name: '
|
|
130
|
+
name: '玫瑰�?,
|
|
131
131
|
colors: {
|
|
132
132
|
primary: '#f43f5e',
|
|
133
133
|
primaryDark: '#e11d48',
|
|
@@ -147,8 +147,7 @@ export class ThemeManager {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
151
|
-
*/
|
|
150
|
+
* 加载保存的主�? */
|
|
152
151
|
loadTheme() {
|
|
153
152
|
return localStorage.getItem('theme') || 'default';
|
|
154
153
|
}
|
|
@@ -165,7 +164,7 @@ export class ThemeManager {
|
|
|
165
164
|
*/
|
|
166
165
|
applyTheme(themeName) {
|
|
167
166
|
if (!this.themes[themeName]) {
|
|
168
|
-
console.error('
|
|
167
|
+
console.error('主题不存�?', themeName);
|
|
169
168
|
return;
|
|
170
169
|
}
|
|
171
170
|
|
|
@@ -196,8 +195,7 @@ export class ThemeManager {
|
|
|
196
195
|
}
|
|
197
196
|
|
|
198
197
|
/**
|
|
199
|
-
*
|
|
200
|
-
*/
|
|
198
|
+
* 获取所有主�? */
|
|
201
199
|
getAllThemes() {
|
|
202
200
|
return Object.entries(this.themes).map(([key, theme]) => ({
|
|
203
201
|
id: key,
|
|
@@ -207,8 +205,7 @@ export class ThemeManager {
|
|
|
207
205
|
}
|
|
208
206
|
|
|
209
207
|
/**
|
|
210
|
-
*
|
|
211
|
-
*/
|
|
208
|
+
* 创建自定义主�? */
|
|
212
209
|
createCustomTheme(name, colors) {
|
|
213
210
|
const themeId = `custom_${Date.now()}`;
|
|
214
211
|
this.themes[themeId] = {
|
|
@@ -223,8 +220,7 @@ export class ThemeManager {
|
|
|
223
220
|
}
|
|
224
221
|
|
|
225
222
|
/**
|
|
226
|
-
*
|
|
227
|
-
*/
|
|
223
|
+
* 保存自定义主�? */
|
|
228
224
|
saveCustomThemes() {
|
|
229
225
|
const customThemes = {};
|
|
230
226
|
Object.entries(this.themes).forEach(([key, theme]) => {
|
|
@@ -236,8 +232,7 @@ export class ThemeManager {
|
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
/**
|
|
239
|
-
*
|
|
240
|
-
*/
|
|
235
|
+
* 加载自定义主�? */
|
|
241
236
|
loadCustomThemes() {
|
|
242
237
|
const saved = localStorage.getItem('customThemes');
|
|
243
238
|
if (saved) {
|
|
@@ -245,17 +240,16 @@ export class ThemeManager {
|
|
|
245
240
|
const customThemes = JSON.parse(saved);
|
|
246
241
|
Object.assign(this.themes, customThemes);
|
|
247
242
|
} catch (error) {
|
|
248
|
-
console.error('
|
|
243
|
+
console.error('加载自定义主题失�?', error);
|
|
249
244
|
}
|
|
250
245
|
}
|
|
251
246
|
}
|
|
252
247
|
|
|
253
248
|
/**
|
|
254
|
-
*
|
|
255
|
-
*/
|
|
249
|
+
* 删除自定义主�? */
|
|
256
250
|
deleteCustomTheme(themeId) {
|
|
257
251
|
if (!themeId.startsWith('custom_')) {
|
|
258
|
-
console.error('
|
|
252
|
+
console.error('只能删除自定义主�?);
|
|
259
253
|
return false;
|
|
260
254
|
}
|
|
261
255
|
|
|
@@ -284,8 +278,8 @@ export class ThemeManager {
|
|
|
284
278
|
<p class="theme-subtitle-modern">选择您喜欢的主题风格,让界面更加个性化</p>
|
|
285
279
|
</div>
|
|
286
280
|
<button class="btn-create-theme-modern" id="createCustomThemeBtn">
|
|
287
|
-
<span class="btn-icon"
|
|
288
|
-
<span
|
|
281
|
+
<span class="btn-icon">�?/span>
|
|
282
|
+
<span>创建自定义主�?/span>
|
|
289
283
|
</button>
|
|
290
284
|
</div>
|
|
291
285
|
|
|
@@ -311,21 +305,21 @@ export class ThemeManager {
|
|
|
311
305
|
</div>
|
|
312
306
|
</div>
|
|
313
307
|
<div class="theme-colors-modern">
|
|
314
|
-
<span class="color-dot" style="background: ${theme.colors.primary};" title="
|
|
315
|
-
<span class="color-dot" style="background: ${theme.colors.secondary};" title="
|
|
316
|
-
<span class="color-dot" style="background: ${theme.colors.success};" title="
|
|
317
|
-
<span class="color-dot" style="background: ${theme.colors.danger};" title="
|
|
308
|
+
<span class="color-dot" style="background: ${theme.colors.primary};" title="主色�?></span>
|
|
309
|
+
<span class="color-dot" style="background: ${theme.colors.secondary};" title="次要�?></span>
|
|
310
|
+
<span class="color-dot" style="background: ${theme.colors.success};" title="成功�?></span>
|
|
311
|
+
<span class="color-dot" style="background: ${theme.colors.danger};" title="危险�?></span>
|
|
318
312
|
</div>
|
|
319
313
|
</div>
|
|
320
314
|
<div class="theme-info-modern">
|
|
321
315
|
<div class="theme-name-modern">${theme.name}</div>
|
|
322
316
|
${this.currentTheme === theme.id ?
|
|
323
|
-
'<div class="theme-badge-modern"
|
|
317
|
+
'<div class="theme-badge-modern">�?当前使用</div>' :
|
|
324
318
|
'<div class="theme-action-modern">点击应用</div>'}
|
|
325
319
|
</div>
|
|
326
320
|
${theme.id.startsWith('custom_') ?
|
|
327
321
|
`<button class="btn-delete-theme-modern" data-theme="${theme.id}" title="删除主题">
|
|
328
|
-
<span
|
|
322
|
+
<span>🗑�?/span>
|
|
329
323
|
</button>` :
|
|
330
324
|
''}
|
|
331
325
|
</div>
|
|
@@ -344,8 +338,7 @@ export class ThemeManager {
|
|
|
344
338
|
const themeId = card.dataset.theme;
|
|
345
339
|
this.applyTheme(themeId);
|
|
346
340
|
|
|
347
|
-
//
|
|
348
|
-
container.querySelectorAll('.theme-card-modern').forEach(c => c.classList.remove('active'));
|
|
341
|
+
// 更新选中状�? container.querySelectorAll('.theme-card-modern').forEach(c => c.classList.remove('active'));
|
|
349
342
|
card.classList.add('active');
|
|
350
343
|
|
|
351
344
|
// 更新徽章文字
|
|
@@ -357,26 +350,24 @@ export class ThemeManager {
|
|
|
357
350
|
const badge = card.querySelector('.theme-badge-modern, .theme-action-modern');
|
|
358
351
|
if (badge) {
|
|
359
352
|
badge.className = 'theme-badge-modern';
|
|
360
|
-
badge.textContent = '
|
|
353
|
+
badge.textContent = '�?当前使用';
|
|
361
354
|
}
|
|
362
355
|
}
|
|
363
356
|
});
|
|
364
357
|
});
|
|
365
358
|
|
|
366
|
-
//
|
|
367
|
-
container.querySelectorAll('.btn-delete-theme-modern').forEach(btn => {
|
|
359
|
+
// 删除自定义主�? container.querySelectorAll('.btn-delete-theme-modern').forEach(btn => {
|
|
368
360
|
btn.addEventListener('click', (e) => {
|
|
369
361
|
e.stopPropagation();
|
|
370
362
|
const themeId = btn.dataset.theme;
|
|
371
|
-
if (confirm('
|
|
363
|
+
if (confirm('确定要删除这个主题吗�?)) {
|
|
372
364
|
this.deleteCustomTheme(themeId);
|
|
373
365
|
this.renderThemeSelector(container);
|
|
374
366
|
}
|
|
375
367
|
});
|
|
376
368
|
});
|
|
377
369
|
|
|
378
|
-
//
|
|
379
|
-
const createBtn = container.querySelector('#createCustomThemeBtn');
|
|
370
|
+
// 创建自定义主�? const createBtn = container.querySelector('#createCustomThemeBtn');
|
|
380
371
|
if (createBtn) {
|
|
381
372
|
createBtn.addEventListener('click', () => {
|
|
382
373
|
this.showCustomThemeDialog(container);
|
|
@@ -392,30 +383,30 @@ export class ThemeManager {
|
|
|
392
383
|
dialog.className = 'modal';
|
|
393
384
|
dialog.innerHTML = `
|
|
394
385
|
<div class="modal-content" style="max-width: 600px;">
|
|
395
|
-
<h3
|
|
386
|
+
<h3>创建自定义主�?/h3>
|
|
396
387
|
<form id="customThemeForm">
|
|
397
388
|
<div class="form-group">
|
|
398
389
|
<label>主题名称</label>
|
|
399
390
|
<input type="text" name="name" placeholder="我的主题" required>
|
|
400
391
|
</div>
|
|
401
392
|
<div class="form-group">
|
|
402
|
-
<label
|
|
393
|
+
<label>主色�?/label>
|
|
403
394
|
<input type="color" name="primary" value="#6366f1">
|
|
404
395
|
</div>
|
|
405
396
|
<div class="form-group">
|
|
406
|
-
<label
|
|
397
|
+
<label>次要�?/label>
|
|
407
398
|
<input type="color" name="secondary" value="#8b5cf6">
|
|
408
399
|
</div>
|
|
409
400
|
<div class="form-group">
|
|
410
|
-
<label
|
|
401
|
+
<label>成功�?/label>
|
|
411
402
|
<input type="color" name="success" value="#10b981">
|
|
412
403
|
</div>
|
|
413
404
|
<div class="form-group">
|
|
414
|
-
<label
|
|
405
|
+
<label>危险�?/label>
|
|
415
406
|
<input type="color" name="danger" value="#ef4444">
|
|
416
407
|
</div>
|
|
417
408
|
<div class="form-group">
|
|
418
|
-
<label
|
|
409
|
+
<label>背景�?/label>
|
|
419
410
|
<input type="color" name="bgDark" value="#0f172a">
|
|
420
411
|
</div>
|
|
421
412
|
<div class="form-group">
|
|
@@ -500,8 +491,7 @@ export class ThemeManager {
|
|
|
500
491
|
}
|
|
501
492
|
|
|
502
493
|
/**
|
|
503
|
-
*
|
|
504
|
-
*/
|
|
494
|
+
* 调整透明�? */
|
|
505
495
|
adjustOpacity(color, opacity) {
|
|
506
496
|
const num = parseInt(color.replace('#', ''), 16);
|
|
507
497
|
const R = num >> 16;
|
|
@@ -511,8 +501,7 @@ export class ThemeManager {
|
|
|
511
501
|
}
|
|
512
502
|
|
|
513
503
|
/**
|
|
514
|
-
*
|
|
515
|
-
*/
|
|
504
|
+
* 添加主题选择器样�? */
|
|
516
505
|
addThemeSelectorStyles() {
|
|
517
506
|
if (document.getElementById('theme-selector-modern-styles')) return;
|
|
518
507
|
|
|
@@ -797,8 +786,7 @@ export class ThemeManager {
|
|
|
797
786
|
}
|
|
798
787
|
|
|
799
788
|
/**
|
|
800
|
-
*
|
|
801
|
-
*/
|
|
789
|
+
* 初始化主�? */
|
|
802
790
|
init() {
|
|
803
791
|
this.loadCustomThemes();
|
|
804
792
|
this.applyTheme(this.currentTheme);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* UI
|
|
3
|
-
* 自动加载所有界面美化功能
|
|
4
|
-
* 确保所有优化的界面在启动时自动集成
|
|
2
|
+
* UI 美化增强加载�? * 自动加载所有界面美化功�? * 确保所有优化的界面在启动时自动集成
|
|
5
3
|
*/
|
|
6
4
|
|
|
7
5
|
export class UIEnhancementsLoader {
|
|
@@ -15,7 +13,7 @@ export class UIEnhancementsLoader {
|
|
|
15
13
|
*/
|
|
16
14
|
async init() {
|
|
17
15
|
if (this.enhancementsLoaded) {
|
|
18
|
-
console.log('
|
|
16
|
+
console.log('�?UI美化增强已加�?);
|
|
19
17
|
return;
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -31,8 +29,7 @@ export class UIEnhancementsLoader {
|
|
|
31
29
|
// 3. 加载任务详情美化
|
|
32
30
|
await this.loadTaskDetailEnhancements();
|
|
33
31
|
|
|
34
|
-
// 4.
|
|
35
|
-
await this.loadWorkflowEnhancements();
|
|
32
|
+
// 4. 加载工作流美�? await this.loadWorkflowEnhancements();
|
|
36
33
|
|
|
37
34
|
// 5. 加载投票详情美化
|
|
38
35
|
await this.loadPollDetailEnhancements();
|
|
@@ -40,17 +37,17 @@ export class UIEnhancementsLoader {
|
|
|
40
37
|
// 6. 加载协作工具美化
|
|
41
38
|
await this.loadCollaborationEnhancements();
|
|
42
39
|
|
|
43
|
-
// 7.
|
|
44
|
-
console.log('
|
|
40
|
+
// 7. 加载设置界面美化(已�?feature-integrator.js 中)
|
|
41
|
+
console.log('�?设置界面美化已集�?);
|
|
45
42
|
|
|
46
|
-
// 8.
|
|
47
|
-
console.log('
|
|
43
|
+
// 8. 加载帮助中心美化(已�?onboarding-guide.js 中)
|
|
44
|
+
console.log('�?帮助中心美化已集�?);
|
|
48
45
|
|
|
49
46
|
this.enhancementsLoaded = true;
|
|
50
|
-
console.log('🎉 所有UI
|
|
47
|
+
console.log('🎉 所有UI美化增强加载完成�?);
|
|
51
48
|
|
|
52
49
|
} catch (error) {
|
|
53
|
-
console.error('
|
|
50
|
+
console.error('�?UI美化增强加载失败:', error);
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
|
|
@@ -70,7 +67,7 @@ export class UIEnhancementsLoader {
|
|
|
70
67
|
自动加载,无需手动集成
|
|
71
68
|
======================================== */
|
|
72
69
|
|
|
73
|
-
/*
|
|
70
|
+
/* 确保主内容区域填满空�?*/
|
|
74
71
|
.main-content {
|
|
75
72
|
width: 100% !important;
|
|
76
73
|
max-width: 100% !important;
|
|
@@ -175,12 +172,12 @@ export class UIEnhancementsLoader {
|
|
|
175
172
|
animation: fadeInUp 0.3s ease;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
/*
|
|
175
|
+
/* 加载状�?*/
|
|
179
176
|
.loading {
|
|
180
177
|
animation: pulse 1.5s ease-in-out infinite;
|
|
181
178
|
}
|
|
182
179
|
|
|
183
|
-
/*
|
|
180
|
+
/* 成功状�?*/
|
|
184
181
|
.success-feedback {
|
|
185
182
|
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
186
183
|
color: white;
|
|
@@ -189,7 +186,7 @@ export class UIEnhancementsLoader {
|
|
|
189
186
|
animation: fadeInUp 0.3s ease;
|
|
190
187
|
}
|
|
191
188
|
|
|
192
|
-
/*
|
|
189
|
+
/* 错误状�?*/
|
|
193
190
|
.error-feedback {
|
|
194
191
|
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
|
|
195
192
|
color: white;
|
|
@@ -199,7 +196,7 @@ export class UIEnhancementsLoader {
|
|
|
199
196
|
}
|
|
200
197
|
`;
|
|
201
198
|
document.head.appendChild(style);
|
|
202
|
-
console.log('
|
|
199
|
+
console.log('�?全局美化样式已加�?);
|
|
203
200
|
}
|
|
204
201
|
|
|
205
202
|
/**
|
|
@@ -207,15 +204,14 @@ export class UIEnhancementsLoader {
|
|
|
207
204
|
*/
|
|
208
205
|
async loadBackupEnhancements() {
|
|
209
206
|
try {
|
|
210
|
-
//
|
|
211
|
-
const module = await import('../pages/optimized-backup-view.js');
|
|
207
|
+
// 动态导入备份管理美化模�? const module = await import('../pages/optimized-backup-view.js');
|
|
212
208
|
|
|
213
209
|
// 将函数挂载到全局,供 admin-dashboard.js 调用
|
|
214
210
|
window.renderOptimizedBackupView = module.renderOptimizedBackupView;
|
|
215
211
|
|
|
216
|
-
console.log('
|
|
212
|
+
console.log('�?备份管理美化已加�?);
|
|
217
213
|
} catch (error) {
|
|
218
|
-
console.warn('⚠️
|
|
214
|
+
console.warn('⚠️ 备份管理美化加载失败,使用默认界�?', error);
|
|
219
215
|
}
|
|
220
216
|
}
|
|
221
217
|
|
|
@@ -224,21 +220,19 @@ export class UIEnhancementsLoader {
|
|
|
224
220
|
*/
|
|
225
221
|
async loadTaskDetailEnhancements() {
|
|
226
222
|
try {
|
|
227
|
-
//
|
|
228
|
-
const module = await import('../pages/optimized-task-detail.js');
|
|
223
|
+
// 动态导入任务详情美化模�? const module = await import('../pages/optimized-task-detail.js');
|
|
229
224
|
|
|
230
225
|
// 将函数挂载到全局,供其他模块调用
|
|
231
226
|
window.renderOptimizedTaskDetail = module.renderOptimizedTaskDetail;
|
|
232
227
|
|
|
233
|
-
console.log('
|
|
228
|
+
console.log('�?任务详情美化已加�?);
|
|
234
229
|
} catch (error) {
|
|
235
|
-
console.warn('⚠️
|
|
230
|
+
console.warn('⚠️ 任务详情美化加载失败,使用默认界�?', error);
|
|
236
231
|
}
|
|
237
232
|
}
|
|
238
233
|
|
|
239
234
|
/**
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
235
|
+
* 加载工作流美�? */
|
|
242
236
|
async loadWorkflowEnhancements() {
|
|
243
237
|
try {
|
|
244
238
|
// 动态导入工作流美化模块
|
|
@@ -247,7 +241,7 @@ export class UIEnhancementsLoader {
|
|
|
247
241
|
// 将函数挂载到全局,供其他模块调用
|
|
248
242
|
window.renderOptimizedWorkflowView = module.renderOptimizedWorkflowView;
|
|
249
243
|
|
|
250
|
-
console.log('
|
|
244
|
+
console.log('�?工作流美化已加载');
|
|
251
245
|
} catch (error) {
|
|
252
246
|
console.warn('⚠️ 工作流美化加载失败,使用默认界面:', error);
|
|
253
247
|
}
|
|
@@ -258,8 +252,7 @@ export class UIEnhancementsLoader {
|
|
|
258
252
|
*/
|
|
259
253
|
async loadPollDetailEnhancements() {
|
|
260
254
|
try {
|
|
261
|
-
//
|
|
262
|
-
const module = await import('../components/optimized-poll-detail.js');
|
|
255
|
+
// 动态导入投票详情美化模�? const module = await import('../components/optimized-poll-detail.js');
|
|
263
256
|
|
|
264
257
|
// 将函数挂载到全局,供其他模块调用
|
|
265
258
|
window.renderOptimizedPollDetail = module.renderOptimizedPollDetail;
|
|
@@ -270,9 +263,9 @@ export class UIEnhancementsLoader {
|
|
|
270
263
|
window.addPollDetailStyles();
|
|
271
264
|
}
|
|
272
265
|
|
|
273
|
-
console.log('
|
|
266
|
+
console.log('�?投票详情美化已加�?);
|
|
274
267
|
} catch (error) {
|
|
275
|
-
console.warn('⚠️
|
|
268
|
+
console.warn('⚠️ 投票详情美化加载失败,使用默认界�?', error);
|
|
276
269
|
}
|
|
277
270
|
}
|
|
278
271
|
|
|
@@ -281,17 +274,16 @@ export class UIEnhancementsLoader {
|
|
|
281
274
|
*/
|
|
282
275
|
async loadCollaborationEnhancements() {
|
|
283
276
|
try {
|
|
284
|
-
//
|
|
285
|
-
const module = await import('../styles/collaboration-modern.js');
|
|
277
|
+
// 动态导入协作工具美化模�? const module = await import('../styles/collaboration-modern.js');
|
|
286
278
|
|
|
287
279
|
// 立即添加样式
|
|
288
280
|
if (typeof module.addCollaborationStyles === 'function') {
|
|
289
281
|
module.addCollaborationStyles();
|
|
290
282
|
}
|
|
291
283
|
|
|
292
|
-
console.log('
|
|
284
|
+
console.log('�?协作工具美化已加�?);
|
|
293
285
|
} catch (error) {
|
|
294
|
-
console.warn('⚠️
|
|
286
|
+
console.warn('⚠️ 协作工具美化加载失败,使用默认界�?', error);
|
|
295
287
|
}
|
|
296
288
|
}
|
|
297
289
|
|
|
@@ -303,8 +295,7 @@ export class UIEnhancementsLoader {
|
|
|
303
295
|
}
|
|
304
296
|
|
|
305
297
|
/**
|
|
306
|
-
*
|
|
307
|
-
*/
|
|
298
|
+
* 重新加载所有美化功�? */
|
|
308
299
|
async reload() {
|
|
309
300
|
this.enhancementsLoaded = false;
|
|
310
301
|
await this.init();
|
|
@@ -314,8 +305,7 @@ export class UIEnhancementsLoader {
|
|
|
314
305
|
// 创建单例实例
|
|
315
306
|
export const uiEnhancementsLoader = new UIEnhancementsLoader();
|
|
316
307
|
|
|
317
|
-
//
|
|
318
|
-
if (typeof window !== 'undefined') {
|
|
308
|
+
// 自动初始化(在模块加载时�?if (typeof window !== 'undefined') {
|
|
319
309
|
// 等待 DOM 加载完成后初始化
|
|
320
310
|
if (document.readyState === 'loading') {
|
|
321
311
|
document.addEventListener('DOMContentLoaded', () => {
|