Compare commits

...

409 Commits

Author SHA1 Message Date
Lei OT 8d273a2e68 custom service-worker 1 year ago
Lei OT e7c7d7b1be custom service-worker 1 year ago
Lei OT 2650ed63c6 style: 1 year ago
Lei OT bbd729e792 style: 1 year ago
Lei OT 18bbaf01f7 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 42880d0818 input 提示 1 year ago
Lei OT 88a5d3c43c Merge remote-tracking branch 'origin/main' into dev/chat
# Conflicts:
#	src/views/Conversations/Components/Input/MediaUpload.jsx
1 year ago
Lei OT 9dd0ed5102 fix: 模板信息显示 1 year ago
Lei OT 8f2d295eb1 pwa 1 year ago
Lei OT 5321345043 perf: 上传的格式和大小限制 1 year ago
Lei OT cdb840d819 Merge branch 'main' into dev/chat 1 year ago
Lei OT 03339197e6 Merge branch 'main' into dev/chat
# Conflicts:
#	src/lib/msgUtils.js
1 year ago
Lei OT 03d6a7fafe perf: 历史记录: 会话的的时间 1 year ago
Lei OT 0d7117ae6a feat: 新建会话 1 year ago
Lei OT 09e5f3cfba style: 历史记录: 引用的来源title color 1 year ago
Lei OT 445b557e03 perf: 提示文字 1 year ago
Lei OT c643cec93b fix: 模板: 只发送body 1 year ago
Lei OT 6b4c3a0557 perf: 历史记录: 显示绝对时间 1 year ago
Lei OT d242ed3909 perf: 模板: 有header, footer, buttons 1 year ago
Lei OT acd0c198fc PWA 1 year ago
Lei OT dd4d815bdf Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT ceafee6f98 附件格式大小说明 1 year ago
Lei OT 895f7820c4 . 1 year ago
Lei OT 22cf74c100 Merge branch 'main' into dev/chat
# Conflicts:
#	src/views/ChatHistory.jsx
1 year ago
Lei OT ae2b96c3ff fix: 在线聊天: 刷新页面 1 year ago
Lei OT 1efb5ca7ed perf: 历史记录: 匹配消息的提示 1 year ago
Lei OT 4826d3cbb7 perf: 历史记录: 预览 1 year ago
Lei OT f92344687a Merge branch 'main' into dev/chat 1 year ago
Lei OT b01f6b9d81 fix: 订单修改whatsappID之后, 获取新会话 1 year ago
Lei OT b1399739c5 style: 模板 free style 1 year ago
Lei OT 5cd36def65 fix: 历史记录: 转发的消息. 不以引用显示 1 year ago
Lei OT 8a977114d6 Merge branch 'main' into dev/chat 1 year ago
Lei OT 170a982e4a fix: 历史记录: 显示发送人名字 1 year ago
Lei OT a626961c12 Merge branch 'main' into dev/chat 1 year ago
Lei OT 70e29bfabd fix: 历史记录: 显示发送人名字 1 year ago
Lei OT 5e4d07a58b Merge branch 'main' into dev/chat 1 year ago
Lei OT 6da6332613 根据设备来跳转路由 1 year ago
Lei OT 47186ad302 移动端: 返回列表 1 year ago
Lei OT 67cea51bd5 feat: 会话过期提示 1 year ago
Lei OT 8c4ed2f7a9 perf: 模板按钮状态 1 year ago
Lei OT 15dea123b1 Merge branch 'main' into dev/chat 1 year ago
Lei OT 3fc0fb305c fix: 历史记录: 搜索组件 1 year ago
Lei OT f614343462 test: 移动端键盘事件 1 year ago
Lei OT e19907f4c7 fix: ConversationsList navigate replace 1 year ago
Lei OT 9d00a0f436 Merge branch 'main' into dev/chat 1 year ago
Lei OT 316f84a9e5 移动端: 跳转列表页 1 year ago
Lei OT 5fe495a61f 不禁用模板发送 1 year ago
Lei OT 55f4d98d79 消息列表 1 year ago
Lei OT 1ac17f3c0e Merge branch 'main' into dev/chat 1 year ago
Lei OT 0e3a73355e 发送消息 1 year ago
Lei OT dd6a38861e Merge branch 'main' into dev/chat 1 year ago
Lei OT 475245cefe Merge branch 'main' into dev/chat 1 year ago
Lei OT 2b97b7aea7 perf: 移动端 1 year ago
Lei OT e8a638e7b2 fix: 判断是否支持 window.Notification 1 year ago
Lei OT ab6b8241c7 style: Emoji popover 1 year ago
Lei OT 241cbc7032 Merge branch 'main' into dev/chat 1 year ago
Lei OT 918af17798 历史记录: 会话显示Me的名字 1 year ago
Lei OT ddb9f98174 退出登录 1 year ago
Lei OT 6cfc936646 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 7b4fae4820 Emoji picker 使用native 避免下载图片 1 year ago
Lei OT 426c586198 style: 历史记录查询表单 1 year ago
Lei OT b3347e6d6b fix: 更新未读消息数; style: 移动端 1 year ago
Lei OT 84ee40d1b8 移动端 1 year ago
Lei OT 02cc765e9a Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 0de6151270 Merge branch 'main' into dev/chat 1 year ago
Lei OT 2699ae63d6 style: 发送失败的消息 1 year ago
Lei OT 371a29fbeb Merge branch 'main' into dev/chat 1 year ago
Lei OT b9a690d871 style: 发送失败的消息 1 year ago
Lei OT 12af76d634 Merge branch 'main' into dev/chat 1 year ago
Lei OT 43dc473737 websocket 连接重复初始化 1 year ago
Lei OT 45a49a89a2 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 62b7a1f0e6 websocket 连接重复初始化 1 year ago
Lei OT 396f266a78 fix: 消息数重复累计 1 year ago
Lei OT e1ae93822b style: 点击引用 1 year ago
Lei OT 2530107a36 perf: 历史记录的每页加载, 5000 1 year ago
Lei OT c5d2332a0e fix: 收到新会话消息. 当前客户端增加新会话. 包括发出的 1 year ago
Lei OT 3a120f7932 Merge branch 'main' into dev/chat 1 year ago
Lei OT 99d9f1ed32 style: 历史消息 1 year ago
Lei OT 032a9263d5 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 15a377abbe feat: 历史消息查询 1 year ago
Lei OT 1668cc4df9 fix: 历史记录: 模板没有参数显示undefined 1 year ago
Lei OT 46a3590e6d 模板填充: 匹配free style中的参数 1 year ago
Lei OT 4ceeff2ef3 Merge branch 'main' into dev/chat
# Conflicts:
#	src/views/ChatHistory.jsx
1 year ago
Lei OT 54c2364ac2 . 1 year ago
Lei OT 9269b362ac style: ChatHistory loading 1 year ago
Lei OT 1040e66b24 历史记录: 不显示text title 1 year ago
Lei OT d8b19ae287 fix: 有会话才获取消息记录 1 year ago
Lei OT 69d62427ac perf: 会话提示 1 year ago
Lei OT 08558325f7 perf: text消息显示客人的昵称 1 year ago
Lei OT d87136db93 Merge branch 'main' into dev/chat 1 year ago
Lei OT ec8736df91 perf: 联系人消息: 有wa_id 才能发消息 1 year ago
Lei OT 1b53966624 Merge branch 'main' into dev/chat
# Conflicts:
#	src/lib/msgUtils.js
1 year ago
Lei OT 79979ab53c perf: 联系人消息: 商户号显示org.company 1 year ago
Lei OT 3c07b31b03 Merge branch 'main' into dev/chat 1 year ago
Lei OT 42e3d48356 popover forceRender 1 year ago
Lei OT 32b75c0e04 popover forceRender 1 year ago
Lei OT f7dc6b97ba 上传文件重命名, 避免重名覆盖 1 year ago
Lei OT 571298659c perf: 更新会话的下一页参数 1 year ago
Lei OT 15f05dd1a2 联系人名片: 点击开启会话 1 year ago
Lei OT 77966e159e style: 1 year ago
Lei OT c58ee8319e 历史记录: 发送失败显示时间 1 year ago
Lei OT f8dbabe505 历史记录: 使用在线的API, 往上一页加载 1 year ago
Lei OT 1d3be3d077 style: 历史会话: bg-color 区分发送消息, 当会话钟有多个人员服务时 1 year ago
Lei OT 93a198fbdc perf: 模板填充顾问的英文名 1 year ago
Lei OT d3a8f8c927 历史记录里面的template 1 year ago
Lei OT 1ea939c9f5 style: input textarea emoji font 1 year ago
Lei OT d7ae548d1e style: 消息输入: 字数显示: 最大2000. 1 year ago
Lei OT f67ff2b29f todo: 获取会话列表, 多个顾问ID 1 year ago
Lei OT ec16147001 fix: 订单跟踪页面的高级查询的状态 1 year ago
Lei OT dd267e1223 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT eb771497b9 . 1 year ago
Lei OT 27d05620ba perf: 会话列表的昵称null判断 1 year ago
Lei OT bc31645153 debug: emoji in json 1 year ago
Lei OT b35088fd7a fix: whatsapp_name null 1 year ago
Lei OT df9d44c5a0 模板参数输入 1 year ago
Lei OT c3d8295798 在线窗口: 获取消息: 倒序的, 更新本页的最后一条消息座位下一页的开始 1 year ago
Lei OT 2557a19c22 Merge branch 'main' into dev/chat 1 year ago
Lei OT 4110618dcf test: 消息记录 1 year ago
Lei OT 241cff32fc 模板参数输入 1 year ago
Lei OT 9f9b55a9b4 Merge branch 'main' into dev/chat 1 year ago
Lei OT f5e0c94032 在线窗口: 获取消息 1 year ago
Lei OT 9c8a607d4a Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 780d917fb7 Merge branch 'main' into dev/chat 1 year ago
Lei OT d857d8fc69 历史记录: 搜索客人列表 1 year ago
Lei OT c86acb9111 fix: 模板填充 1 year ago
Lei OT 313e3f8478 在线窗口: 加载更多消息 1 year ago
Lei OT 413e3381d8 style: font 1 year ago
Lei OT 7f0a1dc8e7 更新投递成功的时间到会话列表 1 year ago
Lei OT 3f678d09c6 粘贴上传 1 year ago
Lei OT d9ce340780 style: 订单跟踪: 显示WhatsApp状态 1 year ago
Lei OT a1ef6b4c44 . 1 year ago
Lei OT 89e0da1667 Merge branch 'main' into dev/chat 1 year ago
Lei OT 363e000fdc 历史记录 加载更多 1 year ago
Lei OT 8cfaca960a Merge branch 'main' into dev/chat
# Conflicts:
#	src/actions/ConversationActions.js
1 year ago
Lei OT db948b5a4a 历史记录: 搜索顾问 1 year ago
Lei OT df9a5c917d 获取消息记录 1 year ago
Lei OT f50ffe8209 发送引用的消息返回状态时没有原文 1 year ago
Lei OT 81a112fd58 emoji font 1 year ago
Lei OT 51595e4b6b 优化搜索会话 1 year ago
Lei OT a3285eeaec 优化体验: 缓存表单数据: 订单跟踪-高级查询 1 year ago
Lei OT b1b2844238 fix: 从订单进入后没有置顶和选中 1 year ago
Lei OT bf22a4fbdd style: 历史记录; 即时聊天页的点击滚动 1 year ago
Lei OT b7af5b1cd3 优化体验: 缓存表单数据 1 year ago
Lei OT d5f32690a4 优化体验: 缓存表单数据 1 year ago
Lei OT da3a0037c7 Merge branch 'main' into dev/chat 1 year ago
Lei OT 0b0bd0ac04 优化体验: 缓存表单数据 1 year ago
Lei OT d66388b9cb Merge branch 'main' into dev/chat 1 year ago
Lei OT ae246e2975 test: ChatHistory: 查看salesmartly 导过来的会话 1 year ago
Lei OT 361e53d0c7 Merge branch 'main' into dev/chat 1 year ago
Lei OT 92a423ab31 todo: 历史记录 1 year ago
Lei OT 3bbe967b4c Merge branch 'main' into dev/chat 1 year ago
Lei OT 99d95b90b2 读取到消息之后, 未读清零 1 year ago
Lei OT 0ddf156761 取消系统通知的ID, 否则收起之后弹不出来 1 year ago
Lei OT 995c1dd5f7 . 1 year ago
Lei OT aac1c5159c Merge branch 'main' into dev/chat 1 year ago
Lei OT 671cbc7881 会话列表: 搜索会话 1 year ago
Lei OT db774fec09 Merge branch 'main' into dev/chat 1 year ago
Lei OT a0bdda2041 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT b802d47792 会话列表: 搜索会话 1 year ago
Lei OT 972f033928 Merge branch 'main' into dev/chat 1 year ago
Lei OT 75c76f39e3 未读消息设置已读接口 1 year ago
Lei OT 39ce076cdf 会话列表: 显示订单号 1 year ago
Lei OT 2e96375caf Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 1d1207d155 ChatHistory 1 year ago
Lei OT 225d5ab4a0 高德地图尝试唤起 1 year ago
Lei OT 1b6233c6ee 新消息闪烁 1 year ago
Lei OT 4f525effce 滚动 1 year ago
Lei OT 025289eae7 上传文件的类型限制 1 year ago
Lei OT 78b3db5a40 Merge branch 'main' into dev/chat 1 year ago
Lei OT 0beca15c24 消息记录: 类型 location 打开高德地图 1 year ago
Lei OT 3f6e5437ed style: sticker bg transparent 1 year ago
Lei OT ad620c964c Merge branch 'main' into dev/chat 1 year ago
Lei OT 17b9ad50a5 消息类型: 系统消息 1 year ago
Lei OT 269f64d2bc Merge branch 'main' into dev/chat 1 year ago
Lei OT 76f1be63dc 消息记录: 类型unsupported 1 year ago
Lei OT 640f164ee0 Merge branch 'main' into dev/chat
# Conflicts:
#	src/lib/msgUtils.js
1 year ago
Lei OT 7b37713bb1 Merge branch 'main' into dev/chat 1 year ago
Lei OT de474f9e28 上传附件: 发送相应的类型; 消息类型解析: contacts, location 1 year ago
Lei OT fb4e47fcdc Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 8757d5df54 未解析的消息, 显示为不支持 1 year ago
Lei OT c30628681d 消息类型: contact: 复制; location 1 year ago
Lei OT 7002f72cbf todo: 联系人点击发送消息 1 year ago
Lei OT 7013ca56fd todo: 语音和视频有可能格式后缀一样 1 year ago
Lei OT 599962ec40 MediaUpload: 上传附件文件 1 year ago
Lei OT e689f3a33b Merge branch 'main' into dev/chat 1 year ago
Lei OT f72acd987c MediaUpload: 上传马上发送 1 year ago
Lei OT 89c6cb3134 断开连接之后, 取消当前会话 1 year ago
Lei OT 9972a093b8 MediaUpload: videoURL 1 year ago
Lei OT 9540b22eba Merge branch 'main' into dev/chat 1 year ago
Lei OT af419072ac 上传文件 1 year ago
Lei OT a20dd314cf todo: MediaUpload action 1 year ago
Lei OT 08eb3c6bcb fix: 发送的消息无法引用 1 year ago
Lei OT 9c363103d6 关闭会话: 判断更新路由 1 year ago
Lei OT e87fe9222f Merge branch 'main' into dev/chat 1 year ago
Lei OT e4da66d1a9 style: 截断头像上的名称显示 1 year ago
Lei OT 4778081a86 fix: undefined get order info 1 year ago
Lei OT 876d94cacf Merge branch 'main' into dev/chat 1 year ago
Lei OT a9f9e08553 删除 消息记录的loading 1 year ago
Lei OT c9e2c0c69a todo: scroll 1 year ago
Lei OT a7be72ba9c Merge branch 'main' into dev/chat 1 year ago
Lei OT 1618a194a1 输入的emoji 1 year ago
Lei OT 7cdb06e849 Merge branch 'main' into dev/chat 1 year ago
Lei OT 380c2ec247 noto color emoji 1 year ago
Lei OT 472c2004f2 Merge branch 'dev/chat-emoji' into dev/chat 1 year ago
Lei OT b9e69c56c9 # Conflicts:
#	src/views/Conversations/Components/Messages.jsx
#	src/views/Conversations/Conversations.css
1 year ago
Lei OT 118c43093c dowmload google noto color emoji 1 year ago
Lei OT 7811c3ab9a Merge branch 'main' into dev/chat 1 year ago
Lei OT b06d72bde4 google Emoji; 更新totalNotify 1 year ago
Lei OT ed1af0ac7c noto color emoji 1 year ago
Lei OT de7fd30df5 todo: emoji font 1 year ago
Lei OT 4852b0067d 按钮: 滚动到底部 1 year ago
Lei OT 39bf2e717b 引用: 图片, 视频 1 year ago
Lei OT 07b7493a60 初始化之后, 获取最近的消息 1 year ago
Lei OT 403194c3a0 消息类型: 文件: 点击打开; 不支持的消息类型 1 year ago
Lei OT 9725320aa6 消息滚动; 修复预览, 引用 1 year ago
Lei OT f2fcf0324a Merge branch 'main' into dev/chat
# Conflicts:
#	src/views/Conversations/Components/InputComposer.jsx
1 year ago
Lei OT ca637d2a54 模板激活状态 1 year ago
Lei OT 13ae99945b notification click err: null 1 year ago
Lei OT b95fdd12d6 fix: Emoji repeat 1 year ago
Lei OT d49b0496bc 消息列表 滚动 1 year ago
Lei OT 0e8042d256 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 5e73262b58 Merge branch 'main' into dev/chat 1 year ago
Lei OT b486551169 缺少引用 1 year ago
Lei OT a79b8e8167 Merge branch 'main' into dev/chat 1 year ago
Lei OT 32076e9441 新消息提醒和闪烁 1 year ago
Lei OT 323247aa0f 订单会话: 刷新 1 year ago
Lei OT 30202d2e43 Merge branch 'main' into dev/chat 1 year ago
Lei OT 38e18cf4b8 订单会话: 刷新 1 year ago
Lei OT 65a9095b0d todo: 消息数量 1 year ago
Lei OT fa89685dd2 WhatsApp号码判断 1 year ago
Lei OT fda145219e Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 3488d18bbe 消息解析 链接和表情 1 year ago
Lei OT fd204762d7 新消息闪烁提醒 1 year ago
Lei OT f9abf66455 空的消息记录 1 year ago
Lei OT 309f4154ea 消息样式 1 year ago
Lei OT ce4fa20491 修改store 取值 1 year ago
Lei OT 3da599944b style 1 year ago
Lei OT c09e828038 发送时间 1 year ago
Lei OT 68fab01530 显示错误码 1 year ago
Lei OT 5aee197c47 Merge branch 'main' into dev/chat 1 year ago
Lei OT 8495a27035 会话列表显示号码 1 year ago
Lei OT 803187c7d2 Merge branch 'main' into dev/chat 1 year ago
Lei OT b8b9f84d6b # 1 year ago
Lei OT d35e94f504 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT d7fb0167ac 发送失败: errorMessage 1 year ago
Lei OT 509bc4cffd style: 客人名称和头像显示 1 year ago
Lei OT 5f96a4e27b todo: upload 1 year ago
Lei OT caf653ee51 Merge branch 'main' into dev/chat 1 year ago
Lei OT 98efe884c7 # 1 year ago
Lei OT d516a2af65 feat: Emoji 1 year ago
Lei OT 43c28618a6 style: 图片消息样式; 会话列表 1 year ago
Lei OT 8d3f00119a conf: 1 year ago
Lei OT 36d14a4d28 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 4957db8c94 Merge branch 'main' into dev/chat 1 year ago
Lei OT cf22e07288 获取用户信息 1 year ago
Lei OT 0ef2cdf72f Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 487e0e8b09 断开连接 1 year ago
Lei OT 7c50a4c523 重连20次, 间隔10秒 1 year ago
Lei OT 3c0704b0aa Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 6ac55957b6 手动重连; 字母头像 1 year ago
Lei OT ec29e9e40c Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 5f26170df1 信息中的链接识别和样式 1 year ago
Lei OT 87d3bce2f4 发送图片: 图片+文字 1 year ago
Lei OT 141a40d0f4 Merge branch 'main' into dev/chat 1 year ago
Lei OT 641b05f6a8 fix: 不含参数的模板 1 year ago
Lei OT 49e0be4428 解决链接之后上级组件re-render; 获取loginUser 1 year ago
Lei OT b0105a2b9c Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 77b3a135ee 上传图片 1 year ago
Lei OT d5ff6e08ca 主动重连 1 year ago
Lei OT 5615b0b9f8 会话列表和消息右键菜单 1 year ago
Lei OT 01f271fb38 style: 1 year ago
Lei OT 484e8122d4 fix: 折叠 1 year ago
Lei OT b44a3fd40d Merge branch 'main' into dev/chat 1 year ago
Lei OT ce77626f1d Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT dc238a7078 # 1 year ago
Lei OT 64895873c3 feat: 链接识别和可点击 1 year ago
Lei OT 738492da17 style: 1 year ago
Lei OT 4b8cce5f8f Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 18ab4fd5ab Merge branch 'main' into dev/chat 1 year ago
Lei OT d19c70968c 刷新页面, 定位指定的会话 1 year ago
Lei OT 53f6a02032 引用消息显示的颜色 1 year ago
Lei OT 16688f2cf4 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT e769555e3d Messages list loading 1 year ago
Lei OT ac09cce4a8 引用的消息原文 todo: 接收: 引用自客户信息的原文; emoji 1 year ago
Lei OT ea7e430962 Merge branch 'main' into dev/chat 1 year ago
Lei OT 4b76f1cdc0 发: 引用消息的发送, 显示, 读取 1 year ago
Lei OT 34f900469c todo: 引用消息 1 year ago
Lei OT a291f57b8f Merge branch 'main' into dev/chat 1 year ago
Lei OT 7db4d9fd74 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 0ef3a4a2b3 订单进入会话, 获取新会话列表 1 year ago
Lei OT e466d3d414 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT be24c964e0 删除 useReducer 的 ConversationContext, Action, Reducer, Provider 1 year ago
Lei OT c6ed93acd1 style: bg 1 year ago
Lei OT 62e1d9eff0 perf: 会话窗口: 左右折叠 1 year ago
Lei OT 14a6baac43 引用的消息, 不显示号码 1 year ago
Lei OT 80cb0357de Messages, 数组避免多余的属性和方法 1 year ago
Lei OT aa23645e86 Merge branch 'main' into dev/chat 1 year ago
Lei OT 00de8ceedc 模板分页, 3 1 year ago
Lei OT 8282bf6d1b referenceMsg 数据类型 1 year ago
Lei OT e5e17625fe Merge branch 'main' into dev/chat 1 year ago
Lei OT 3a7d293e02 zustand debug 1 year ago
Lei OT a5dade92e6 websocket 1 year ago
Lei OT c7aaa17bea Merge branch 'main' into dev/chat 1 year ago
Lei OT 13ea0ea893 删除context provider 1 year ago
Lei OT a72914c955 useShallow 1 year ago
Lei OT e4b55d6303 # 1 year ago
Lei OT 0b0bf329aa 状态管理: zustand 1 year ago
Lei OT a7ccf7a9b0 日志 黄 1 year ago
Lei OT d083784a71 发送图片链接 1 year ago
Lei OT daa48d4c80 Merge branch 'main' into dev/chat 1 year ago
Lei OT 7cf33bb1c9 消息记录: 引用的消息原文 todo: reaction 的原文 1 year ago
Lei OT f989f257a1 Merge branch 'main' into dev/chat 1 year ago
Lei OT 662b614b60 根据类型, 控制是否允许引用 1 year ago
Lei OT bb3168169c 引用消息 1 year ago
Lei OT ed7c659fb4 context from 1 year ago
Lei OT e2499e9901 会话窗口刷新和获取消息记录 1 year ago
Lei OT 92c5a8636d 关闭会话: 传参 1 year ago
Lei OT 0e257d93f1 Merge branch 'main' into dev/chat 1 year ago
Lei OT bd4b864518 订单号传参 1 year ago
Lei OT f6bc762413 Merge branch 'main' into dev/chat 1 year ago
Lei OT 41a870941e Merge branch 'main' into dev/chat 1 year ago
Lei OT fb6ea485c8 关闭会话 1 year ago
Lei OT 271ed8e089 回复引用 1 year ago
Lei OT e3b5b90a9a Merge branch 'main' into dev/chat 1 year ago
Lei OT d07bafad66 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 1163cb1533 检测是否超过24H 1 year ago
Lei OT 7ba43ebd4f 新消息-新增会话; style: 激活的会话; 会话新消息在列表中置顶 1 year ago
Lei OT 2effad3ef9 Merge branch 'main' into dev/chat 1 year ago
Lei OT 0c0b197439 新消息, 滚动 1 year ago
Lei OT d07848a401 断开连接状态; 发送按钮; 同步显示其他客户端发送的实时消息 1 year ago
Lei OT 94800b91fd Merge branch 'main' into dev/chat 1 year ago
Lei OT aeeb443ef9 style: 1 year ago
Lei OT f6d3a93e15 style: 1 year ago
Lei OT bd61113e3f Merge branch 'main' into dev/chat 1 year ago
Lei OT 7ed6391b81 模板变量输入和替换; 模板搜索和分页; 多行文本输入, 输入区域样式, 回车发送消息; 消息显示支持换行; websocket 连接状态; 重连 1 year ago
Lei OT a5d628b92d websocket 连接状态; 重连 1 year ago
Lei OT 5631ba4997 消息显示支持换行 1 year ago
Lei OT 21c0341a02 多行文本输入, 输入区域样式 1 year ago
Lei OT ff15ef9e2d 模板搜索和分页 1 year ago
Lei OT e80d491c58 模板变量输入和替换, 回车发送 1 year ago
Lei OT e243b5e77c Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT d55157ca2d 发送模板: 变量输入 1 year ago
Lei OT c5f1ba1b5e 发送模板替换变量 1 year ago
Lei OT 44b3dbd8df Merge branch 'main' into dev/chat 1 year ago
Lei OT 591969be40 模板消息: body: 发送参数填充后的整体内容 1 year ago
Lei OT d604f4ebf1 获取消息记录 1 year ago
Lei OT f8b7aad52e 新模板: use_new_whatsapp 1 year ago
Lei OT e229e76222 Merge branch 'main' into dev/chat 1 year ago
Lei OT ed17229b6c 发送消息: 需要会话的订单号 1 year ago
Lei OT 3a403a3fcd 发送的消息的状态; 切换会话,获取相应的订单信息, 再影响到会话; 1 year ago
Lei OT 21a9b80a9d Merge branch 'main' into dev/chat 1 year ago
Lei OT 3ade9778ea Merge branch 'main' into dev/chat 1 year ago
Lei OT e5469aad5c 会话切换 1 year ago
Lei OT 26def60a24 reducer context 管理conversation state; 拆分reducer, 减少re-render; 整理目录; 新消息累加未读数量 test: 关闭会话; 1 year ago
Lei OT 2a333c1e45 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 9a3dbf634f test: 关闭会话; 1 year ago
Lei OT 3a342331d6 新消息累加未读数量 1 year ago
Lei OT 3290b2c161 减少re-render 1 year ago
Lei OT 2b6cf70f48 拆分reducer; 整理目录 1 year ago
Lei OT 4552d0ad58 reducer context 管理conversation state 1 year ago
Lei OT fc556120ce style: 订单预定详情 1 year ago
Lei OT 575178ee7d Merge branch 'main' into dev/chat 1 year ago
Lei OT 61523f3d5f Merge branch 'main' into dev/chat 1 year ago
Lei OT b7e10d1670 关闭会话 1 year ago
Lei OT 006be2a1c4 style: 1 year ago
Lei OT 2dbcf78252 订单进入会话的切换;
暂不做沟通记录
1 year ago
Lei OT a3a57847ec 当前的消息列表; 更新列表的时间 1 year ago
Lei OT 628e37ddfc WhatsApp样式配置; 订单进入会话; 1 year ago
Lei OT 2e39681046 Merge branch 'main' into dev/chat 1 year ago
Lei OT be2aa636ca 接受的消息, 不需要状态 1 year ago
Lei OT 5f4c8863b5 切换会话, conversationid 1 year ago
Lei OT 404105fc40 同步返回结果: API状态; 异步结果 1 year ago
Lei OT 58038b6fe2 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT d0ea6c8b7b 会话无订单时的切换; 测试地址; 测试会话; 1 year ago
Lei OT b91314db0f Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 2d30de03d2 # 1 year ago
Lei OT 30d4b5ca6f 点击会话列表, 替换路由 1 year ago
Lei OT 23fd7dc22f WhatsApp模板参数填充; 增加显示消息类型: 文件; 发送消息的同步回调处理; 自动重连(10次); 1 year ago
Lei OT 9cd3e1d38e 删除测试文件 1 year ago
lot cf093c22ca Merge remote-tracking branch 'origin/main' into dev/chat
# Conflicts:
#	src/views/OrderFollow.jsx
1 year ago
Lei OT d2ef99cd9e 订单进入会话页面, 获取订单信息 1 year ago
Lei OT 6c6989accd 更新消息送达状态 1 year ago
Lei OT 74966d2730 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 491facce74 连接ws:// 传参opisn 1 year ago
Lei OT 806ef7f90f 删除mobx observer 1 year ago
Lei OT 8cebe7da45 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT d8a88be180 整理 ConversationContext .
todo: 使用 useContext useReducer 管理事件触发更新状态
1 year ago
Lei OT 3f31656630 todo: 更新已发送的消息的状态. renderId 1 year ago
Lei OT 7c23a75c26 Merge remote-tracking branch 'origin/main' into dev/chat
# Conflicts:
#	package.json
#	src/main.jsx
#	src/stores/ConversationContext.js
#	src/views/Conversations/ChatWindow.jsx
#	src/views/Conversations/Components/ConversationsList.jsx
#	src/views/Conversations/Components/CustomerProfile.jsx
#	src/views/Conversations/Components/InputBox.jsx
#	src/views/Conversations/Components/Messages.jsx
#	src/views/Conversations/ConversationProvider.jsx
#	src/views/Conversations/Conversations.css
#	tailwind.config.js
#	vite.config.js
1 year ago
Lei OT ef71252617 模板消息等
todo: 更新已发送的消息的状态. renderId
1 year ago
Lei OT 70fbcae715 对话窗口; 发送文本; 解析WhatsApp信息各类型 1 year ago
Lei OT ab124d9be3 build: + tailwind 1 year ago
Lei OT 807edcb74f feat: 会话窗口 1 year ago
Lei OT 5d83ce7662 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 58198062ff feat: 会话窗口 1 year ago
Lei OT 11e4a44de2 feat: 会话窗口 1 year ago
Lei OT d80b83b1f3 Merge remote-tracking branch 'origin/main' into dev/chat
# Conflicts:
#	src/main.jsx
#	src/views/App.jsx
1 year ago
Lei OT acbd36a8b4 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 6ad8148021 Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 2017b373e9 ChatWindow 1 year ago
Lei OT 4ee4eb85bf Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT 90fd95d977 test: 单个会话订阅. 发送和接收 1 year ago
Lei OT 785fdffc56 Merge remote-tracking branch 'origin/main' into dev/chat
# Conflicts:
#	src/main.jsx
1 year ago
Lei OT 499cc91218 conf: eslint 1 year ago
Lei OT e13bc7b096 test: 单个会话订阅. 发送和接收 1 year ago
Lei OT 7bdd2a6eac Merge remote-tracking branch 'origin/main' into dev/chat 1 year ago
Lei OT ca20cfb1a2 Merge branch 'main' into dev/chat 1 year ago
Lei OT 1d8c12ef66 test 1 year ago
Lei OT c0f1f7b369 WebSocketLib 1 1 year ago

