collabdocchat 1.2.0 → 1.2.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/QUICK_START.md ADDED
@@ -0,0 +1,144 @@
1
+ # CollabDocChat 快速启动指南 🚀
2
+
3
+ ## 方法一:使用一键启动脚本(推荐)
4
+
5
+ ### Windows 用户
6
+
7
+ 1. 下载启动脚本:
8
+ ```bash
9
+ curl -O https://raw.githubusercontent.com/shijinghao/collabdocchat/main/install-and-start.bat
10
+ ```
11
+
12
+ 2. 双击运行 `install-and-start.bat`
13
+
14
+ 或者在命令行中运行:
15
+ ```bash
16
+ install-and-start.bat
17
+ ```
18
+
19
+ ### Linux/Mac 用户
20
+
21
+ 1. 下载启动脚本:
22
+ ```bash
23
+ curl -O https://raw.githubusercontent.com/shijinghao/collabdocchat/main/install-and-start.sh
24
+ chmod +x install-and-start.sh
25
+ ```
26
+
27
+ 2. 运行脚本:
28
+ ```bash
29
+ ./install-and-start.sh
30
+ ```
31
+
32
+ ---
33
+
34
+ ## 方法二:手动安装并启动
35
+
36
+ ### 1. 安装(跳过 postinstall 脚本)
37
+
38
+ ```bash
39
+ npm install collabdocchat --ignore-scripts
40
+ ```
41
+
42
+ ### 2. 启动
43
+
44
+ ```bash
45
+ cd node_modules/collabdocchat
46
+ node scripts/quick-start.js
47
+ ```
48
+
49
+ 或者手动分别启动:
50
+
51
+ **启动后端:**
52
+ ```bash
53
+ cd node_modules/collabdocchat
54
+ node server/index.js
55
+ ```
56
+
57
+ **启动前端(新终端):**
58
+ ```bash
59
+ cd node_modules/collabdocchat
60
+ npm run client
61
+ ```
62
+
63
+ **打开浏览器:**
64
+ 访问 `http://localhost:5173`
65
+
66
+ ---
67
+
68
+ ## 方法三:一行命令
69
+
70
+ ### Windows (PowerShell)
71
+
72
+ ```powershell
73
+ npm install collabdocchat --ignore-scripts; cd node_modules\collabdocchat; Start-Process node -ArgumentList "server/index.js" -WindowStyle Hidden; Start-Sleep -Seconds 3; Start-Process npm -ArgumentList "run","client" -WindowStyle Hidden; Start-Sleep -Seconds 8; Start-Process "http://localhost:5173"
74
+ ```
75
+
76
+ ### Linux/Mac
77
+
78
+ ```bash
79
+ npm install collabdocchat --ignore-scripts && cd node_modules/collabdocchat && node server/index.js & sleep 3 && npm run client & sleep 8 && open http://localhost:5173
80
+ ```
81
+
82
+ ---
83
+
84
+ ## 停止服务
85
+
86
+ ### Windows
87
+
88
+ ```bash
89
+ taskkill /F /IM node.exe
90
+ ```
91
+
92
+ ### Linux/Mac
93
+
94
+ ```bash
95
+ pkill -f node
96
+ ```
97
+
98
+ 或者:
99
+
100
+ ```bash
101
+ cd node_modules/collabdocchat
102
+ npm run stop
103
+ ```
104
+
105
+ ---
106
+
107
+ ## 注意事项
108
+
109
+ - 确保 MongoDB 已启动
110
+ - 确保端口 3000 和 5173 未被占用
111
+ - 首次运行需要配置 `.env` 文件(可选)
112
+
113
+ ---
114
+
115
+ ## 常见问题
116
+
117
+ ### Q: 安装卡住了怎么办?
118
+
119
+ A: 使用 `--ignore-scripts` 选项:
120
+ ```bash
121
+ npm install collabdocchat --ignore-scripts
122
+ ```
123
+
124
+ ### Q: 浏览器没有自动打开?
125
+
126
+ A: 手动访问 `http://localhost:5173`
127
+
128
+ ### Q: 如何查看是否启动成功?
129
+
130
+ A: 检查端口占用:
131
+ ```bash
132
+ # Windows
133
+ netstat -ano | findstr :3000
134
+ netstat -ano | findstr :5173
135
+
136
+ # Linux/Mac
137
+ lsof -i:3000
138
+ lsof -i:5173
139
+ ```
140
+
141
+ ---
142
+
143
+ **提示**: 推荐使用一键启动脚本,最简单快捷!
144
+
package/index.html CHANGED
@@ -4,6 +4,8 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>CollabDocChat - 协作文档聊天平台</title>
7
+ <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
8
+ <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
7
9
  <link rel="stylesheet" href="/src/styles/main.css">
8
10
  </head>
9
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "collabdocchat",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "开源的实时协作文档聊天平台 - 集成任务管理、多人文档编辑、智能点名功能",
5
5
  "main": "./server/index.js",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  import { ApiService } from '../services/api.js';
2
2
  import { AuthService } from '../services/auth.js';
3
- import Quill from 'quill';
4
- import 'quill/dist/quill.snow.css';
3
+ // import Quill from 'quill/dist/quill.js';
4
+ // import 'quill/dist/quill.snow.css';
5
5
  import 'emoji-picker-element';
6
6
 
7
7
  export function renderAdminDashboard(user, wsService) {