@ -20,6 +20,7 @@
"react-router-dom": "^6.21.1", "react-router-dom": "^6.21.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"vite-plugin-pwa": "^0.19.6",
"zustand": "^4.5.0" "zustand": "^4.5.0"
}, },
"devDependencies": { "devDependencies": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -0,0 +1,39 @@
function openWebSocket() {
console.log('open websocket');
}
self.addEventListener('install', function(event) {
self.skipWaiting();
console.log('Installed', event);
});
self.addEventListener('activate', (event) => {
// event.waitUntil(self.clients.claim());
event.waitUntil(openWebSocket());
self.clients.claim();
});
self.addEventListener('push', (event) => {
const data = event.data.json();
const title = data.title || 'New Message';
const options = {
body: data.body || 'You have a new message',
icon: 'path/to/icon.png',
badge: 'path/to/badge.png',
vibrate: [200, 100, 200], // 振动
// Other notification options
};
event.waitUntil(
self.registration.showNotification(title, options)
);
});
// Send a message to all clients every minute
setInterval(function() {
self.clients.matchAll().then(function(clients) {
clients.forEach(function(client) {
client.postMessage('Service worker is still running');
});
});
}, 60000); // 60000 ms = 1 minute

@ -185,6 +185,26 @@ export const sentMsgTypeMapped = {
// const footer = msg.template_origin.components?.footer?.[0]?.text || ''; // const footer = msg.template_origin.components?.footer?.[0]?.text || '';
return { return {
...msg, ...msg,
template: {
...msg.template,
components: [
...msg.template.components.filter((com) => !['footer', 'buttons', 'header'].includes(com.type.toLowerCase())),
...(msg.template.components.filter((com) => 'header' === com.type.toLowerCase()).length > 0
? msg.template.components
.filter((com) => 'header' === com.type.toLowerCase())
.map((ele) => ({ type: 'header', parameters: [{ text: ele.text, type: ele.format.toLowerCase(), [ele.format.toLowerCase()]: { link: ele.example.header_url[0] } }] }))
: []),
...(msg.template.components.filter((com) => 'buttons' === com.type.toLowerCase()).length > 0
? msg.template.components
.filter((com) => 'buttons' === com.type.toLowerCase())[0]
// .buttons.filter((btns) => ! ['phone_number', 'url'].includes( btns.type.toLowerCase()))
.buttons.filter((btns) => ! isEmpty(btns.example)) // 静态按钮不发
.map((btn, btnI) => ({ type: 'button', sub_type: btn.type.toLowerCase(), index: btnI,
// parameters: [{ text: 'lq1FTtA8', type: 'text' }]
}))
: []),
],
},
actionId: msg.id, actionId: msg.id,
conversationid: msg.id.split('.')[0], conversationid: msg.id.split('.')[0],
type: 'text', type: 'text',

@ -74,3 +74,36 @@ ReactDOM.createRoot(document.getElementById('root')).render(
</ThemeContext.Provider> </ThemeContext.Provider>
// </React.StrictMode> // </React.StrictMode>
); );
if ('serviceWorker' in navigator) {
const wb = import.meta.env.VITE_SERVICE_WORKER_ENTRY;
console.log('if service worker', wb);
window.addEventListener('load', () => {
console.log('listen load');
navigator.serviceWorker.register('/service-worker.js').then(
(registration) => {
console.log('Service Worker registered:', registration);
},
(error) => {
console.error('Service Worker registration failed:', error);
}, () => {
console.log('final');
}
);
// navigator.serviceWorker.register(wb).then(
// (registration) => {
// console.log('vite-plugin-pwa Service Worker registered:', registration);
// },
// (error) => {
// console.error('vite-plugin-pwa Service Worker registration failed:', error);
// }
// );
});
// Listen for messages from the service worker
navigator.serviceWorker.addEventListener('message', function(event) {
console.log('Received message from service worker:', event.data);
});
}

@ -8,6 +8,7 @@ import 'dayjs/locale/zh-cn'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { Outlet, useHref, useNavigate } from 'react-router-dom' import { Outlet, useHref, useNavigate } from 'react-router-dom'
import AppLogo from '@/assets/logo-gh.png'
import '@/assets/App.css' import '@/assets/App.css'
import 'react-chat-elements/dist/main.css' import 'react-chat-elements/dist/main.css'
@ -20,12 +21,33 @@ function AuthApp() {
const href = useHref() const href = useHref()
// Whether we are running as an installed PWA or not.
const isInstalledPWA = window.matchMedia('(display-mode: window-controls-overlay)').matches ||
window.matchMedia('(display-mode: standalone)').matches;
const [connectWebsocket, fetchInitialData, disconnectWebsocket ] = useConversationStore((state) => [ const [connectWebsocket, fetchInitialData, disconnectWebsocket ] = useConversationStore((state) => [
state.connectWebsocket, state.connectWebsocket,
state.fetchInitialData, state.fetchInitialData,
state.disconnectWebsocket, state.disconnectWebsocket,
]); ]);
useEffect(() => { useEffect(() => {
if (! isInstalledPWA) {
document.getElementById('about-dialog').showModal();
}
if (!isInstalledPWA ) {
window.addEventListener('beforeinstallprompt', e => {
// Don't let the default prompt go.
e.preventDefault();
// Instead, wait for the user to click the install button.
document.getElementById('about-dialog').addEventListener('close', () => {
if (document.getElementById('about-dialog').returnValue === "install") {
e.prompt();
}
});
});
} else {
document.getElementById('install-button').disabled = true;
}
if (!("Notification" in window)) { if (!("Notification" in window)) {
alert("This browser does not support desktop notification"); alert("This browser does not support desktop notification");
} else { } else {
@ -57,20 +79,34 @@ function AuthApp() {
token: { token: {
colorPrimary: colorPrimary, colorPrimary: colorPrimary,
borderRadius: borderRadius, borderRadius: borderRadius,
fontFamily: "-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'", fontFamily:
"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'",
}, },
algorithm: theme.defaultAlgorithm, algorithm: theme.defaultAlgorithm,
}} }}
locale={zhLocale} locale={zhLocale}
renderEmpty={() => <Empty description={false} />} renderEmpty={() => <Empty description={false} />}>
>
<AntApp> <AntApp>
<ErrorBoundary> <ErrorBoundary>
<Outlet /> <Outlet />
<dialog id='about-dialog' className='border-0'>
<img className='logo' src={AppLogo} alt='logo' />
<section className='about'>
<h1>销售平台</h1>
<h2>Sales CRM</h2>
<p>Haina travel global sales CRM system</p>
</section>
<form className='actions flex gap-1' method='dialog'>
<button value='cancel' className='px-4 py-2 rounded-full border-0'>Close</button>
<button value='install' id='install-button' className='px-4 py-2 rounded-full border-0 border-transparent bg-indigo-500 text-white'>
Install app
</button>
</form>
</dialog>
</ErrorBoundary> </ErrorBoundary>
</AntApp> </AntApp>
</ConfigProvider> </ConfigProvider>
) );
} }
export default AuthApp export default AuthApp

@ -1,11 +1,13 @@
import { useEffect, useState, useRef } from 'react'; import { useEffect, useState, useRef } from 'react';
import { useParams, useNavigate, useLocation } from 'react-router-dom'; import { useParams, useNavigate, useLocation } from 'react-router-dom';
import { Dropdown, Input } from 'antd'; import { Dropdown, Input, Button, } from 'antd';
import { fetchOrderConversationsList, fetchConversationItemClose, } from '@/actions/ConversationActions'; import { PlusOutlined, WhatsAppOutlined, } from '@ant-design/icons';
import { fetchOrderConversationsList, fetchConversationItemClose, postNewConversationItem } from '@/actions/ConversationActions';
import { ChatItem } from 'react-chat-elements'; import { ChatItem } from 'react-chat-elements';
import { isEmpty } from '@/utils/utils'; import { isEmpty } from '@/utils/utils';
import useConversationStore from '@/stores/ConversationStore'; import useConversationStore from '@/stores/ConversationStore';
import useAuthStore from '@/stores/AuthStore'; import useAuthStore from '@/stores/AuthStore';
import ConversationsNewItem from './ConversationsNewItem';
/** /**
* [] * []
@ -127,9 +129,22 @@ const Conversations = ({ mobile }) => {
setDataSource(conversationsList); setDataSource(conversationsList);
}; };
const [newChatModalVisible, setNewChatModalVisible] = useState(false);
const [newChatFormValues, setNewChatFormValues] = useState();
const handleNewChat = async (values) => {
console.log(values);
const newItem = await postNewConversationItem({...values, opi_sn: userId });
if ( ! isEmpty(newItem)) {
addToConversationList(newItem);
setCurrentConversation(newItem);
}
// setNewChatFormValues(values);
}
return ( return (
<div className='flex flex-col h-inherit'> <div className='flex flex-col h-inherit'>
<div className=''> <div className='flex gap-1'>
<Button onClick={() => setNewChatModalVisible(true)} icon={<PlusOutlined />} type={'primary'} />
<Input.Search <Input.Search
className='' className=''
ref={searchInputRef} ref={searchInputRef}
@ -142,10 +157,10 @@ const Conversations = ({ mobile }) => {
setTabCnt(-1); setTabCnt(-1);
setTabSelectedConversation({}); setTabSelectedConversation({});
}} }}
onKeyDown={e => { onKeyDown={(e) => {
if (e.key === 'Tab') { if (e.key === 'Tab') {
e.preventDefault(); e.preventDefault();
const _this = tabCnt >= dataSource.length-1 ? 0 : tabCnt + 1 const _this = tabCnt >= dataSource.length - 1 ? 0 : tabCnt + 1;
setTabCnt(_this); setTabCnt(_this);
setTabSelectedConversation(dataSource[_this]); setTabSelectedConversation(dataSource[_this]);
} }
@ -153,12 +168,12 @@ const Conversations = ({ mobile }) => {
onPressEnter={(e) => { onPressEnter={(e) => {
handleSearchConversations(e.target.value); handleSearchConversations(e.target.value);
searchInputRef.current.blur(); searchInputRef.current.blur();
onSwitchConversation(dataSource[(tabCnt < 0 ? 0 : tabCnt)]); onSwitchConversation(dataSource[tabCnt < 0 ? 0 : tabCnt]);
setTabCnt(-1); setTabCnt(-1);
setTabSelectedConversation({}); setTabSelectedConversation({});
return false; return false;
}} }}
placeholder='搜索名称' placeholder='搜索名称/号码/订单号'
/> />
</div> </div>
<div className='flex-1 overflow-x-hidden overflow-y-auto relative'> <div className='flex-1 overflow-x-hidden overflow-y-auto relative'>
@ -189,16 +204,18 @@ const Conversations = ({ mobile }) => {
subtitle={item.coli_id} subtitle={item.coli_id}
date={item.last_received_time} date={item.last_received_time}
unread={item.unread_msg_count} unread={item.unread_msg_count}
className={ className={[
[String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '', String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '',
String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '' String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '',
].join(' ') ].join(' ')}
} statusText={<WhatsAppOutlined key={'channel'} className='text-whatsapp' />}
statusColor={'#fff'}
onClick={() => onSwitchConversation(item)} onClick={() => onSwitchConversation(item)}
/> />
</Dropdown> </Dropdown>
))} ))}
</div> </div>
<ConversationsNewItem open={newChatModalVisible} onCreate={handleNewChat} onCancel={() => setNewChatModalVisible(false)} />
</div> </div>
); );
}; };

@ -0,0 +1,51 @@
import { useState, useEffect } from 'react';
import { Form, Input, Modal } from 'antd';
export const ConversationItemForm = ({ initialValues, onFormInstanceReady }) => {
const [form] = Form.useForm();
useEffect(() => {
onFormInstanceReady(form);
}, []);
return (
<Form layout='horizontal' form={form} name='form_in_modal' initialValues={initialValues}>
<Form.Item name={'phone_number'} label='WhatsApp号码' rules={[{ required: true, message: '请输入联系人手机号' }]}>
<Input placeholder='请输入联系人手机号' />
</Form.Item>
<Form.Item name={'name'} label='联系人名称' rules={[{ required: true, message: '请输入联系人名称' }]}>
<Input placeholder='请输入联系人名称' />
</Form.Item>
</Form>
);
};
export const ConversationItemFormModal = ({ open, onCreate, onCancel, initialValues }) => {
const [formInstance, setFormInstance] = useState();
return (
<Modal
open={open}
title='新建会话'
okText='创建'
// cancelText='Cancel'
okButtonProps={{
autoFocus: true,
}}
onCancel={() => { onCancel(); formInstance?.resetFields();}}
destroyOnClose
onOk={async () => {
try {
const values = await formInstance?.validateFields();
// formInstance?.resetFields();
onCreate(values);
} catch (error) {
console.log('Failed:', error);
}
}}>
<ConversationItemForm
initialValues={initialValues}
onFormInstanceReady={(instance) => {
setFormInstance(instance);
}}
/>
</Modal>
);
};
export default ConversationItemFormModal;

@ -28,24 +28,6 @@ import ExpireTimeClock from './ExpireTimeClock';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
const aliOSSHost = `https://haina-sale-system.oss-cn-shenzhen.aliyuncs.com/WAMedia/`; const aliOSSHost = `https://haina-sale-system.oss-cn-shenzhen.aliyuncs.com/WAMedia/`;
/**
* image
* ext: ani;bmp;gif;ico;jpe;jpeg;jpg;pcx;png;psd;tga;tif;tiff;wmf
*
* audio
* ext: aac;ac3;aif;aifc;aiff;au;cda;dts;fla;flac;it;m1a;m2a;m3u;m4a;mid;midi;mka;mod;mp2;mp3;mpa;ogg;ra;rmi;spc;rmi;snd;umx;voc;wav;wma;xm
*
* video
* ext: 3g2;3gp;3gp2;3gpp;amr;amv;asf;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4b;m4p;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv
*
*/
const fileTypesExt = {
sticker: ['webp'],
photo: ['jpeg', 'jpg', 'png'],
video: ['gif', 'mp4', '3gp'],
document: ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'csv'],
audio: ['aac', 'mp4', 'm4a', 'mp3', 'amr', 'ogg'],
};
const InputComposer = ({ mobile }) => { const InputComposer = ({ mobile }) => {
const userId = useAuthStore((state) => state.loginUser.userId); const userId = useAuthStore((state) => state.loginUser.userId);
@ -266,7 +248,7 @@ const InputComposer = ({ mobile }) => {
maxLength={2000} maxLength={2000}
showCount={textabled} showCount={textabled}
placeholder={ placeholder={
gt24h !textabled
? '会话已过期. 请发送打招呼消息激活对话💬.' ? '会话已过期. 请发送打招呼消息激活对话💬.'
: mobile === undefined : mobile === undefined
? 'Enter 发送, Shift+Enter 换行\n支持复制粘贴 [截图/文件] 以备发送' ? 'Enter 发送, Shift+Enter 换行\n支持复制粘贴 [截图/文件] 以备发送'

@ -60,11 +60,11 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get
<span className={`text-sm leading-5 emoji-text whitespace-pre-wrap ${className} ${extraClass}`} key={'msg-text'}> <span className={`text-sm leading-5 emoji-text whitespace-pre-wrap ${className} ${extraClass}`} key={'msg-text'}>
{headerObj ? ( {headerObj ? (
<div className='text-neutral-500 text-center'> <div className='text-neutral-500 text-center'>
{'text' === headerObj.format.toLowerCase() && <div>{headerObj.text}</div>} {'text' === (headerObj?.parameters?.[0]?.type || '').toLowerCase() && <div>{headerObj.text}</div>}
{'image' === headerObj.format.toLowerCase() && <img src={headerObj.example.header_url} height={100}></img>} {'image' === (headerObj?.parameters?.[0]?.type || '').toLowerCase() && <img src={headerObj.parameters[0].image.link} height={100}></img>}
{['document', 'video'].includes(headerObj.format.toLowerCase()) && ( {['document', 'video'].includes((headerObj?.parameters?.[0]?.type || '').toLowerCase()) && (
<a href={headerObj.example.header_url} target='_blank' key={headerObj.format} rel='noreferrer' className='text-sm'> <a href={headerObj.parameters[0][headerObj.parameters[0].type].link} target='_blank' key={headerObj.format} rel='noreferrer' className='text-sm'>
[&nbsp;{headerObj.format}&nbsp;] [&nbsp;{headerObj.parameters[0].type}&nbsp;]
</a> </a>
)} )}
</div> </div>

@ -217,9 +217,9 @@
.chatwindow-wrapper .message-box-focus { .chatwindow-wrapper .message-box-focus {
animation-iteration-count: 2; animation-iteration-count: 2;
-webkit-animation-iteration-count: 2; -webkit-animation-iteration-count: 2;
-webkit-animation-duration: 1s; -webkit-animation-duration: 2s;
animation-name: message-box-default-focus-x; animation-name: message-box-default-focus-x;
animation-duration: 1s; animation-duration: 2s;
} }

@ -1,31 +1,73 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react';
import WindiCSS from 'vite-plugin-windicss' import WindiCSS from 'vite-plugin-windicss';
import { VitePWA } from 'vite-plugin-pwa';
const buildDatePlugin = () => { const buildDatePlugin = () => {
return { return {
transformIndexHtml(html) { transformIndexHtml(html) {
const dataString = new Date().toISOString() const dataString = new Date().toISOString();
return html.replace( return html.replace(/%BUILD_DATE%/, `${dataString}`);
/%BUILD_DATE%/,
`${dataString}`,
)
}, },
} };
} };
// PWA plugin
const manifestForPlugIn = {
// registerType: 'prompt',
// registerType: 'autoUpdate',
registerType: 'none',
// includeAssests: ['/src/assets/logo-gh.png'],
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
},
manifest: {
name: 'Sales CRM',
short_name: 'Sales CRM',
description: 'Haina travel global sales CRM system',
icons: [
{
src: '/favicon.ico',
sizes: '32x32',
},
{
src: '/s-launchericon-192-192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/s-launchericon-144-144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: '/s-launchericon-512-512.png',
sizes: '512x512',
type: 'image/png',
},
],
theme_color: '#171717',
background_color: '#ccd5ae',
display: 'standalone',
display_override: ['window-controls-overlay'],
scope: '/',
start_url: '.',
orientation: 'portrait',
},
};
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react(), WindiCSS(), buildDatePlugin()], plugins: [react(), WindiCSS(), buildDatePlugin(), ],
server: { server: {
host: "0.0.0.0", host: '0.0.0.0',
}, },
resolve: { resolve: {
alias: { alias: {
"@": "/src", '@': '/src',
}, },
}, },
build: { build: {
// outDir: 'distTTT',
emptyOutDir: true,
sourcemap: true, sourcemap: true,
manifest: true, manifest: true,
chunkSizeWarningLimit: 555, chunkSizeWarningLimit: 555,
@ -44,6 +86,6 @@ export default defineConfig({
// } // }
}, },
terserOptions: { terserOptions: {
maxWorkers: 4 maxWorkers: 4,
} },
}) });

Loading…
Cancel
Save