Compare commits
124 Commits
v2.6.8
...
feat/AICha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb6cc79796 | ||
|
|
68cf5bddca | ||
|
|
c9cdcc0cc5 | ||
|
|
d8a24fc106 | ||
|
|
1a3868b2ea | ||
|
|
d1e949aa87 | ||
|
|
a24f3d0511 | ||
|
|
d2ab29bfd5 | ||
|
|
18ffde1d49 | ||
|
|
54f32eec5f | ||
|
|
2d0d42e35d | ||
|
|
666d73aed1 | ||
|
|
f8602e56eb | ||
|
|
f734dca910 | ||
|
|
1c0cd2e2a7 | ||
|
|
7e762e8524 | ||
|
|
277d598a69 | ||
|
|
09337131b5 | ||
|
|
791b9cc694 | ||
|
|
61618db93c | ||
|
|
2a63046bbd | ||
|
|
030fed7d60 | ||
|
|
13c528a35e | ||
|
|
e068a253e5 | ||
|
|
06384bb204 | ||
|
|
4a1a05cf51 | ||
|
|
5e7c5dd3f3 | ||
|
|
af172e4516 | ||
|
|
d2b6ab25d6 | ||
|
|
0dfdfc1269 | ||
|
|
c927be4c3f | ||
|
|
f883cb3839 | ||
|
|
884a53e448 | ||
|
|
86335c917d | ||
|
|
ea738270a8 | ||
|
|
a8bf8e00ab | ||
|
|
92dba1218f | ||
|
|
f0aa0014a9 | ||
|
|
02ef835855 | ||
|
|
253a7b21b1 | ||
|
|
2c8b15cd3a | ||
|
|
8b9541b51e | ||
|
|
78565bacc8 | ||
|
|
6d512d0374 | ||
|
|
eaa42885c3 | ||
|
|
b50c386432 | ||
|
|
2b232f76aa | ||
|
|
baed923a64 | ||
|
|
3ef1666ef7 | ||
|
|
43d85b10cc | ||
|
|
f17f07cc2b | ||
|
|
4954b1cc24 | ||
|
|
c078a0be1d | ||
|
|
b2fe51fd2a | ||
|
|
72740e7d2d | ||
|
|
c76148687c | ||
|
|
0bc93f14da | ||
|
|
777951bb8c | ||
|
|
833d09efe4 | ||
|
|
f816314115 | ||
|
|
9c33073f75 | ||
|
|
63e28f9993 | ||
|
|
f33f41d41f | ||
|
|
bd825e0c32 | ||
|
|
b45cfd2212 | ||
|
|
3c608a8875 | ||
|
|
5cfbac209d | ||
|
|
2081e99d4a | ||
|
|
706021871a | ||
|
|
026c3d35a0 | ||
|
|
2753e89dd5 | ||
|
|
31ba428f33 | ||
|
|
d9db68c9bb | ||
|
|
6616a932c5 | ||
|
|
493b2e183f | ||
|
|
5800c158aa | ||
|
|
6fcb82bb90 | ||
|
|
0d5455c9c5 | ||
|
|
e5e1725d42 | ||
|
|
4d171273e9 | ||
|
|
8d21d2228a | ||
|
|
d98f59cbb4 | ||
|
|
f0b0656ddc | ||
|
|
62460fbfe0 | ||
|
|
802d224209 | ||
|
|
7589059756 | ||
|
|
6330aaf4ee | ||
|
|
62ebfdf7f7 | ||
|
|
87fc30d170 | ||
|
|
296a944c9f | ||
|
|
635f72996b | ||
|
|
91feb14ff4 | ||
|
|
4dbd35074c | ||
|
|
af0dec1345 | ||
|
|
74bf3702c7 | ||
|
|
e46ee95bb8 | ||
|
|
edbd3defcc | ||
|
|
f9a2b18473 | ||
|
|
418090604a | ||
|
|
6dbfa496b4 | ||
|
|
82c3fd529c | ||
|
|
b793f71f26 | ||
|
|
b8c3c4eec2 | ||
|
|
2a5b9de68b | ||
|
|
2b9a7edaef | ||
|
|
c7fbdd7a02 | ||
|
|
9e4f31ea52 | ||
|
|
3cee9498d7 | ||
|
|
7f8795c36a | ||
|
|
3441b8a282 | ||
|
|
b2a15ca5e2 | ||
|
|
bcce4a01d4 | ||
|
|
0b97e09ccc | ||
|
|
9d287b8202 | ||
|
|
3a50ccdf5c | ||
|
|
d4bf21d464 | ||
|
|
430340c084 | ||
|
|
f9b93372d4 | ||
|
|
41021548a2 | ||
|
|
6b02f3fc61 | ||
|
|
fab231a916 | ||
|
|
2c4841bb11 | ||
|
|
bd6cc99733 | ||
|
|
50a74f3612 |
4
.github/workflows/greetings.yml
vendored
@@ -2,6 +2,10 @@ name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
# 顶层设置最小权限,推荐 contents: read
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
# 跳过 Renovate PR
|
||||
|
||||
28
.github/workflows/pr-chatbot-review.yml
vendored
@@ -83,10 +83,8 @@ jobs:
|
||||
const OpenAI = require('openai');
|
||||
|
||||
const openai = new OpenAI({
|
||||
baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
||||
defaultHeaders: {
|
||||
'Authorization': `Bearer ${process.env.DASHSCOPE_API_KEY}`
|
||||
}
|
||||
apiKey: process.env.DASHSCOPE_API_KEY,
|
||||
baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
||||
});
|
||||
|
||||
const diff = process.env.DIFF;
|
||||
@@ -118,31 +116,15 @@ jobs:
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `## PR 代码分析
|
||||
body: `
|
||||
PR 代码分析
|
||||
|
||||
${analysis}
|
||||
|
||||
---
|
||||
*这是由通义千问 AI 自动生成的 PR 分析,仅供参考。*`
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('API 调用失败:', error);
|
||||
core.setFailed(`PR 分析失败: ${error.message}`);
|
||||
|
||||
// 在 PR 中添加错误信息
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `## PR 代码分析失败
|
||||
|
||||
很抱歉,在分析过程中遇到了错误:${error.message}
|
||||
|
||||
请检查 Action 日志以获取更多详细信息。
|
||||
|
||||
---
|
||||
*这是自动生成的错误通知。*`
|
||||
});
|
||||
core.setFailed(`分析失败: ${error.message}`);
|
||||
}
|
||||
|
||||
- name: Skip Analysis Comment
|
||||
|
||||
4
.github/workflows/release.yml
vendored
@@ -5,6 +5,10 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
# 确保默认情况下所有 job 都只有只读权限,只有需要写权限的 job(比如发布 release 的 job)才会单独提升权限,其他 job 依然保持最小权限,最大程度保护仓库安全
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: true # 如果有新的发布任务,取消正在进行的任务
|
||||
|
||||
123
CHANGELOG.md
@@ -1,5 +1,128 @@
|
||||
|
||||
|
||||
## [2.6.12](https://github.com/HuLaSpark/HuLa/compare/v2.6.11...v2.6.12) (2025-05-25)
|
||||
|
||||
|
||||
### ✨ Features | 新功能
|
||||
|
||||
* **component:** :sparkles: 增加右键emoji可以另存为 ([0dfdfc1](https://github.com/HuLaSpark/HuLa/commit/0dfdfc1269256baa59316b7936db94468b733b69))
|
||||
* **hook:** :sparkles: 增强文本选择复制 ([791b9cc](https://github.com/HuLaSpark/HuLa/commit/791b9cc69485d9c8245396d72cca834ac9a61aa0)), closes [#279](https://github.com/HuLaSpark/HuLa/issues/279)
|
||||
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
||||
* 修复ws链接断开没有重试问题 ([#276](https://github.com/HuLaSpark/HuLa/issues/276)) ([e068a25](https://github.com/HuLaSpark/HuLa/commit/e068a253e5215aacb606f852087e5e9e67010404))
|
||||
* **agreement:** :bug: 安装界面乱码 ([#277](https://github.com/HuLaSpark/HuLa/issues/277)) ([13c528a](https://github.com/HuLaSpark/HuLa/commit/13c528a35e11ee5fa7325beb1fcef8d28f2550e3)), closes [#275](https://github.com/HuLaSpark/HuLa/issues/275)
|
||||
* **hook:** :bug: 修复除emoji类型和图片类型都可以另存为的bug ([d2b6ab2](https://github.com/HuLaSpark/HuLa/commit/d2b6ab25d6fd7ea5a4e9df1d287fe3d3cc9a1b58))
|
||||
* **hook:** :bug: 修复mac系统右键会选中文本的问题 ([7e762e8](https://github.com/HuLaSpark/HuLa/commit/7e762e8524df0d17f85ca71eedb95d01dea7c8d3))
|
||||
* **hook:** :bug: 暂时移除/唤起ai快捷键识别 ([4a1a05c](https://github.com/HuLaSpark/HuLa/commit/4a1a05cf51b4bab670b2da5faac43bf33f902998))
|
||||
* **input:** :bug: 修复mac下输入框检查拼写和字母大小写问题 ([f8602e5](https://github.com/HuLaSpark/HuLa/commit/f8602e56ebbf4ae90f5f5dc7e7cebee317bf4ab4))
|
||||
* **mac:** :bug: 修复mac下点击关闭按钮无法关闭home窗口问题 ([2a63046](https://github.com/HuLaSpark/HuLa/commit/2a63046bbd2d7c4cd484d456c708ab47bdc8e792))
|
||||
* **view:** :bug: 修复托盘菜单内容不展示问题和托盘图标闪烁后不展示问题 ([c927be4](https://github.com/HuLaSpark/HuLa/commit/c927be4c3fd00cdde9f93c15793ea56ce5b11d14))
|
||||
* **view:** :bug: 修改邮箱输入框长度限制 ([61618db](https://github.com/HuLaSpark/HuLa/commit/61618db93cbe9512eceb66fbc50006a90f7d44f1)), closes [#278](https://github.com/HuLaSpark/HuLa/issues/278)
|
||||
* **worker:** :bug: 修复ws在重连后清空token导致无法对应获取消息问题 ([030fed7](https://github.com/HuLaSpark/HuLa/commit/030fed7d60a6eb03dccb49e6f108b2b5d67161e4))
|
||||
|
||||
|
||||
### ⚡️ Performance Improvements | 性能优化
|
||||
|
||||
* **global:** :zap: 增加ws健康检查兜底刷新最新消息内容、网络断线恢复重连 ([f734dca](https://github.com/HuLaSpark/HuLa/commit/f734dca910b17e3dd8a4d8e5e58cae3e7caaa333))
|
||||
|
||||
## [2.6.11](https://github.com/HuLaSpark/HuLa/compare/v2.6.10...v2.6.11) (2025-05-18)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **component:** webSocket的计时器调整为worker计时器
|
||||
|
||||
### ✨ Features | 新功能
|
||||
|
||||
* **view:** :sparkles: 新增重置密码功能 ([b45cfd2](https://github.com/HuLaSpark/HuLa/commit/b45cfd22120c9fe46fead1fcb9daf5cc7b25f423))
|
||||
* **view:** :sparkles: 增加修订版本更新检测,修复每次版本变动都更新的bug ([#271](https://github.com/HuLaSpark/HuLa/issues/271)) ([833d09e](https://github.com/HuLaSpark/HuLa/commit/833d09efe4e218d483c37a87cb1bdd39443f46c7))
|
||||
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
||||
* **component:** :bug: 点击头像弹出个人信息面板 ([#273](https://github.com/HuLaSpark/HuLa/issues/273)) ([eaa4288](https://github.com/HuLaSpark/HuLa/commit/eaa42885c33a03d84cc2999c6a77a1eb4d5baf0a))
|
||||
* **component:** :bug: 修复回复消息表情不展示问题 ([f33f41d](https://github.com/HuLaSpark/HuLa/commit/f33f41d41f0f60fb5ab9e0cff6305b0cef548eea))
|
||||
* **component:** :bug: 修复图片截图功能文件大小问题 ([f816314](https://github.com/HuLaSpark/HuLa/commit/f816314115a02e10241f299536db9e54854a510f))
|
||||
* **component:** :bug: 修复因公告宽度导致聊天框布局混乱问题 ([2753e89](https://github.com/HuLaSpark/HuLa/commit/2753e89dd52f7a4a66eca3ffe5e8189bdc266170))
|
||||
* **component:** :bug: 修复mac下更新提示窗口可以调整大小、拖动、标题栏显示问题 ([c761486](https://github.com/HuLaSpark/HuLa/commit/c76148687cd86b2f56d34525bc3d56b859d74a13))
|
||||
* **component:** :bug: 优化windows上群聊的展示时机和样式 ([92dba12](https://github.com/HuLaSpark/HuLa/commit/92dba1218ffc113e9ea492c1ead20732c40bce32))
|
||||
* **ios:** :bug: 修复ios init导致无法启动问题 ([3ef1666](https://github.com/HuLaSpark/HuLa/commit/3ef1666ef7eadae9990fbeed357b5c1ccc085c12))
|
||||
* **notify:** :bug: 修复免打扰时还会触发托盘图标闪烁(windows) ([02ef835](https://github.com/HuLaSpark/HuLa/commit/02ef83585549851836b11dc1e58e7f47e5a06754))
|
||||
* **view:** :bug: 修复系统托盘闪烁和提示菜单内容不显示问题 ([4954b1c](https://github.com/HuLaSpark/HuLa/commit/4954b1cc241ed0275619d7c3b7db2b7ead7e680e))
|
||||
* **view:** :bug: 修复系统托盘信息提示菜单内容展示问题和点击跳转问题 ([2c8b15c](https://github.com/HuLaSpark/HuLa/commit/2c8b15cd3a971de02c50c682b2f3b8902ba52479))
|
||||
* **view:** :bug: 修复win下忘记密码页面背景颜色问题 ([bd825e0](https://github.com/HuLaSpark/HuLa/commit/bd825e0c32534be3cce4788de8b53d9c686c7464))
|
||||
|
||||
|
||||
### ⚡️ Performance Improvements | 性能优化
|
||||
|
||||
* **component:** :zap: 优化群聊成员和公告展示、以及完成搜索会话功能 ([a8bf8e0](https://github.com/HuLaSpark/HuLa/commit/a8bf8e00aba0ea0df35cc165ae0fc71aa333e511))
|
||||
* **component:** :zap: 优化消息回复表情功能 ([2081e99](https://github.com/HuLaSpark/HuLa/commit/2081e99d4ad45b8f13ebf57ae7f6b5cceb6f1dbc))
|
||||
* **component:** :zap: 优化emoji的样式和展示 ([f0aa001](https://github.com/HuLaSpark/HuLa/commit/f0aa0014a9d6a5ff32a537f4900a61ce340db6de))
|
||||
* **service:** :zap: 优化websocket可以在窗口隐藏后继续监听 ([884a53e](https://github.com/HuLaSpark/HuLa/commit/884a53e4484a1a0d0efbcb17f5761ddd80409461))
|
||||
* **view:** :zap: 优化在登录框下未提示更新、右下角窗口可拖动问题 ([777951b](https://github.com/HuLaSpark/HuLa/commit/777951bb8cff2383611a81e9aaaa4fc2c2e7f6a6))
|
||||
|
||||
## [2.6.10](https://github.com/HuLaSpark/HuLa/compare/v2.6.9...v2.6.10) (2025-05-05)
|
||||
|
||||
|
||||
### ✨ Features | 新功能
|
||||
|
||||
* **component:** :sparkles: 增加公告类型消息 ([f0b0656](https://github.com/HuLaSpark/HuLa/commit/f0b0656ddc874a597a49de2e4f8666913730e759))
|
||||
* **view:** :sparkles: 新增发布群公告功能 ([#259](https://github.com/HuLaSpark/HuLa/issues/259)) ([87fc30d](https://github.com/HuLaSpark/HuLa/commit/87fc30d170996022379b45d9b94110edbe1c5c74))
|
||||
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
||||
* **chat:** 隔离聊天窗口内部数据 ([#258](https://github.com/HuLaSpark/HuLa/issues/258)) ([635f729](https://github.com/HuLaSpark/HuLa/commit/635f72996b8e03e1c00bc20fe9ad870ae8d303f4))
|
||||
* **component:** :bug: 修复表情包圆角样式 ([e5e1725](https://github.com/HuLaSpark/HuLa/commit/e5e1725d42b41c2bc518e5f4c91cbdbb5f2a3421))
|
||||
* **component:** :bug: 修复公告排序问题、公告加载更多重复数据问题 ([8d21d22](https://github.com/HuLaSpark/HuLa/commit/8d21d2228a6f743faa1aa4bf635d9fe8d41efd1f))
|
||||
* **component:** :bug: 修复链接卡片无法点击后默认浏览器打开的问题 ([296a944](https://github.com/HuLaSpark/HuLa/commit/296a944c9f0312548e668ae1a6b831d821b502d2))
|
||||
* **component:** :bug: 修复全选意外选中全部内容的问题 ([6616a93](https://github.com/HuLaSpark/HuLa/commit/6616a932c57a7189d1540575332471d03684f49b))
|
||||
* **component:** :bug: 修改群聊中群消息设置逻辑 ([62460fb](https://github.com/HuLaSpark/HuLa/commit/62460fbfe04802764d5a4d60430d587ecbee528d))
|
||||
* **component:** :bug: 修改url文本解析样式 ([0d5455c](https://github.com/HuLaSpark/HuLa/commit/0d5455c9c590406878c572b667dbf8d21ae7a5b1))
|
||||
* **readme:** :bug: 修改readme中的描述 ([91feb14](https://github.com/HuLaSpark/HuLa/commit/91feb14ff4fa77c6bb11aeddd90863cd197fec78))
|
||||
|
||||
|
||||
### ⚡️ Performance Improvements | 性能优化
|
||||
|
||||
* **component:** :zap: 优化消息点赞和不满功能 ([4d17127](https://github.com/HuLaSpark/HuLa/commit/4d171273e9ba4f6e584206720eeae636d72626e6))
|
||||
|
||||
## [2.6.9](https://github.com/HuLaSpark/HuLa/compare/v2.6.8...v2.6.9) (2025-04-20)
|
||||
|
||||
|
||||
### ✨ Features | 新功能
|
||||
|
||||
* 回复可以回复表情包、图片 ([#251](https://github.com/HuLaSpark/HuLa/issues/251)) ([4180906](https://github.com/HuLaSpark/HuLa/commit/418090604a08a189ae94d487f762406a3bc853ab))
|
||||
* **hooks:** 优化消息类型判断逻辑 ([#249](https://github.com/HuLaSpark/HuLa/issues/249)) ([82c3fd5](https://github.com/HuLaSpark/HuLa/commit/82c3fd529c96153a198f1425d02751173761de0b))
|
||||
* **view:** :sparkles: 新增中版本强制更新功能 ([#252](https://github.com/HuLaSpark/HuLa/issues/252)) ([edbd3de](https://github.com/HuLaSpark/HuLa/commit/edbd3defccdfe0d1b6163e82193316f3044217db)), closes [#183](https://github.com/HuLaSpark/HuLa/issues/183) [#183](https://github.com/HuLaSpark/HuLa/issues/183) [#183](https://github.com/HuLaSpark/HuLa/issues/183)
|
||||
* **view:** :sparkles: 新增子窗口创建方式和邀请加群功能 ([b2a15ca](https://github.com/HuLaSpark/HuLa/commit/b2a15ca5e219b32115702d06f937a396ddaf57c5))
|
||||
* **worker:** :sparkles: 代理实现 ([#232](https://github.com/HuLaSpark/HuLa/issues/232)) ([d4bf21d](https://github.com/HuLaSpark/HuLa/commit/d4bf21d464cc1faea22abcb5369daef6360cd1e0)), closes [#197](https://github.com/HuLaSpark/HuLa/issues/197)
|
||||
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
||||
* 修复回复框错位 BUG ([#256](https://github.com/HuLaSpark/HuLa/issues/256)) ([e46ee95](https://github.com/HuLaSpark/HuLa/commit/e46ee95bb872812101fb0938a6ffdf161a28308f)), closes [#253](https://github.com/HuLaSpark/HuLa/issues/253)
|
||||
* **common:** :bug: 修复回复表情包或者emoji的时候位置偏移 ([f9a2b18](https://github.com/HuLaSpark/HuLa/commit/f9a2b184735a718ea1063f0914837d0bef36367c))
|
||||
* **common:** :bug: 修复FloatBlockList组件悬浮层bug ([2b9a7ed](https://github.com/HuLaSpark/HuLa/commit/2b9a7edaef876aeea2a9c4605e136c413675a4f2))
|
||||
* **config:** :bug: 修复renovate配置问题 ([6b02f3f](https://github.com/HuLaSpark/HuLa/commit/6b02f3fc61f73bf65e594e9aa23aa610996be429))
|
||||
* **hook:** :bug: 修复回复时出现空格符和回复替换等问题 ([b8c3c4e](https://github.com/HuLaSpark/HuLa/commit/b8c3c4eec26212a584f3e368c7b4782b2c5e8f07))
|
||||
* **hook:** :bug: 修改mac下子窗口创建逻辑 ([7f8795c](https://github.com/HuLaSpark/HuLa/commit/7f8795c36a158359aaf82e491c927ddf5c80c8ee))
|
||||
* **hooks:** :bug: 修复一些xss的问题 ([bcce4a0](https://github.com/HuLaSpark/HuLa/commit/bcce4a01d4a0955d82dcbb82ec570435fa69a343))
|
||||
* **layout:** :bug: 回退增加系统通知功能 ([c7fbdd7](https://github.com/HuLaSpark/HuLa/commit/c7fbdd7a0290355a186732f2419ceddc20741e01))
|
||||
* **message:** 将消息内容解析为文本而不当做 HTML 处理 [#237](https://github.com/HuLaSpark/HuLa/issues/237) ([#246](https://github.com/HuLaSpark/HuLa/issues/246)) ([3441b8a](https://github.com/HuLaSpark/HuLa/commit/3441b8a28286c9e69f27338a6974ebd26eeb69bf))
|
||||
* **Plugins:** :bug: 修复插件卸载后,重新打开插件列表,状态依旧是安装状态问题 ([#247](https://github.com/HuLaSpark/HuLa/issues/247)) ([3cee949](https://github.com/HuLaSpark/HuLa/commit/3cee9498d79a0f2b00fd5ecbac87f3d260d4b449))
|
||||
* **Plugins:** :bug: 修复插件卸载后,重新打开插件列表,状态依旧是安装状态问题(list布局) ([#248](https://github.com/HuLaSpark/HuLa/issues/248)) ([9e4f31e](https://github.com/HuLaSpark/HuLa/commit/9e4f31ea526230a0ce0e1f8b48302c3dc5792eb8))
|
||||
* **view:** :bug: 修复会话中转义字符的问题 ([b793f71](https://github.com/HuLaSpark/HuLa/commit/b793f71f26507a4e9b6402dd8a3dd3cfac75c5f8))
|
||||
|
||||
|
||||
### ⚡️ Performance Improvements | 性能优化
|
||||
|
||||
* **component:** :zap: 优化链接的展示和解析 ([74bf370](https://github.com/HuLaSpark/HuLa/commit/74bf3702c73b751c0e3165c357064136896d548f))
|
||||
* **component:** :zap: 优化屏蔽后的逻辑 ([2a5b9de](https://github.com/HuLaSpark/HuLa/commit/2a5b9de68b64ceacd535074aaf6284060d869918))
|
||||
* **component:** :zap: 优化群备注和群昵称(beta) ([fab231a](https://github.com/HuLaSpark/HuLa/commit/fab231a9166acac97d50426109e2e37364a2d794))
|
||||
* **rust:** :zap: 修改mac系统托盘的右键菜单 ([6dbfa49](https://github.com/HuLaSpark/HuLa/commit/6dbfa496b4c18581e5915890033c6ebdf65a6976))
|
||||
|
||||
## [2.6.8](https://github.com/HuLaSpark/HuLa/compare/v2.6.7...v2.6.8) (2025-03-26)
|
||||
|
||||
|
||||
|
||||
71
README.en.md
@@ -5,6 +5,11 @@
|
||||
<p align="center">An Instant Messaging System Built with Tauri, Vite 6, Vue 3, and TypeScript</p>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://hellogithub.com/repository/743b101346c54f6cb5c20eed2edbaa40" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=743b101346c54f6cb5c20eed2edbaa40&claim_uid=WsQaY6SlnL7qxG3&theme=neutral" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://deepwiki.com/HuLaSpark/HuLa"><img src="https://deepwiki.com/badge.svg" alt=""></a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa.svg?type=shield" alt=""></a>
|
||||
<a href="https://www.bestpractices.dev/zh-CN/projects/9692"><img src="https://bestpractices.coreinfrastructure.org/projects/9692/badge" alt="CI"></a>
|
||||
<img src="https://img.shields.io/badge/TypeScript-blue?logo=Typescript&style=flat&logoColor=fff">
|
||||
@@ -15,7 +20,6 @@
|
||||
<img src="https://img.shields.io/badge/UnoCss-efefef?logo=UnoCss&logoColor=606060">
|
||||
<img src="https://img.shields.io/badge/pnpm-909090?logo=pnpm&logoColor=FFC131">
|
||||
<img src="https://img.shields.io/badge/Sass-CC6699?logo=sass&logoColor=fff">
|
||||
<img src="https://img.shields.io/badge/Design-Naive-059669">
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
@@ -27,24 +31,38 @@
|
||||
WeChat: <img src="https://img.shields.io/badge/cy2439646234-07C160?logo=wechat&logoColor=fff">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
💻 Official Website:<a href="https://hulaspark.com">HuLaSpark</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
☕️ server:<a href="https://github.com/HulaSpark/HuLa-Server">github HuLa-Server</a> | <a href="https://gitee.com/HulaSpark/HuLa-Server">gitee HuLa-Server</a>
|
||||
</p>
|
||||
|
||||
<p align="center"><a href="README.zh-CN.md">中文</a> | English</p>
|
||||
|
||||
## Project Introduction
|
||||
## 🌐 Support platform
|
||||
|
||||
| Platform | Supported version |
|
||||
|------|---------|
|
||||
| Windows | Windows 10, Windows 11 |
|
||||
| macOS | macOS 10.5+ |
|
||||
| Linux | Ubuntu 22.0+ |
|
||||
| iOS/iPadOS | iOS 9.0+, iPadOS 9.0+ |
|
||||
| Android | Android 8.0+ |
|
||||
|
||||
## 📝 Project Introduction
|
||||
|
||||
HuLa is an instant messaging system developed with Tauri, Vite 6, Vue 3, and TypeScript. It leverages the cross-platform capabilities of Tauri and the reactive design of Vue 3, combined with TypeScript's type safety features and the fast build system of Vite 6, to provide users with an efficient, secure, and easy-to-use communication solution.
|
||||
|
||||
## Technology Stack
|
||||
## 🛠️ Technology Stack
|
||||
|
||||
- **Tauri**: Provides a lightweight, high-performance desktop application container, enabling the development of cross-platform desktop applications with a web technology stack. Tauri's design philosophy aims to minimize resource consumption while ensuring security.
|
||||
- **Vite 6**: A modern front-end build tool that uses native ES module import to offer a fast development server. At the same time, it provides robust support for production builds. Vite 6 is its latest version, bringing more optimizations and features.
|
||||
- **Vue 3**: A progressive JavaScript framework for building user interfaces. Its Composition API, improved TypeScript integration, and optimizations for mobile platforms make developing complex single-page applications simpler and more efficient.
|
||||
- **TypeScript**: A superset of JavaScript that adds a type system to the language. It enables catching more errors during development and provides better support from editors.
|
||||
|
||||
## Project PreView
|
||||
## 🖼️ Project PreView
|
||||
|
||||

|
||||
|
||||
@@ -74,6 +92,10 @@ HuLa is an instant messaging system developed with Tauri, Vite 6, Vue 3, and Typ
|
||||
<img src="preview/img_8.png" alt="img_8.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
<div style="padding: 28px; display: inline-block;">
|
||||
<img src="preview/img_9.png" alt="img_9.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
## ✨ Completed Features
|
||||
|
||||
| Feature Category | Feature Description | Status |
|
||||
@@ -88,14 +110,17 @@ HuLa is an instant messaging system developed with Tauri, Vite 6, Vue 3, and Typ
|
||||
| | Message Read Status | ✅ Completed |
|
||||
| | Emoji Function | ✅ Completed |
|
||||
| | Context Menu Based on Message Type | ✅ Completed |
|
||||
| | Support parsing links as preview cards | ✅ Completed |
|
||||
| | Message likes and dissatisfaction status | ✅ Completed |
|
||||
| 👥 **Contact & Group Management** | Friend Add/Remove | ✅ Completed |
|
||||
| | Friend Search | ✅ Completed |
|
||||
| | Group Creation and Management | ✅ Completed |
|
||||
| | Friend Online Status | ✅ Completed |
|
||||
| | Friend Badges | ✅ Completed |
|
||||
| | Friend & Group Notes | ✅ Completed |
|
||||
| | Group Announcements | ✅ Completed |
|
||||
| | Block, Blacklist, Do Not Disturb | ✅ Completed |
|
||||
| | Message by message merging and forwarding | 🚧 In Progress |
|
||||
| | Group Announcement | ✅ 已完成 |
|
||||
| | Group chat、individual chat notes, nicknames, etc | ✅ 已完成 |
|
||||
| 🎨 **UI Interface** | Modern Interface Design | ✅ Completed |
|
||||
| | Dark/Light Theme Support | ✅ Completed |
|
||||
| | Skin Theme Switching | ✅ Completed |
|
||||
@@ -104,17 +129,19 @@ HuLa is an instant messaging system developed with Tauri, Vite 6, Vue 3, and Typ
|
||||
| | Message Notifications | ✅ Completed |
|
||||
| | Image Viewer | ✅ Completed |
|
||||
| | Screenshot Function | 🚧 In Progress |
|
||||
| | Support automatic/forced updates | ✅ Completed |
|
||||
| | Customize update page | ✅ Completed |
|
||||
| 🌐 **Cross-platform Support** | Win10, Win11/macOS/Linux | ✅ Completed |
|
||||
| | iOS/Android Adaptation | 🚧 In Progress |
|
||||
| 🤖 **AI** | DeepSeek, ChatGPT, Claude, Qwen, Custom | 🚧 In Progress |
|
||||
|
||||
## Thanks to the following contributors!
|
||||
## 👏 Thanks to the following contributors!
|
||||
|
||||
<a href="https://github.com/HuLaSpark/HuLa/graphs/contributors">
|
||||
<img src="https://opencollective.com/HuLaSpark/contributors.svg?width=890" />
|
||||
</a>
|
||||
|
||||
## Installation and Running
|
||||
## 📥 Installation and Running
|
||||
|
||||
```bash
|
||||
# Clone the project
|
||||
@@ -142,20 +169,25 @@ Downloading the installation package on the web page will indicate that the inst
|
||||
#### 1. Open "System Settings" - "Security & Privacy", as shown in the figure, check the box: Allow apps downloaded from "Any Source" to run:
|
||||
|
||||
<div style="padding: 28px; display: inline-block;">
|
||||
<img src="preview/img_9.png" alt="img_9.png" style="border-radius: 8px; display: block;" />
|
||||
<img src="preview/img_10.png" alt="img_10.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
#### 2. If an error is reported, run the following command in the terminal to resolve the problem:
|
||||
|
||||
```bash
|
||||
## Execute before installation
|
||||
sudo xattr -rd com.apple.quarantine the Path To Install The Package/Download installation package name
|
||||
```
|
||||
```bash
|
||||
## If it has already been installed, proceed as follows
|
||||
sudo xattr -r -d com.apple.quarantine /Applications/apply name.app
|
||||
```
|
||||
|
||||
## SubmissionSpecification
|
||||
## 📋 SubmissionSpecification
|
||||
|
||||
use **pnpm run commit** to invoke the _git commit_ interaction and follow the prompts to complete the input and selection of information
|
||||
|
||||
## Disclaimer
|
||||
## ⚖️ Disclaimer
|
||||
|
||||
1. This project is provided as an open source project, and the developer does not provide any express or implied warranty of any kind as to the functionality, security, or suitability of the software to the extent permitted by law
|
||||
2. The User expressly understands and agrees that the use of the Software is entirely at the User's own risk and that the Software is provided on an "as is" and "as available" basis. The developer disclaims all warranties of any kind, whether express or implied, including, but not limited to, warranties of merchantability, fitness for a particular purpose, and non-infringement
|
||||
@@ -165,7 +197,7 @@ use **pnpm run commit** to invoke the _git commit_ interaction and follow the pr
|
||||
|
||||
**The final interpretation of this disclaimer belongs to the developer**
|
||||
|
||||
## Sponsor HuLa
|
||||
## 🎁 Sponsor HuLa
|
||||
If you think HuLa is helpful to you, welcome to sponsor HuLa. Your support is our motivation to keep moving forward.
|
||||
|
||||
<div style="display: flex;">
|
||||
@@ -175,24 +207,33 @@ If you think HuLa is helpful to you, welcome to sponsor HuLa. Your support is ou
|
||||
</div>
|
||||
|
||||
|
||||
## HuLa Community discussion groups
|
||||
## 💬 HuLa Community discussion groups
|
||||
<img src="preview/wx.png" width="260" height="300" alt="微信群二维码" style="border-radius: 12px;" />
|
||||
|
||||
## List of sponsors
|
||||
## 🙏 List of sponsors
|
||||
Thanks to the following sponsors for their support!
|
||||
|
||||
| Date | Sponsor | Sum | Platform |
|
||||
|------|--------|------|------|
|
||||
| 2025-04-25 | 上官俊斌 | ¥200 | 微信赞赏码 |
|
||||
| 2025-05-27 | 临安居士 | ¥188 | 微信赞赏码 |
|
||||
| 2025-04-20 | 姜兴(Simon) | ¥188 | 微信赞赏码 |
|
||||
| 2025-02-17 | 禾硕 | ¥168 | 支付宝赞赏 |
|
||||
| 2025-02-8 | Boom.... | ¥100 | 微信赞赏码 |
|
||||
| 2025-05-09 | 犹豫,就会败北。| ¥88.00 | 微信红包 |
|
||||
| 2025-04-01 | 墨 | ¥88.88 | 微信转账 |
|
||||
| 2025-02-8 | 邓伟 | ¥88 | 微信赞赏码 |
|
||||
| 2025-02-7 | dennis | ¥80 | gitee码云赞赏 |
|
||||
| 2025-05-15 | 孤鸿影 | ¥56 | 微信红包 |
|
||||
| 2025-02-6 | 小二 | ¥62 | 微信转账 |
|
||||
| 2025-06-03 | 洪流 | ¥20 | 微信赞赏码 |
|
||||
| 2025-05-27 | 刘启成 | ¥20 | 微信赞赏码 |
|
||||
| 2025-05-20 | 没有留名的赞助者 | ¥20 | 微信赞赏码 |
|
||||
|
||||
> Note: This list is manually updated. If you have sponsored but are not displayed in the list, please contact us by:
|
||||
1. Submit Issue on GitHub
|
||||
2. Send an email to: 2439646234@qq.com
|
||||
3. Contact via WeChat: cy2439646234
|
||||
|
||||
## License
|
||||
## 📄 License
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa?ref=badge_large)
|
||||
|
||||
72
README.md
@@ -5,6 +5,11 @@
|
||||
<p align="center">一款基于Tauri、Vite 6、Vue 3 和 TypeScript 构建的即时通讯系统</p>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://hellogithub.com/repository/743b101346c54f6cb5c20eed2edbaa40" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=743b101346c54f6cb5c20eed2edbaa40&claim_uid=WsQaY6SlnL7qxG3&theme=neutral" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://deepwiki.com/HuLaSpark/HuLa"><img src="https://deepwiki.com/badge.svg" alt=""></a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa?ref=badge_shield"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa.svg?type=shield" alt=""></a>
|
||||
<a href="https://www.bestpractices.dev/zh-CN/projects/9692"><img src="https://bestpractices.coreinfrastructure.org/projects/9692/badge" alt="CI"></a>
|
||||
<img src="https://img.shields.io/badge/TypeScript-blue?logo=Typescript&style=flat&logoColor=fff">
|
||||
@@ -15,7 +20,6 @@
|
||||
<img src="https://img.shields.io/badge/UnoCss-efefef?logo=UnoCss&logoColor=606060">
|
||||
<img src="https://img.shields.io/badge/pnpm-909090?logo=pnpm&logoColor=FFC131">
|
||||
<img src="https://img.shields.io/badge/Sass-CC6699?logo=sass&logoColor=fff">
|
||||
<img src="https://img.shields.io/badge/UI组件库-Naive-059669">
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
@@ -27,24 +31,38 @@
|
||||
微信: <img src="https://img.shields.io/badge/cy2439646234-07C160?logo=wechat&logoColor=fff">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
💻 官网:<a href="https://hulaspark.com">HuLaSpark</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
☕️ 服务端:<a href="https://github.com/HulaSpark/HuLa-Server">github HuLa-Server</a> | <a href="https://gitee.com/HulaSpark/HuLa-Server">gitee HuLa-Server</a>
|
||||
</p>
|
||||
|
||||
<p align="center"><a href="README.en.md">English</a> | 中文</p>
|
||||
|
||||
## 项目介绍
|
||||
## 🌐 支持平台
|
||||
|
||||
| 平台 | 支持版本 |
|
||||
|------|---------|
|
||||
| Windows | Windows 10, Windows 11 |
|
||||
| macOS | macOS 10.5+ |
|
||||
| Linux | Ubuntu 22.0+ |
|
||||
| iOS/iPadOS | iOS 9.0+, iPadOS 9.0+ |
|
||||
| Android | Android 8.0+ |
|
||||
|
||||
## 📝 项目介绍
|
||||
|
||||
HuLa 是一款基于 Tauri、Vite 6、Vue 3 和 TypeScript 构建的即时通讯系统。它利用了 Tauri 的跨平台能力和 Vue 3 的响应式设计,结合了 TypeScript 的类型安全特性和 Vite 6 的快速构建,为用户提供了一个高效、安全和易用的通讯解决方案。
|
||||
|
||||
## 技术栈
|
||||
## 🛠️ 技术栈
|
||||
|
||||
- **Tauri**: 为本项目提供了一款轻量级的、高性能的桌面应用容器,使得我们可以使用前端技术栈来开发跨平台的桌面应用。Tauri 的设计哲学是在保证安全性的前提下,尽可能减少资源占用。
|
||||
- **Vite 6**: Vite 是一个现代化的前端构建工具,它利用原生 ES 模块导入的能力来提供一个快速的开发服务器,与此同时,它也为生产环境打包提供了强大的支持。Vite 6 是其最新的版本,带来了更多的优化和特性。
|
||||
- **Vue 3**: Vue 3 是一个渐进式JavaScript框架,用于构建用户界面。它的组合式API、更好的TypeScript集成和对移动端的优化使得开发复杂的单页应用变得更加简单和高效。
|
||||
- **TypeScript**: TypeScript 是 JavaScript 的一个超集,它在 JavaScript 的基础上增加了类型系统。这让我们能够在开发过程中捕获更多的错误,并且提供更好的编辑器支持。
|
||||
|
||||
## 项目预览
|
||||
## 🖼️ 项目预览
|
||||
|
||||

|
||||
|
||||
@@ -74,6 +92,10 @@ HuLa 是一款基于 Tauri、Vite 6、Vue 3 和 TypeScript 构建的即时通讯
|
||||
<img src="preview/img_8.png" alt="img_8.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
<div style="padding: 28px; display: inline-block;">
|
||||
<img src="preview/img_9.png" alt="img_9.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
## ✨ 已完成功能
|
||||
|
||||
| 功能分类 | 功能描述 | 状态 |
|
||||
@@ -88,14 +110,17 @@ HuLa 是一款基于 Tauri、Vite 6、Vue 3 和 TypeScript 构建的即时通讯
|
||||
| | 消息已读状态 | ✅ 已完成 |
|
||||
| | 表情包功能 | ✅ 已完成 |
|
||||
| | 根据消息类型右键菜单 | ✅ 已完成 |
|
||||
| | 支持解析链接为预览卡片 | ✅ 已完成 |
|
||||
| | 消息点赞和不满状态 | ✅ 已完成 |
|
||||
| 👥 **联系人、群聊管理** | 好友添加与删除 | ✅ 已完成 |
|
||||
| | 好友搜索 | ✅ 已完成 |
|
||||
| | 群组创建与管理 | ✅ 已完成 |
|
||||
| | 好友在线状态 | ✅ 已完成 |
|
||||
| | 好友徽章 | ✅ 已完成 |
|
||||
| | 好友、群聊备注 | ✅ 已完成 |
|
||||
| | 群公告 | ✅ 已完成 |
|
||||
| | 屏蔽、拉黑、免打扰功能 | ✅ 已完成 |
|
||||
| | 消息逐条\合并转发 | 🚧 进行中 |
|
||||
| | 群公告 | ✅ 已完成 |
|
||||
| | 群聊、单聊备注、昵称等 | ✅ 已完成 |
|
||||
| 🎨 **UI界面** | 现代化界面设计 | ✅ 已完成 |
|
||||
| | 深色/浅色主题支持 | ✅ 已完成 |
|
||||
| | 皮肤主题切换 | ✅ 已完成 |
|
||||
@@ -105,17 +130,19 @@ HuLa 是一款基于 Tauri、Vite 6、Vue 3 和 TypeScript 构建的即时通讯
|
||||
| | 图片查看器 | ✅ 已完成 |
|
||||
| | 截图功能 | 🚧 进行中 |
|
||||
| | 文件上传(支持七牛云存储) | ✅ 已完成 |
|
||||
| | 支持自动、强制更新 | ✅ 已完成 |
|
||||
| | 自定义更新页面 | ✅ 已完成 |
|
||||
| 🌐 **跨平台支持** | win10、win11/macOS/linux | ✅ 已完成 |
|
||||
| | iOS/Android适配 | 🚧 进行中 |
|
||||
| 🤖 **AI** | deepseek、chatgpt、claude、qwen、自定义 | 🚧 进行中 |
|
||||
|
||||
## 感谢以下贡献者们!
|
||||
## 👏 感谢以下贡献者们!
|
||||
|
||||
<a href="https://github.com/HuLaSpark/HuLa/graphs/contributors">
|
||||
<img src="https://opencollective.com/HuLaSpark/contributors.svg?width=890" />
|
||||
</a>
|
||||
|
||||
## 安装与运行
|
||||
## 📥 安装与运行
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
@@ -143,20 +170,25 @@ pnpm run tauri:build
|
||||
#### 1. 打开 "系统设置" - "安全性与隐私",如图勾选:允许 "任何来源" 下载的 App 运行:
|
||||
|
||||
<div style="padding: 28px; display: inline-block;">
|
||||
<img src="preview/img_9.png" alt="img_9.png" style="border-radius: 8px; display: block;" />
|
||||
<img src="preview/img_10.png" alt="img_10.png" style="border-radius: 8px; display: block;" />
|
||||
</div>
|
||||
|
||||
#### 2. 如果还报错,请在终端执行以下命令解决:
|
||||
|
||||
```bash
|
||||
## 安装前执行
|
||||
sudo xattr -rd com.apple.quarantine 你的安装包路径/下载的安装包名称
|
||||
```
|
||||
```bash
|
||||
## 如果已经安装,则执行下面
|
||||
sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app
|
||||
```
|
||||
|
||||
## 提交规范
|
||||
## 📋 提交规范
|
||||
|
||||
执行 **pnpm run commit** 唤起 _git commit_ 交互,根据提示完成信息的输入和选择
|
||||
|
||||
## 免责声明
|
||||
## ⚖️ 免责声明
|
||||
|
||||
1. 本项目是作为一款开源项目提供的,开发者在法律允许的范围内不对软件的功能性、安全性或适用性提供任何形式的明示或暗示的保证
|
||||
2. 用户明确理解并同意,使用本软件的风险完全由用户自己承担,软件以"现状"和"现有"基础提供。开发者不提供任何形式的担保,无论是明示还是暗示的,包括但不限于适销性、特定用途的适用性和非侵权的担保
|
||||
@@ -166,7 +198,7 @@ sudo xattr -rd com.apple.quarantine 你的安装包路径/下载的安装包名
|
||||
|
||||
**本免责声明的最终解释权归开发者所有**
|
||||
|
||||
## 赞助HuLa
|
||||
## 🎁 赞助HuLa
|
||||
如果您觉得HuLa对您有帮助,欢迎赞助HuLa,您的支持是我们不断前进的动力
|
||||
|
||||
<div style="display: flex;">
|
||||
@@ -175,25 +207,33 @@ sudo xattr -rd com.apple.quarantine 你的安装包路径/下载的安装包名
|
||||
<img src="preview/zfb.png" width="260" height="280" alt="赞助码" style="border-radius: 12px; margin-left: 40px" />
|
||||
</div>
|
||||
|
||||
|
||||
## HuLa社区讨论群
|
||||
## 💬 HuLa社区讨论群
|
||||
<img src="preview/wx.png" width="260" height="300" alt="微信群二维码" style="border-radius: 12px;" />
|
||||
|
||||
## 赞助者名单
|
||||
## 🙏 赞助者名单
|
||||
感谢以下赞助者的支持!
|
||||
|
||||
| 日期 | 赞助者 | 金额 | 平台 |
|
||||
|------|--------|------|------|
|
||||
| 2025-04-25 | 上官俊斌 | ¥200 | 微信赞赏码 |
|
||||
| 2025-05-27 | 临安居士 | ¥188 | 微信赞赏码 |
|
||||
| 2025-04-20 | 姜兴(Simon) | ¥188 | 微信赞赏码 |
|
||||
| 2025-02-17 | 禾硕 | ¥168 | 支付宝赞赏 |
|
||||
| 2025-02-8 | Boom.... | ¥100 | 微信赞赏码 |
|
||||
| 2025-05-09 | 犹豫,就会败北。| ¥88.00 | 微信红包 |
|
||||
| 2025-04-01 | 墨 | ¥88.88 | 微信转账 |
|
||||
| 2025-02-8 | 邓伟 | ¥88 | 微信赞赏码 |
|
||||
| 2025-02-7 | dennis | ¥80 | gitee码云赞赏 |
|
||||
| 2025-05-15 | 孤鸿影 | ¥56 | 微信红包 |
|
||||
| 2025-02-6 | 小二 | ¥62 | 微信转账 |
|
||||
| 2025-06-03 | 洪流 | ¥20 | 微信赞赏码 |
|
||||
| 2025-05-27 | 刘启成 | ¥20 | 微信赞赏码 |
|
||||
| 2025-05-20 | 没有留名的赞助者 | ¥20 | 微信赞赏码 |
|
||||
|
||||
> 注:该名单为手动更新。如果您已赞助但未显示在列表中,请通过以下方式联系我们:
|
||||
1. 在GitHub上提交Issue
|
||||
2. 发送邮件至: 2439646234@qq.com
|
||||
3. 通过微信联系: cy2439646234
|
||||
|
||||
## 许可证
|
||||
## 📄 许可证
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2FHuLaSpark%2FHuLa?ref=badge_large)
|
||||
|
||||
46
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hula",
|
||||
"type": "module",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18.x",
|
||||
@@ -35,7 +35,7 @@
|
||||
"========= 初始化 android =========": "",
|
||||
"tauri:android:init": "tauri android init",
|
||||
"========= 生成icon =========": "",
|
||||
"tauri:icon": "tauri icon hula.png",
|
||||
"tauri:icon": "tauri icon public/logo.png",
|
||||
"========= 安装依赖前执行 =========": "",
|
||||
"preinstall": "npx only-allow pnpm && node scripts/check-all.js",
|
||||
"========= 使用commit来进行代码提交 =========": "",
|
||||
@@ -58,22 +58,24 @@
|
||||
"dependencies": {
|
||||
"@actions/github": "^6.0.0",
|
||||
"@fingerprintjs/fingerprintjs": "^4.6.0",
|
||||
"@tauri-apps/api": "2.4.0",
|
||||
"@tauri-apps/plugin-autostart": "2.2.0",
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@tauri-apps/api": "2.5.0",
|
||||
"@tauri-apps/plugin-autostart": "2.3.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.2.2",
|
||||
"@tauri-apps/plugin-dialog": "^2.2.0",
|
||||
"@tauri-apps/plugin-fs": "~2.2.0",
|
||||
"@tauri-apps/plugin-http": "2.4.2",
|
||||
"@tauri-apps/plugin-dialog": "^2.2.1",
|
||||
"@tauri-apps/plugin-fs": "^2.2.1",
|
||||
"@tauri-apps/plugin-http": "2.4.3",
|
||||
"@tauri-apps/plugin-notification": "^2.2.2",
|
||||
"@tauri-apps/plugin-os": "2.2.0",
|
||||
"@tauri-apps/plugin-process": "2.2.0",
|
||||
"@tauri-apps/plugin-shell": "^2.2.0",
|
||||
"@tauri-apps/plugin-os": "2.2.1",
|
||||
"@tauri-apps/plugin-process": "2.2.1",
|
||||
"@tauri-apps/plugin-shell": "^2.2.1",
|
||||
"@tauri-apps/plugin-sql": "^2.2.0",
|
||||
"@tauri-apps/plugin-updater": "2.6.1",
|
||||
"@tauri-apps/plugin-updater": "2.7.1",
|
||||
"colorthief": "^2.6.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.11",
|
||||
"dompurify": "^3.2.4",
|
||||
"event-source-polyfill": "^1.0.31",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"hula-emojis": "^1.2.11",
|
||||
"lodash-es": "^4.17.21",
|
||||
@@ -82,7 +84,7 @@
|
||||
"pinia": "^3.0.1",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"pinia-shared-state": "^1.0.1",
|
||||
"vite-plugin-vue-devtools": "^7.7.2",
|
||||
"seemly": "^0.3.10",
|
||||
"vue": "^3.5.13",
|
||||
"vue-cropper": "1.1.4",
|
||||
"vue-draggable-plus": "^0.6.0",
|
||||
@@ -95,23 +97,24 @@
|
||||
"@release-it/bumper": "^6.0.1",
|
||||
"@release-it/conventional-changelog": "8.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@tauri-apps/cli": "2.4.0",
|
||||
"@tauri-apps/cli": "2.5.0",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/event-source-polyfill": "^1.0.5",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.10.7",
|
||||
"@typescript-eslint/eslint-plugin": "7.1.0",
|
||||
"@typescript-eslint/parser": "^7.15.0",
|
||||
"@unocss/preset-uno": "66.0.0",
|
||||
"@unocss/reset": "^66.0.0",
|
||||
"@unocss/transformer-directives": "^66.0.0",
|
||||
"@unocss/transformer-variant-group": "^66.0.0",
|
||||
"@unocss/vite": "^66.0.0",
|
||||
"@unocss/preset-wind3": "^66.1.1",
|
||||
"@unocss/reset": "^66.1.1",
|
||||
"@unocss/transformer-directives": "^66.1.1",
|
||||
"@unocss/transformer-variant-group": "^66.1.1",
|
||||
"@unocss/vite": "^66.1.1",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vitest/coverage-v8": "^3.0.5",
|
||||
"@vitest/ui": "^3.0.5",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vueuse/core": "^13.2.0",
|
||||
"chalk": "^5.3.0",
|
||||
"commitizen": "^4.3.1",
|
||||
"cz-git": "^1.11.0",
|
||||
@@ -127,11 +130,10 @@
|
||||
"prettier": "^3.3.2",
|
||||
"release-it": "^17.11.0",
|
||||
"sass": "1.83.0",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript": "^5.8.3",
|
||||
"unplugin-auto-import": "^19.1.1",
|
||||
"unplugin-vue-components": "^28.4.1",
|
||||
"vite": "6.2.3",
|
||||
"vite-plugin-vue-devtools": "^7.7.2",
|
||||
"vite": "6.3.4",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vitest": "^3.0.5",
|
||||
"vue-tsc": "^2.2.0"
|
||||
|
||||
1529
pnpm-lock.yaml
generated
BIN
preview/img_10.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 615 KiB After Width: | Height: | Size: 490 KiB |
|
Before Width: | Height: | Size: 1000 KiB After Width: | Height: | Size: 633 KiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 492 KiB |
|
Before Width: | Height: | Size: 477 KiB After Width: | Height: | Size: 358 KiB |
|
Before Width: | Height: | Size: 289 KiB After Width: | Height: | Size: 477 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 289 KiB |
BIN
preview/wx.png
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 210 KiB |
BIN
public/msgAction/bomb.png
Normal file
|
After Width: | Height: | Size: 736 KiB |
BIN
public/msgAction/clapping.png
Normal file
|
After Width: | Height: | Size: 483 KiB |
BIN
public/msgAction/enraged-face.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/msgAction/exploding-head.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/msgAction/face-with-tears-of-joy.png
Normal file
|
After Width: | Height: | Size: 728 KiB |
BIN
public/msgAction/flashlight.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
public/msgAction/heart-on-fire.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/msgAction/like.png
Normal file
|
After Width: | Height: | Size: 762 KiB |
BIN
public/msgAction/pocket-money.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/msgAction/rose.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/msgAction/slightly-frowning-face.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/msgAction/victory-hand.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
@@ -15,6 +15,10 @@
|
||||
"automerge": true
|
||||
},
|
||||
"rangeStrategy": "bump",
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"schedule": ["on sunday at 9:00am"]
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
@@ -25,13 +29,15 @@
|
||||
"groupName": "Tauri dependencies",
|
||||
"groupSlug": "tauri-deps",
|
||||
"matchPackagePatterns": ["^@tauri-apps/"],
|
||||
"matchManagers": ["npm"]
|
||||
"matchManagers": ["npm"],
|
||||
"rangeStrategy": "replace"
|
||||
},
|
||||
{
|
||||
"groupName": "UnoCSS dependencies",
|
||||
"groupSlug": "unocss-deps",
|
||||
"matchPackagePatterns": ["^@unocss/"],
|
||||
"matchManagers": ["npm"]
|
||||
"matchManagers": ["npm"],
|
||||
"rangeStrategy": "replace"
|
||||
},
|
||||
{
|
||||
"description": "Rust crate updates",
|
||||
@@ -39,7 +45,16 @@
|
||||
"groupName": "Rust dependencies",
|
||||
"groupSlug": "rust-deps",
|
||||
"enabled": true,
|
||||
"registryUrls": ["https://crates.io"]
|
||||
"registryUrls": ["https://crates.io"],
|
||||
"rangeStrategy": "replace"
|
||||
},
|
||||
{
|
||||
"matchUpdateTypes": ["patch", "digest", "pin"],
|
||||
"matchManagers": ["npm", "cargo"]
|
||||
},
|
||||
{
|
||||
"matchManagers": ["npm", "cargo"],
|
||||
"rangeStrategy": "replace"
|
||||
}
|
||||
],
|
||||
"enabledManagers": ["npm", "cargo"],
|
||||
|
||||
@@ -11,6 +11,11 @@ const INSTALL_GUIDES = {
|
||||
'WebView2 Runtime': 'https://developer.microsoft.com/microsoft-edge/webview2/'
|
||||
}
|
||||
|
||||
// 更新指南
|
||||
const UPDATE_GUIDES = {
|
||||
Rust: '请运行 `rustup update` 命令更新 Rust 版本'
|
||||
}
|
||||
|
||||
// Windows 特定的检查路径
|
||||
const WINDOWS_PATHS = {
|
||||
'WebView2 Runtime': [
|
||||
@@ -46,7 +51,7 @@ const checks = [
|
||||
name: 'Rust',
|
||||
command: 'rustc --version',
|
||||
versionExtractor: (output) => output.split(' ')[1],
|
||||
minVersion: '1.78.0',
|
||||
minVersion: '1.86.0',
|
||||
isRequired: true
|
||||
}
|
||||
]
|
||||
@@ -119,6 +124,12 @@ function checkDependency(check) {
|
||||
console.log(chalk.yellow(`⚠️ ${check.name} 版本过低`))
|
||||
console.log(chalk.yellow(` 当前版本: ${output}`))
|
||||
console.log(chalk.yellow(` 需要版本: >=${check.minVersion}`))
|
||||
|
||||
// 对 Rust 进行特殊处理,提示使用 rustup update
|
||||
if (check.name === 'Rust') {
|
||||
console.log(chalk.yellow(` ${UPDATE_GUIDES[check.name]}`))
|
||||
}
|
||||
|
||||
console.log(chalk.gray(` 👉 升级指南: ${INSTALL_GUIDES[check.name]}`))
|
||||
return false
|
||||
}
|
||||
|
||||
1649
src-tauri/Cargo.lock
generated
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "hula"
|
||||
version = "2.6.8"
|
||||
version = "2.6.10"
|
||||
description = "hula"
|
||||
authors = ["nongyehong"]
|
||||
license = ""
|
||||
repository = ""
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[profile.release]
|
||||
panic = "abort" # 去掉昂贵的恐慌清理逻辑
|
||||
@@ -24,31 +24,38 @@ name = "hula_app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.1.0", features = [] }
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.4.0", features = [
|
||||
tauri = { version = "2.5.1", features = [
|
||||
"macos-private-api",
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
"rustls-tls",
|
||||
] }
|
||||
tauri-plugin-os = "2.2.1"
|
||||
tauri-plugin-shell = "2.0.1"
|
||||
tauri-plugin-shell = "2.2.1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tauri-plugin-http = { version = "2.4.2", features = ["unsafe-headers"] }
|
||||
tauri-plugin-process = "2.2.0"
|
||||
tauri-plugin-fs = "2.0.1"
|
||||
tauri-plugin-dialog = "2.2.0"
|
||||
tauri-plugin-http = { version = "2.4.3", features = [
|
||||
"unsafe-headers",
|
||||
"rustls-tls",
|
||||
] }
|
||||
tauri-plugin-process = "2.2.1"
|
||||
tauri-plugin-fs = "2.2.1"
|
||||
tauri-plugin-dialog = "2.2.1"
|
||||
tauri-plugin-upload = "2.2.0"
|
||||
tauri-plugin-global-shortcut = "2.2.0"
|
||||
tauri-plugin-clipboard-manager = "2.2.2"
|
||||
tauri-plugin-updater = "2.6.1"
|
||||
tauri-plugin-sql = { version = "2", features = ["sqlite"] }
|
||||
tauri-plugin-single-instance = "2.2.2"
|
||||
tauri-plugin-updater = "2.7.1"
|
||||
tauri-plugin-sql = { version = "2.2.0", features = ["sqlite"] }
|
||||
tauri-plugin-single-instance = "2.2.3"
|
||||
tauri-plugin-notification = "2.2.2"
|
||||
tungstenite = { version = "0.26.2", features = ["rustls-tls-webpki-roots"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-autostart = "2.2.0"
|
||||
tauri-plugin-autostart = "2.3.0"
|
||||
lazy_static = "1.4"
|
||||
screenshots = "0.5.4"
|
||||
base64 = "0.22.1"
|
||||
@@ -56,9 +63,14 @@ rodio = "0.17.3"
|
||||
reqwest = { version = "0.11", features = [
|
||||
"json",
|
||||
"socks",
|
||||
"native-tls-vendored",
|
||||
"rustls-tls",
|
||||
"blocking",
|
||||
] }
|
||||
|
||||
surge-ping = "0.8.0"
|
||||
rand = "0.8.5"
|
||||
[target."cfg(target_os =\"macos\")".dependencies]
|
||||
cocoa = "0.26.0"
|
||||
objc = "0.2.7"
|
||||
|
||||
[features]
|
||||
# by default Tauri runs in production mode
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
use std::{env, fs, io};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
ensure_frontend_dist()?;
|
||||
tauri_build::build();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn ensure_frontend_dist() -> Result<(), Box<dyn std::error::Error>> {
|
||||
fn ensure_frontend_dist() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let current_dir = env::current_dir()?;
|
||||
let parent_dir = current_dir
|
||||
.parent()
|
||||
.ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Cannot find parent directory!"))?;
|
||||
let frontend_dist = parent_dir.join("dist");
|
||||
|
||||
|
||||
// There should not be this directory.
|
||||
let exists = frontend_dist.exists() && frontend_dist.is_dir();
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
"core:window:allow-set-min-size",
|
||||
"core:window:allow-unmaximize",
|
||||
"core:window:allow-set-fullscreen",
|
||||
"core:window:allow-request-user-attention",
|
||||
"core:window:allow-set-enabled",
|
||||
"core:webview:allow-create-webview",
|
||||
"core:webview:allow-create-webview-window",
|
||||
"core:webview:allow-internal-toggle-devtools",
|
||||
@@ -60,8 +62,12 @@
|
||||
"autostart:allow-enable",
|
||||
"autostart:allow-disable",
|
||||
"autostart:allow-is-enabled",
|
||||
"dialog:default",
|
||||
"dialog:allow-open",
|
||||
"dialog:allow-confirm",
|
||||
"dialog:allow-save",
|
||||
"dialog:allow-ask",
|
||||
"dialog:allow-message",
|
||||
"core:resources:allow-close",
|
||||
"sql:allow-load",
|
||||
"sql:allow-execute",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"identifier": "desktop-capability",
|
||||
"platforms": ["macOS", "windows", "linux"],
|
||||
"windows": ["home"],
|
||||
"windows": ["home", "login", "update", "checkupdate"],
|
||||
"permissions": ["updater:default", "updater:allow-check", "updater:allow-download", "updater:allow-install"]
|
||||
}
|
||||
|
||||
23
src-tauri/copyright/License.rtf
Normal file
@@ -0,0 +1,23 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2822
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww12720\viewh7800\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 \uc0\u29256 \u26435 \u25152 \u26377 (C) 2024 HuLaSpark\u24320 \u28304 \u32452 \u32455 \u20445 \u30041 \u25152 \u26377 \u26435 \u21033 \u12290 \
|
||||
\
|
||||
\uc0\u26412 \u36719 \u20214 \u24320 \u28304 \u21327 \u35758 \u20026 Apache License 2.0\u65292 \u35831 \u36981 \u23432 \u20197 \u19979 \u26465 \u27454 \u65306 \
|
||||
\
|
||||
1.\uc0\u20445 \u30041 \u29256 \u26435 \u21644 \u35768 \u21487 \u36890 \u30693 \u65306 \u20320 \u24517 \u39035 \u20445 \u30041 \u21407 \u22987 \u36719 \u20214 \u20013 \u30340 \u29256 \u26435 \u12289 \u35768 \u21487 \u21644 \u19987 \u21033 \u36890 \u30693 \u12290 \
|
||||
\
|
||||
2.\uc0\u26174 \u31034 \u20462 \u25913 \u65306 \u22914 \u26524 \u20320 \u20462 \u25913 \u20102 \u36719 \u20214 \u65292 \u20320 \u24517 \u39035 \u22312 \u20462 \u25913 \u36807 \u30340 \u25991 \u20214 \u20013 \u21253 \u21547 \u26174 \u30524 \u30340 \u36890 \u30693 \u65292 \u35828 \u26126 \u20320 \u36827 \u34892 \u20102 \u20462 \u25913 \u12290 \
|
||||
\
|
||||
3.\uc0\u20998 \u21457 \u35768 \u21487 \u21103 \u26412 \u65306 \u20320 \u24517 \u39035 \u38543 \u21516 \u36719 \u20214 \u20998 \u21457 \u19968 \u20221 Apache-2.0\u35768 \u21487 \u35777 \u30340 \u21103 \u26412 \u12290 \
|
||||
\
|
||||
4.\uc0\u19981 \u20462 \u25913 \u35768 \u21487 \u65306 \u20320 \u19981 \u33021 \u20197 \u20219 \u20309 \u26041 \u24335 \u20462 \u25913 Apache-2.0\u35768 \u21487 \u30340 \u26465 \u27454 \u12290 \
|
||||
\
|
||||
5.\uc0\u19981 \u28389 \u29992 \u21830 \u26631 \u65306 \u20320 \u19981 \u33021 \u20351 \u29992 Apache\u25110 \u36129 \u29486 \u32773 \u30340 \u21830 \u26631 \u26469 \u26263 \u31034 \u20182 \u20204 \u23545 \u20320 \u30340 \u20316 \u21697 \u30340 \u35748 \u21487 \u12290 \
|
||||
\
|
||||
\uc0\u26412 \u36719 \u20214 \u36981 \u24490 \u30456 \u20851 \u27861 \u24459 \u27861 \u35268 \u65292 \u22914 \u12298 \u20013 \u21326 \u20154 \u27665 \u20849 \u21644 \u22269 \u36719 \u20214 \u33879 \u20316 \u26435 \u27861 \u12299 \u31561 \u12290 \u22312 \u20351 \u29992 \u26412 \u36719 \u20214 \u26102 \u65292 \u35831 \u30830 \u20445 \u24744 \u30340 \u34892 \u20026 \u31526 \u21512 \u30456 \u20851 \u27861 \u24459 \u27861 \u35268 \u30340 \u35201 \u27714 \u12290 \
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
版权所有 (C) 2024 HuLaSpark开源组织 保留所有权利。
|
||||
|
||||
本软件开源协议为 Apache License 2.0,请遵守以下条款:
|
||||
|
||||
1.保留版权和许可通知:你必须保留原始软件中的版权、许可和专利通知。
|
||||
|
||||
2.显示修改:如果你修改了软件,你必须在修改过的文件中包含显眼的通知,说明你进行了修改。
|
||||
|
||||
3.分发许可副本:你必须随同软件分发一份Apache-2.0许可证的副本。
|
||||
|
||||
4.不修改许可:你不能以任何方式修改Apache-2.0许可的条款。
|
||||
|
||||
5.不滥用商标:你不能使用Apache或贡献者的商标来暗示他们对你的作品的认可。
|
||||
|
||||
本软件遵循相关法律法规,如《中华人民共和国软件著作权法》等。在使用本软件时,请确保您的行为符合相关法律法规的要求。
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -13,15 +12,19 @@
|
||||
<objects>
|
||||
<viewController id="Y6W-OH-hqX" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
|
||||
<color key="backgroundColor" red="0.86274516580000005" green="0.92941176889999999" blue="0.89019608500000003" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="55" y="-34"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 56;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -15,6 +15,7 @@
|
||||
5FA07CA316D84B7C6157AD98 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5561AC4EF6A7D22351F4123 /* Metal.framework */; };
|
||||
66C0485D21D30EE3FC68535D /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A3F90CF52FE87749F6AF66 /* WebKit.framework */; };
|
||||
725ABB36A3E4DBADE9B85F1A /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BEB6A0287B0C05B54BB18D76 /* main.mm */; };
|
||||
7D80EF45A161A8ABCDF65B0F /* libapp.a in Resources */ = {isa = PBXBuildFile; fileRef = 2D7169E7E23000C0AB794413 /* libapp.a */; };
|
||||
C6E3EE1EC5041769CD8C63BC /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F03346AEBB6EB6B6949B1F /* MetalKit.framework */; };
|
||||
DFD77F9BDCD981184134D70B /* assets in Resources */ = {isa = PBXBuildFile; fileRef = E0D58092E5EAD80CE1062F64 /* assets */; };
|
||||
E4594A304B63C1F809276D32 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0B6EF43A950A8BAEED368AF5 /* Assets.xcassets */; };
|
||||
@@ -23,26 +24,31 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0B6EF43A950A8BAEED368AF5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
110DEFD8FF5FFC1135313A3B /* proxy.rs */ = {isa = PBXFileReference; path = proxy.rs; sourceTree = "<group>"; };
|
||||
16A9640EAB3DEA1B09E9250C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
317000BD66F90B330ADFBA7A /* tray.rs */ = {isa = PBXFileReference; lastKnownFileType = file; path = tray.rs; sourceTree = "<group>"; };
|
||||
2D7169E7E23000C0AB794413 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
|
||||
3D76EB521B227E9303B16047 /* init.rs */ = {isa = PBXFileReference; path = init.rs; sourceTree = "<group>"; };
|
||||
41E146C31A7CB2949CC9D6E1 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
43A3F90CF52FE87749F6AF66 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
446C901E80ED5F4820629A70 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
51F03346AEBB6EB6B6949B1F /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
|
||||
533842E2E36421DDF8C72972 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
5822DACEC671151891D1FD54 /* init.rs */ = {isa = PBXFileReference; path = init.rs; sourceTree = "<group>"; };
|
||||
582937AEB5D7F35B81C5A220 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
|
||||
5E348B57006C5877940CA019 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
90272EF944FF306A026ACA41 /* lib.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = lib.rs; sourceTree = "<group>"; };
|
||||
658A253702F290FC4BBF60D5 /* mod.rs */ = {isa = PBXFileReference; path = mod.rs; sourceTree = "<group>"; };
|
||||
76DB59D3790398E1FDB32D5A /* mod.rs */ = {isa = PBXFileReference; path = mod.rs; sourceTree = "<group>"; };
|
||||
8EA08F12BCB04981BCB86BEF /* common_cmd.rs */ = {isa = PBXFileReference; path = common_cmd.rs; sourceTree = "<group>"; };
|
||||
90272EF944FF306A026ACA41 /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = "<group>"; };
|
||||
97A1062DE54C9659156E97DC /* tray.rs */ = {isa = PBXFileReference; path = tray.rs; sourceTree = "<group>"; };
|
||||
B95348A7F1567588F739A120 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
|
||||
BEB6A0287B0C05B54BB18D76 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
C06894DAF450154EAA9FAA93 /* HuLa.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HuLa.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C06894DAF450154EAA9FAA93 /* hula_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = hula_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C5561AC4EF6A7D22351F4123 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
CC42F5A4756761349699C7D3 /* main.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = main.rs; sourceTree = "<group>"; };
|
||||
CE695D0D6BBE86069F83CD25 /* common_cmd.rs */ = {isa = PBXFileReference; lastKnownFileType = file; path = common_cmd.rs; sourceTree = "<group>"; };
|
||||
CC42F5A4756761349699C7D3 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
|
||||
CFA870C7B772C580417E0CB8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
E0470560901F8DD6C9D04C90 /* hula_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = hula_iOS.entitlements; sourceTree = "<group>"; };
|
||||
E0D58092E5EAD80CE1062F64 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
|
||||
E878C5EA50634C92A1E3DB69 /* init.rs */ = {isa = PBXFileReference; lastKnownFileType = file; path = init.rs; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -79,19 +85,36 @@
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
224882C33A19C97EE2AA557B /* arm64 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
594433D89B9A33FD150BDE63 /* debug */,
|
||||
);
|
||||
path = arm64;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B17F5DA74559A9153C5BDAC /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE695D0D6BBE86069F83CD25 /* common_cmd.rs */,
|
||||
E878C5EA50634C92A1E3DB69 /* init.rs */,
|
||||
90272EF944FF306A026ACA41 /* lib.rs */,
|
||||
CC42F5A4756761349699C7D3 /* main.rs */,
|
||||
317000BD66F90B330ADFBA7A /* tray.rs */,
|
||||
110DEFD8FF5FFC1135313A3B /* proxy.rs */,
|
||||
83FB2DDC9D37A39E6B9D0420 /* desktops */,
|
||||
43D8AC0F02D5CCB0C7644274 /* mobiles */,
|
||||
);
|
||||
name = src;
|
||||
path = ../../src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
43D8AC0F02D5CCB0C7644274 /* mobiles */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5822DACEC671151891D1FD54 /* init.rs */,
|
||||
658A253702F290FC4BBF60D5 /* mod.rs */,
|
||||
);
|
||||
path = mobiles;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4927FA144B0F8AA1B601E34F /* bindings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -108,6 +131,25 @@
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
594433D89B9A33FD150BDE63 /* debug */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2D7169E7E23000C0AB794413 /* libapp.a */,
|
||||
);
|
||||
path = debug;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
83FB2DDC9D37A39E6B9D0420 /* desktops */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8EA08F12BCB04981BCB86BEF /* common_cmd.rs */,
|
||||
3D76EB521B227E9303B16047 /* init.rs */,
|
||||
76DB59D3790398E1FDB32D5A /* mod.rs */,
|
||||
97A1062DE54C9659156E97DC /* tray.rs */,
|
||||
);
|
||||
path = desktops;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9C5737242B5910584AEC182A /* hula_iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -135,6 +177,7 @@
|
||||
DE510D2C172B684A951787F8 /* Externals */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
224882C33A19C97EE2AA557B /* arm64 */,
|
||||
);
|
||||
path = Externals;
|
||||
sourceTree = "<group>";
|
||||
@@ -142,7 +185,7 @@
|
||||
EBB8EABBB9D585A2001DACE6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C06894DAF450154EAA9FAA93 /* HuLa.app */,
|
||||
C06894DAF450154EAA9FAA93 /* hula_iOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -156,6 +199,13 @@
|
||||
path = hula;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
"TEMP_18387214-B965-463B-86FD-5F350218C577" /* x86_64 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = x86_64;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -173,8 +223,10 @@
|
||||
dependencies = (
|
||||
);
|
||||
name = hula_iOS;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = hula_iOS;
|
||||
productReference = C06894DAF450154EAA9FAA93 /* HuLa.app */;
|
||||
productReference = C06894DAF450154EAA9FAA93 /* hula_iOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -185,6 +237,8 @@
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1430;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 06E19C25CF276AFE18C2087A /* Build configuration list for PBXProject "hula" */;
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
@@ -195,6 +249,8 @@
|
||||
en,
|
||||
);
|
||||
mainGroup = 19DDB0BC6EF26FCF935BDC63;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
preferredProjectObjectVersion = 54;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
@@ -211,6 +267,7 @@
|
||||
E4594A304B63C1F809276D32 /* Assets.xcassets in Resources */,
|
||||
575F491C7AFF552732B6BE45 /* LaunchScreen.storyboard in Resources */,
|
||||
DFD77F9BDCD981184134D70B /* assets in Resources */,
|
||||
7D80EF45A161A8ABCDF65B0F /* libapp.a in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -233,7 +290,6 @@
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
@@ -259,15 +315,12 @@
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
"arm64-sim",
|
||||
);
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = hula_iOS/hula_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = A9KV47CC3V;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
@@ -277,32 +330,13 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.hula-app.app;
|
||||
PRODUCT_NAME = HuLa;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = "arm64 arm64-sim";
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
name = debug;
|
||||
};
|
||||
@@ -312,15 +346,12 @@
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
"arm64-sim",
|
||||
);
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = hula_iOS/hula_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = A9KV47CC3V;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
@@ -330,32 +361,13 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.hula-app.app;
|
||||
PRODUCT_NAME = HuLa;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = "arm64 arm64-sim";
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
name = release;
|
||||
};
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.6.0</string>
|
||||
<string>2.6.10</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.6.0</string>
|
||||
<string>2.6.10</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: hula
|
||||
options:
|
||||
bundleIdPrefix: com.hula.app
|
||||
bundleIdPrefix: com.hula-app.app
|
||||
deploymentTarget:
|
||||
iOS: 13.0
|
||||
fileGroups: [../../src]
|
||||
@@ -11,7 +11,7 @@ settingGroups:
|
||||
app:
|
||||
base:
|
||||
PRODUCT_NAME: HuLa
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.hula.app
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.hula-app.app
|
||||
targetTemplates:
|
||||
app:
|
||||
type: application
|
||||
@@ -51,8 +51,8 @@ targets:
|
||||
- UIInterfaceOrientationPortraitUpsideDown
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
- UIInterfaceOrientationLandscapeRight
|
||||
CFBundleShortVersionString: 2.6.0
|
||||
CFBundleVersion: 2.6.0
|
||||
CFBundleShortVersionString: 2.6.10
|
||||
CFBundleVersion: 2.6.10
|
||||
entitlements:
|
||||
path: hula_iOS/hula_iOS.entitlements
|
||||
scheme:
|
||||
@@ -62,14 +62,12 @@ targets:
|
||||
settings:
|
||||
base:
|
||||
ENABLE_BITCODE: false
|
||||
ARCHS: [arm64, arm64-sim]
|
||||
VALID_ARCHS: arm64 arm64-sim
|
||||
ARCHS: [arm64]
|
||||
VALID_ARCHS: arm64
|
||||
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]: x86_64
|
||||
groups: [app]
|
||||
dependencies:
|
||||
- framework: libapp.a
|
||||
@@ -87,5 +85,4 @@ targets:
|
||||
basedOnDependencyAnalysis: false
|
||||
outputFiles:
|
||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||
@@ -1,4 +1,5 @@
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
#![allow(unexpected_cfgs)]
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
use lazy_static::lazy_static;
|
||||
use screenshots::Screen;
|
||||
use serde::Serialize;
|
||||
@@ -9,6 +10,11 @@ use std::time::Duration;
|
||||
use tauri::path::BaseDirectory;
|
||||
use tauri::{AppHandle, LogicalSize, Manager, ResourceId, Runtime, Webview};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use cocoa::appkit::{NSWindow, NSWindowButton};
|
||||
#[cfg(target_os = "macos")]
|
||||
use objc::runtime::Object;
|
||||
|
||||
// 定义用户信息结构体
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct UserInfo {
|
||||
@@ -119,6 +125,59 @@ pub fn set_badge_count(count: Option<i64>, handle: AppHandle) -> Result<(), Stri
|
||||
window.set_badge_count(count).map_err(|e| e.to_string())?;
|
||||
Ok(())
|
||||
}
|
||||
None => Err("No webview window found".to_string()),
|
||||
None => {
|
||||
// 如果找不到 home 窗口,直接返回成功,不抛出错误
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
unsafe fn hidden_standard_window_button(window: *mut Object, window_button_kind: NSWindowButton) {
|
||||
use cocoa::base::YES;
|
||||
use objc::{msg_send, sel, sel_impl};
|
||||
|
||||
let btn = unsafe { window.standardWindowButton_(window_button_kind) };
|
||||
if !btn.is_null() {
|
||||
let _: () = msg_send![btn, setHidden: YES];
|
||||
}
|
||||
}
|
||||
|
||||
/// 隐藏Mac窗口的标题栏按钮(红绿灯按钮)和标题
|
||||
///
|
||||
/// # 参数
|
||||
/// * `window_label` - 窗口的标签名称
|
||||
/// * `handle` - Tauri应用句柄
|
||||
///
|
||||
/// # 返回
|
||||
/// * `Result<(), String>` - 成功返回Ok(()), 失败返回错误信息
|
||||
#[tauri::command]
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn hide_title_bar_buttons(window_label: &str, handle: AppHandle) -> Result<(), String> {
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
use cocoa::appkit::NSWindowButton;
|
||||
use cocoa::base::NO;
|
||||
use cocoa::base::id;
|
||||
use objc::{msg_send, sel, sel_impl};
|
||||
|
||||
let ns_window = handle
|
||||
.get_webview_window(window_label)
|
||||
.unwrap()
|
||||
.ns_window()
|
||||
.unwrap() as id;
|
||||
|
||||
unsafe {
|
||||
// 隐藏标题栏按钮
|
||||
// hidden_standard_window_button(ns_window, NSWindowButton::NSWindowCloseButton);
|
||||
hidden_standard_window_button(ns_window, NSWindowButton::NSWindowFullScreenButton);
|
||||
hidden_standard_window_button(ns_window, NSWindowButton::NSWindowFullScreenButton);
|
||||
hidden_standard_window_button(ns_window, NSWindowButton::NSWindowMiniaturizeButton);
|
||||
hidden_standard_window_button(ns_window, NSWindowButton::NSWindowZoomButton);
|
||||
|
||||
// 设置窗口不可拖动
|
||||
let _: () = msg_send![ns_window, setMovable: NO];
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use tauri::{LogicalSize, Manager, Runtime, WindowEvent};
|
||||
use tauri::{Manager, Runtime, WindowEvent};
|
||||
use tauri_plugin_autostart::MacosLauncher;
|
||||
pub trait CustomInit {
|
||||
fn init_plugin(self) -> Self;
|
||||
@@ -52,6 +52,7 @@ impl<R: Runtime> CustomInit for tauri::Builder<R> {
|
||||
self.on_window_event(|window, event: &WindowEvent| match event {
|
||||
WindowEvent::Focused(flag) => {
|
||||
// 自定义系统托盘-实现托盘菜单失去焦点时隐藏
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
if !window.label().eq("tray") && *flag {
|
||||
window
|
||||
.app_handle()
|
||||
@@ -77,16 +78,7 @@ impl<R: Runtime> CustomInit for tauri::Builder<R> {
|
||||
window.hide().unwrap();
|
||||
}
|
||||
}
|
||||
WindowEvent::Resized(ps) => {
|
||||
if window.label().eq("home") {
|
||||
let ls = ps.to_logical(window.scale_factor().unwrap());
|
||||
// TODO 根据显示菜单模式不同,设定不同高度
|
||||
let h = 505;
|
||||
if ls.height < h {
|
||||
window.set_size(LogicalSize::new(ls.width, h)).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
WindowEvent::Resized(_ps) => {}
|
||||
_ => (),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pub mod common_cmd;
|
||||
pub mod init;
|
||||
pub mod tray;
|
||||
pub mod common_cmd;
|
||||
@@ -1,66 +1,131 @@
|
||||
#[cfg(target_os = "windows")]
|
||||
use tauri::{tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, Manager, Emitter, PhysicalPosition, Runtime};
|
||||
use tauri::{
|
||||
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
|
||||
Emitter, Manager, PhysicalPosition, Runtime,
|
||||
};
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use tauri::{tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, Manager, PhysicalPosition, Runtime};
|
||||
#[cfg(target_os = "macos")]
|
||||
use tauri::{
|
||||
menu::{MenuBuilder, MenuId, MenuItem, PredefinedMenuItem},
|
||||
tray::TrayIconBuilder,
|
||||
Manager, Runtime,
|
||||
};
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
|
||||
use tauri::{
|
||||
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
|
||||
Manager, PhysicalPosition, Runtime,
|
||||
};
|
||||
|
||||
pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
|
||||
let _ = TrayIconBuilder::with_id("tray")
|
||||
.tooltip("HuLa")
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.on_tray_icon_event(|tray, event| match event {
|
||||
TrayIconEvent::Click {
|
||||
id: _,
|
||||
position,
|
||||
rect: _,
|
||||
button,
|
||||
button_state,
|
||||
} => match button {
|
||||
MouseButton::Left => {
|
||||
let windows = tray.app_handle().webview_windows();
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
// 为 macOS 创建原生菜单
|
||||
let open_id = MenuId::new("open_home");
|
||||
let exit_id = MenuId::new("exit_app");
|
||||
|
||||
// 创建分隔符和菜单项
|
||||
let separator1 = PredefinedMenuItem::separator(app)?;
|
||||
let open_menu_item =
|
||||
MenuItem::with_id(app, open_id.clone(), "打开主面板", true, None::<&str>)?;
|
||||
let separator2 = PredefinedMenuItem::separator(app)?;
|
||||
let exit_menu_item = MenuItem::with_id(app, exit_id.clone(), "退出", true, None::<&str>)?;
|
||||
|
||||
// 构建菜单
|
||||
let tray_menu = MenuBuilder::new(app)
|
||||
.items(&[&separator1, &open_menu_item, &separator2, &exit_menu_item])
|
||||
.build()?;
|
||||
|
||||
let tray_handler = app.clone();
|
||||
let _ = TrayIconBuilder::with_id("tray")
|
||||
.tooltip("HuLa")
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.menu(&tray_menu)
|
||||
.on_menu_event(move |app, event| {
|
||||
let id = event.id();
|
||||
if id == &open_id {
|
||||
// 打开主面板
|
||||
let windows = app.webview_windows();
|
||||
for (name, window) in windows {
|
||||
if name == "login" || name == "home" {
|
||||
window.show().unwrap();
|
||||
window.unminimize().unwrap();
|
||||
window.set_focus().unwrap();
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if id == &exit_id {
|
||||
// 退出应用
|
||||
let _ = tray_handler.exit(0);
|
||||
}
|
||||
MouseButton::Right if MouseButtonState::Down == button_state => {
|
||||
// 状态栏图标按下右键时显示状态栏菜单
|
||||
let tray_window = tray.app_handle().get_webview_window("tray").unwrap();
|
||||
if let Ok(outer_size) = tray_window.outer_size() {
|
||||
tray_window
|
||||
.set_position(PhysicalPosition::new(
|
||||
position.x,
|
||||
position.y - outer_size.height as f64,
|
||||
))
|
||||
.unwrap();
|
||||
tray_window.set_always_on_top(true).unwrap();
|
||||
tray_window.show().unwrap();
|
||||
tray_window.set_focus().unwrap();
|
||||
})
|
||||
.build(app)?;
|
||||
}
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
{
|
||||
// 为其他系统(非 macOS)创建托盘图标
|
||||
let _ = TrayIconBuilder::with_id("tray")
|
||||
.tooltip("HuLa")
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.on_tray_icon_event(|tray, event| match event {
|
||||
TrayIconEvent::Click {
|
||||
id: _,
|
||||
position,
|
||||
rect: _,
|
||||
button,
|
||||
button_state,
|
||||
} => match button {
|
||||
MouseButton::Left => {
|
||||
let windows = tray.app_handle().webview_windows();
|
||||
for (name, window) in windows {
|
||||
if name == "login" || name == "home" {
|
||||
window.show().unwrap();
|
||||
window.unminimize().unwrap();
|
||||
window.set_focus().unwrap();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseButton::Right if MouseButtonState::Down == button_state => {
|
||||
// 状态栏图标按下右键时显示状态栏菜单
|
||||
let tray_window = tray.app_handle().get_webview_window("tray").unwrap();
|
||||
if let Ok(outer_size) = tray_window.outer_size() {
|
||||
tray_window
|
||||
.set_position(PhysicalPosition::new(
|
||||
position.x,
|
||||
position.y - outer_size.height as f64,
|
||||
))
|
||||
.unwrap();
|
||||
tray_window.set_always_on_top(true).unwrap();
|
||||
tray_window.show().unwrap();
|
||||
tray_window.set_focus().unwrap();
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
#[cfg(target_os = "windows")]
|
||||
TrayIconEvent::Enter {
|
||||
id: _,
|
||||
position: _,
|
||||
rect: _,
|
||||
} => {
|
||||
tray.app_handle()
|
||||
.emit_to("notify", "notify_enter", &tray.rect().unwrap())
|
||||
.unwrap();
|
||||
},
|
||||
#[cfg(target_os = "windows")]
|
||||
TrayIconEvent::Leave {
|
||||
id: _,
|
||||
position: _,
|
||||
rect: _,
|
||||
} => {
|
||||
tray.app_handle()
|
||||
.emit_to("notify", "notify_leave", ())
|
||||
.unwrap();
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
TrayIconEvent::Enter {
|
||||
id: _,
|
||||
position: _,
|
||||
rect: _} => {
|
||||
tray.app_handle().emit_to("notify", "notify_enter", &tray.rect().unwrap()).unwrap();
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
TrayIconEvent::Leave {
|
||||
id: _,
|
||||
position: _,
|
||||
rect: _} => {
|
||||
tray.app_handle().emit_to("notify", "notify_leave", ()).unwrap();
|
||||
}
|
||||
_ => {}
|
||||
|
||||
})
|
||||
.build(app);
|
||||
})
|
||||
.build(app);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// 桌面端依赖
|
||||
#[cfg(desktop)]
|
||||
mod desktops;
|
||||
#[cfg(target_os = "macos")]
|
||||
use common_cmd::hide_title_bar_buttons;
|
||||
#[cfg(desktop)]
|
||||
use common_cmd::{
|
||||
audio, default_window_icon, screenshot, set_badge_count,
|
||||
set_height,
|
||||
};
|
||||
use common_cmd::{audio, default_window_icon, screenshot, set_badge_count, set_height};
|
||||
#[cfg(desktop)]
|
||||
mod proxy;
|
||||
#[cfg(desktop)]
|
||||
@@ -17,7 +16,9 @@ use desktops::tray;
|
||||
#[cfg(desktop)]
|
||||
use init::CustomInit;
|
||||
#[cfg(desktop)]
|
||||
use proxy::test_proxy;
|
||||
use proxy::test_api_proxy;
|
||||
#[cfg(desktop)]
|
||||
use proxy::test_ws_proxy;
|
||||
|
||||
// 移动端依赖
|
||||
#[cfg(mobile)]
|
||||
@@ -54,7 +55,10 @@ fn setup_desktop() {
|
||||
audio,
|
||||
set_height,
|
||||
set_badge_count,
|
||||
test_proxy
|
||||
test_api_proxy,
|
||||
test_ws_proxy,
|
||||
#[cfg(target_os = "macos")]
|
||||
hide_title_bar_buttons
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
@@ -1,21 +1,49 @@
|
||||
use reqwest::{Client, Proxy};
|
||||
use std::time::Duration;
|
||||
use tungstenite::client::connect_with_config;
|
||||
use tungstenite::http::Uri;
|
||||
use tungstenite::protocol::WebSocketConfig;
|
||||
|
||||
// 定义测试用的URL列表
|
||||
const TEST_URLS: [&str; 3] = [
|
||||
"https://www.baidu.com",
|
||||
"https://www.bing.com",
|
||||
"https://www.qq.com",
|
||||
const TEST_API_URLS: [&str; 1] = [
|
||||
"/system/config/init",
|
||||
];
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn test_proxy(proxy_type: String, proxy_host: String, proxy_port: u16) -> Result<bool, String> {
|
||||
pub async fn test_ws_proxy(proxy_type: String, proxy_host: String, proxy_port: u16, proxy_suffix: String) -> Result<bool, String> {
|
||||
if proxy_type.is_empty() {
|
||||
return Ok(true); // 不使用代理时直接返回成功
|
||||
}
|
||||
|
||||
let proxy_url = match proxy_type.as_str() {
|
||||
"ws" => format!("ws://{}:{}/{}", proxy_host, proxy_port, proxy_suffix),
|
||||
"wss" => format!("wss://{}:{}/{}", proxy_host, proxy_port, proxy_suffix),
|
||||
_ => return Err("不支持的代理类型".to_string()),
|
||||
};
|
||||
let uri = Uri::from_maybe_shared(format!("{}?clientId=test", proxy_url)).unwrap();
|
||||
let config = if proxy_type == "wss" { Some(WebSocketConfig::default()) } else { None };
|
||||
let mut result = match connect_with_config(uri, config, 3) {
|
||||
Ok(ws) => {
|
||||
ws
|
||||
}
|
||||
Err(e) => {
|
||||
println!("{:?}", e);
|
||||
return Err("代理无法连接,请检查代理设置".to_string())
|
||||
}
|
||||
};
|
||||
let _ = result.0.close(None).map_err(|_| {});
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn test_api_proxy(proxy_type: String, proxy_host: String, proxy_port: u16, proxy_suffix: String) -> Result<bool, String> {
|
||||
if proxy_type.is_empty() {
|
||||
return Ok(true); // 不使用代理时直接返回成功
|
||||
}
|
||||
|
||||
let proxy_url = match proxy_type.as_str() {
|
||||
"http" => format!("http://{}:{}", proxy_host, proxy_port),
|
||||
"https" => format!("https://{}:{}", proxy_host, proxy_port),
|
||||
"socks5" => format!("socks5://{}:{}", proxy_host, proxy_port),
|
||||
_ => return Err("不支持的代理类型".to_string()),
|
||||
};
|
||||
@@ -28,8 +56,8 @@ pub async fn test_proxy(proxy_type: String, proxy_host: String, proxy_port: u16)
|
||||
.map_err(|e| format!("创建客户端失败: {}", e))?;
|
||||
|
||||
// 依次测试多个URL,直到有一个成功
|
||||
for url in TEST_URLS.iter() {
|
||||
match test_url(&client, url).await {
|
||||
for url in TEST_API_URLS.iter() {
|
||||
match test_url(&client, format!("{}/{}{}",proxy_url.as_str(), proxy_suffix.as_str(), url).as_str()).await {
|
||||
Ok(_) => return Ok(true),
|
||||
Err(e) => {
|
||||
println!("测试 {} 失败: {}", url, e);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula-app.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
@@ -12,7 +12,7 @@
|
||||
"bundle": {
|
||||
"category": "SocialNetworking",
|
||||
"copyright": "HuLaSpark",
|
||||
"licenseFile": "./copyright/License.txt",
|
||||
"licenseFile": "./copyright/License.rtf",
|
||||
"resources": [
|
||||
"tray"
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula-app.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
@@ -11,28 +11,7 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"resources": [
|
||||
"tray"
|
||||
],
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico",
|
||||
"icons/icon.png",
|
||||
"icons/Square30x30Logo.png",
|
||||
"icons/Square44x44Logo.png",
|
||||
"icons/Square71x71Logo.png",
|
||||
"icons/Square89x89Logo.png",
|
||||
"icons/Square107x107Logo.png",
|
||||
"icons/Square142x142Logo.png",
|
||||
"icons/Square150x150Logo.png",
|
||||
"icons/Square284x284Logo.png",
|
||||
"icons/Square310x310Logo.png",
|
||||
"icons/StoreLogo.png"
|
||||
],
|
||||
"iOS": {
|
||||
"minimumSystemVersion": "13.0"
|
||||
}
|
||||
@@ -43,8 +22,6 @@
|
||||
"title": "登录",
|
||||
"label": "login",
|
||||
"url": "/mobile/login",
|
||||
"width": 800,
|
||||
"height": 600,
|
||||
"resizable": false,
|
||||
"fullscreen": true
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
@@ -79,6 +79,18 @@
|
||||
"alwaysOnTop": true,
|
||||
"skipTaskbar": true,
|
||||
"decorations": false
|
||||
},
|
||||
{
|
||||
"label": "checkupdate",
|
||||
"url": "/checkupdate",
|
||||
"resizable": false,
|
||||
"center": true,
|
||||
"closable": false,
|
||||
"width": 500,
|
||||
"height": 600,
|
||||
"visible": false,
|
||||
"decorations": false,
|
||||
"hiddenTitle": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
@@ -74,18 +74,6 @@
|
||||
"titleBarStyle": "Overlay",
|
||||
"hiddenTitle": true
|
||||
},
|
||||
{
|
||||
"label": "tray",
|
||||
"url": "/tray",
|
||||
"resizable": false,
|
||||
"center": false,
|
||||
"visible": false,
|
||||
"width": 130,
|
||||
"height": 44,
|
||||
"alwaysOnTop": true,
|
||||
"skipTaskbar": true,
|
||||
"decorations": false
|
||||
},
|
||||
{
|
||||
"label": "capture",
|
||||
"url": "/capture",
|
||||
@@ -95,6 +83,19 @@
|
||||
"skipTaskbar": false,
|
||||
"decorations": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"label": "checkupdate",
|
||||
"url": "/checkupdate",
|
||||
"resizable": false,
|
||||
"width": 500,
|
||||
"height": 150,
|
||||
"alwaysOnTop": true,
|
||||
"focus": true,
|
||||
"skipTaskbar": true,
|
||||
"visible": false,
|
||||
"titleBarStyle": "Overlay",
|
||||
"hiddenTitle": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "HuLa",
|
||||
"version": "2.6.8",
|
||||
"version": "2.6.12",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
@@ -101,6 +101,19 @@
|
||||
"skipTaskbar": false,
|
||||
"decorations": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"label": "checkupdate",
|
||||
"url": "/checkupdate",
|
||||
"resizable": false,
|
||||
"width": 500,
|
||||
"height": 150,
|
||||
"alwaysOnTop": true,
|
||||
"focus": true,
|
||||
"skipTaskbar": true,
|
||||
"visible": false,
|
||||
"decorations": false,
|
||||
"hiddenTitle": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
||||
32
src/App.vue
@@ -3,27 +3,30 @@
|
||||
<div v-if="!isLock" id="app-container">
|
||||
<router-view />
|
||||
</div>
|
||||
|
||||
<!-- 锁屏页面 -->
|
||||
<LockScreen v-else />
|
||||
</NaiveProvider>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useSettingStore } from '@/stores/setting.ts'
|
||||
import { StoresEnum, ThemeEnum } from '@/enums'
|
||||
import { MittEnum, StoresEnum, ThemeEnum } from '@/enums'
|
||||
import LockScreen from '@/views/LockScreen.vue'
|
||||
import router from '@/router'
|
||||
import { type } from '@tauri-apps/plugin-os'
|
||||
import { useLogin } from '@/hooks/useLogin.ts'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'
|
||||
import { useMitt } from '@/hooks/useMitt.ts'
|
||||
import { useWindow } from '@/hooks/useWindow.ts'
|
||||
|
||||
const appWindow = WebviewWindow.getCurrent()
|
||||
const { createWebviewWindow } = useWindow()
|
||||
const settingStore = useSettingStore()
|
||||
const { themes, lockScreen, page } = storeToRefs(settingStore)
|
||||
const { resetLoginState, logout } = useLogin()
|
||||
const token = useStorage('TOKEN', null)
|
||||
const refreshToken = useStorage('REFRESH_TOKEN', null)
|
||||
|
||||
/** 不需要锁屏的页面 */
|
||||
const LockExclusion = new Set(['/login', '/tray', '/qrCode', '/about', '/onlineStatus'])
|
||||
const isLock = computed(() => {
|
||||
@@ -116,9 +119,7 @@ onMounted(async () => {
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
/** 禁用浏览器默认的快捷键 */
|
||||
window.addEventListener('keydown', (e) => {
|
||||
// 排除ctrl+c ctrl+v ctrl+a ctrl+enter
|
||||
if (e.ctrlKey && (e.key === 'c' || e.key === 'v' || e.key === 'a' || e.key === 'Enter')) return
|
||||
if (e.ctrlKey || e.metaKey || e.altKey) {
|
||||
if (e.ctrlKey && (e.key === 'f' || e.key === 'r' || e.key === 'g' || e.key === 'j')) {
|
||||
e.preventDefault()
|
||||
}
|
||||
})
|
||||
@@ -133,6 +134,15 @@ onMounted(async () => {
|
||||
// 最后调用登出方法(这会创建登录窗口)
|
||||
await logout()
|
||||
})
|
||||
useMitt.on(MittEnum.CHECK_UPDATE, async () => {
|
||||
const checkUpdateWindow = await WebviewWindow.getByLabel('checkupdate')
|
||||
await checkUpdateWindow?.show()
|
||||
})
|
||||
useMitt.on(MittEnum.DO_UPDATE, async (event) => {
|
||||
await createWebviewWindow('更新', 'update', 490, 335, '', false, 490, 335, false, true)
|
||||
const closeWindow = await WebviewWindow.getByLabel(event.close)
|
||||
closeWindow?.close()
|
||||
})
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
@@ -149,4 +159,16 @@ onUnmounted(() => {
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
img {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
a {
|
||||
user-select: auto;
|
||||
cursor: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,5 +8,7 @@ export const MSG_REPLY_TEXT_MAP: Record<number, string> = {
|
||||
[MsgEnum.FILE]: '[文件]',
|
||||
[MsgEnum.VOICE]: '[语音]',
|
||||
[MsgEnum.VIDEO]: '[音频]',
|
||||
[MsgEnum.EMOJI]: '[动画表情]'
|
||||
[MsgEnum.EMOJI]: '[动画表情]',
|
||||
[MsgEnum.MERGE]: '[合并消息]',
|
||||
[MsgEnum.NOTICE]: '[公告]'
|
||||
}
|
||||
|
||||
@@ -35,13 +35,11 @@
|
||||
<vue-cropper
|
||||
ref="cropperRef"
|
||||
:img="localImageUrl"
|
||||
:outputSize="0.1"
|
||||
:outputSize="0.4"
|
||||
:autoCrop="true"
|
||||
:outputType="'jpeg'"
|
||||
:fixedBox="true"
|
||||
:fixed="true"
|
||||
:centerBox="true"
|
||||
:full="true"
|
||||
:autoCropWidth="320"
|
||||
:autoCropHeight="320"
|
||||
:fixedNumber="[1, 1]"
|
||||
|
||||
@@ -3,29 +3,31 @@
|
||||
<slot></slot>
|
||||
<Teleport to="body">
|
||||
<transition-group @beforeEnter="handleBeforeEnter" @enter="handleEnter" @afterEnter="handleAfterEnter">
|
||||
<!-- 群聊emoji表情菜单 -->
|
||||
<!-- emoji表情菜单 -->
|
||||
<div
|
||||
v-if="showMenu && emoji && emoji.length > 0"
|
||||
class="context-menu select-none"
|
||||
style="display: flex; height: fit-content"
|
||||
:style="{
|
||||
left: `${pos.posX}px`,
|
||||
top: `${pos.posY - 42}px`
|
||||
}">
|
||||
<n-flex v-for="(item, index) in emoji" :key="index" align="center" justify="space-between" class="emoji-list">
|
||||
<n-popover trigger="hover" :show-arrow="false" placement="top">
|
||||
<template #trigger>
|
||||
<n-flex :size="0" align="center" justify="center" class="emoji-item" @click="handleReplyEmoji(item)">
|
||||
{{ item.label }}
|
||||
</n-flex>
|
||||
</template>
|
||||
<span>{{ item.title }}</span>
|
||||
</n-popover>
|
||||
</n-flex>
|
||||
style="height: fit-content"
|
||||
:style="emojiMenuPosition">
|
||||
<div class="emoji-container">
|
||||
<div v-for="(item, index) in displayedEmojis" :key="index" class="p-4px">
|
||||
<n-popover :delay="500" :duration="0" trigger="hover" :show-arrow="false" placement="top">
|
||||
<template #trigger>
|
||||
<div class="emoji-item" @click="handleReplyEmoji(item)">
|
||||
<img :title="item.title" class="size-18px" :src="item.url" :alt="item.title" />
|
||||
</div>
|
||||
</template>
|
||||
<span>{{ item.title }}</span>
|
||||
</n-popover>
|
||||
</div>
|
||||
<div v-if="!showAllEmojis && emoji.length > 4" class="p-4px">
|
||||
<div class="emoji-more-btn" @click="showAllEmojis = true">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 普通右键菜单 -->
|
||||
<div
|
||||
v-if="showMenu"
|
||||
v-if="showMenu && !(emoji && emoji.length > 0 && showAllEmojis)"
|
||||
class="context-menu select-none"
|
||||
:style="{
|
||||
left: `${pos.posX}px`,
|
||||
@@ -102,6 +104,14 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
specialMenu: () => []
|
||||
})
|
||||
|
||||
// 控制是否显示全部表情
|
||||
const showAllEmojis = ref(false)
|
||||
|
||||
// 计算要显示的表情列表
|
||||
const displayedEmojis = computed(() => {
|
||||
return showAllEmojis.value ? props.emoji : props.emoji.slice(0, 4)
|
||||
})
|
||||
|
||||
// 使用计算属性过滤显示的菜单项
|
||||
const visibleMenu = computed(() => {
|
||||
// 检查是否有 visible 属性并作为函数调用
|
||||
@@ -160,6 +170,52 @@ const pos = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
/** 表情菜单的尺寸和位置 */
|
||||
const emojiWidth = ref(180) // 表情菜单的大约宽度,根据.emoji-container的max-w-180px设置
|
||||
|
||||
// 根据是否展示全部表情动态计算菜单高度
|
||||
const emojiHeight = computed(() => {
|
||||
return showAllEmojis.value ? 114 : 40 // 没有展示更多时为56,展开更多时为126
|
||||
})
|
||||
|
||||
/** 计算表情菜单的位置 */
|
||||
const emojiMenuPosition = computed(() => {
|
||||
// 使用普通右键菜单计算后的位置作为基础
|
||||
let posX = pos.value.posX
|
||||
let posY = pos.value.posY - emojiHeight.value // 默认在右键菜单位置上方显示
|
||||
|
||||
// 判断消息是在左边还是右边(通过原始鼠标位置与屏幕中心的关系)
|
||||
const isRightSideMessage = x.value > vw.value / 2
|
||||
|
||||
if (isRightSideMessage) {
|
||||
// emoji菜单的左边位置 = 右键菜单右边界 - emoji菜单宽度
|
||||
posX = pos.value.posX + w.value - emojiWidth.value
|
||||
|
||||
// 确保不会超出左边界
|
||||
if (posX < 10) {
|
||||
posX = 10
|
||||
}
|
||||
} else {
|
||||
posX = pos.value.posX
|
||||
|
||||
// 检查是否会超出右边界
|
||||
if (posX + emojiWidth.value > vw.value) {
|
||||
posX = vw.value - emojiWidth.value - 10
|
||||
}
|
||||
}
|
||||
|
||||
// 检查垂直方向是否超出视口
|
||||
if (posY < 10) {
|
||||
// 如果上方空间不足,则在右键菜单位置下方显示
|
||||
posY = pos.value.posY + 10
|
||||
}
|
||||
|
||||
return {
|
||||
left: `${posX}px`,
|
||||
top: `${posY}px`
|
||||
}
|
||||
})
|
||||
|
||||
// 添加 watch 监听主菜单显示状态
|
||||
watch(
|
||||
() => showMenu.value,
|
||||
@@ -168,6 +224,8 @@ watch(
|
||||
// 主菜单隐藏时,同时隐藏二级菜单
|
||||
showSubmenu.value = false
|
||||
activeSubmenu.value = []
|
||||
// 重置表情显示状态
|
||||
showAllEmojis.value = false
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -186,10 +244,11 @@ const handleClick = (item: string) => {
|
||||
}
|
||||
|
||||
/** 处理回复表情事件 */
|
||||
const handleReplyEmoji = (item: { label: string }) => {
|
||||
const handleReplyEmoji = (item: string) => {
|
||||
if (!item) return
|
||||
nextTick(() => {
|
||||
showMenu.value = false
|
||||
emit('reply-emoji', item.label)
|
||||
emit('reply-emoji', item)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -378,13 +437,19 @@ const shouldShowArrow = (item: any) => {
|
||||
|
||||
.context-menu {
|
||||
@include menu-item-style();
|
||||
.emoji-list {
|
||||
.emoji-container {
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
background: var(--bg-menu);
|
||||
@apply size-fit p-4px select-none;
|
||||
.emoji-item {
|
||||
@apply size-28px rounded-4px text-16px cursor-pointer hover:bg-[--emoji-hover];
|
||||
}
|
||||
/* 允许放置表情符号,每个28px宽,加上间隔 */
|
||||
@apply flex flex-wrap max-w-180px px-6px select-none;
|
||||
}
|
||||
|
||||
.emoji-item {
|
||||
@apply flex-center size-28px rounded-4px text-16px cursor-pointer hover:bg-[--emoji-hover];
|
||||
}
|
||||
|
||||
.emoji-more-btn {
|
||||
@apply flex-center size-28px rounded-4px text-12px cursor-pointer bg-[--bg-menu-hover] hover:bg-[--emoji-hover];
|
||||
}
|
||||
.menu-list {
|
||||
@include menu-list();
|
||||
@@ -426,7 +491,6 @@ const shouldShowArrow = (item: any) => {
|
||||
.check-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="float-block-container" ref="containerRef">
|
||||
<div class="float-block-container select-none" ref="containerRef">
|
||||
<n-virtual-list
|
||||
ref="virtualListRef"
|
||||
:style="{ maxHeight: maxHeight }"
|
||||
@@ -28,7 +28,8 @@
|
||||
:style="{
|
||||
height: `${itemHeight}px`,
|
||||
opacity: props.hoverOpacity,
|
||||
top: `${hoverPosition}px`
|
||||
top: `${hoverPosition}px`,
|
||||
display: isHoverPositionValid ? 'block' : 'none'
|
||||
}"></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -68,9 +69,28 @@ const containerRef = ref<HTMLElement | null>(null)
|
||||
const virtualListRef = ref<any>(null)
|
||||
const hoverPosition = ref<number | null>(null)
|
||||
const currentHoverIndex = ref<number | null>(null)
|
||||
const containerHeight = ref<number>(0)
|
||||
|
||||
// 计算属性:判断悬浮位置是否有效(是否在容器范围内)
|
||||
const isHoverPositionValid = computed(() => {
|
||||
if (hoverPosition.value === null) return false
|
||||
|
||||
// 确保悬浮位置 + 项目高度不超过容器高度
|
||||
return hoverPosition.value >= 0 && hoverPosition.value + props.itemHeight <= containerHeight.value
|
||||
})
|
||||
|
||||
// 更新容器高度
|
||||
const updateContainerHeight = () => {
|
||||
if (virtualListRef.value?.$el) {
|
||||
containerHeight.value = virtualListRef.value.$el.clientHeight
|
||||
}
|
||||
}
|
||||
|
||||
// 处理滚动事件
|
||||
const handleScroll = () => {
|
||||
// 更新容器高度
|
||||
updateContainerHeight()
|
||||
|
||||
// 如果当前有悬浮项,更新其位置
|
||||
if (currentHoverIndex.value !== null) {
|
||||
updateHoverPositionByIndex(currentHoverIndex.value)
|
||||
@@ -96,6 +116,9 @@ const handleItemMouseEnter = (index: number) => {
|
||||
|
||||
// 设置悬浮效果的位置
|
||||
hoverPosition.value = itemRect.top - listRect.top
|
||||
|
||||
// 更新容器高度
|
||||
updateContainerHeight()
|
||||
} else {
|
||||
// 如果找不到DOM元素,使用索引计算位置
|
||||
updateHoverPositionByIndex(index)
|
||||
@@ -137,6 +160,9 @@ const updateHoverPositionByIndex = (index: number) => {
|
||||
|
||||
// 计算目标元素相对于列表容器的顶部偏移量
|
||||
hoverPosition.value = targetRect.top - listRect.top
|
||||
|
||||
// 更新容器高度
|
||||
updateContainerHeight()
|
||||
}
|
||||
|
||||
// 处理容器的鼠标离开事件
|
||||
@@ -150,6 +176,12 @@ onMounted(() => {
|
||||
if (containerRef.value) {
|
||||
containerRef.value.addEventListener('mouseleave', handleMouseLeave)
|
||||
}
|
||||
|
||||
// 初始化容器高度
|
||||
updateContainerHeight()
|
||||
|
||||
// 监听窗口大小变化
|
||||
window.addEventListener('resize', updateContainerHeight)
|
||||
})
|
||||
|
||||
// 在组件卸载时移除事件监听
|
||||
@@ -157,6 +189,9 @@ onUnmounted(() => {
|
||||
if (containerRef.value) {
|
||||
containerRef.value.removeEventListener('mouseleave', handleMouseLeave)
|
||||
}
|
||||
|
||||
// 移除窗口大小变化监听
|
||||
window.removeEventListener('resize', updateContainerHeight)
|
||||
})
|
||||
|
||||
// 暴露滚动到顶部/底部方法
|
||||
@@ -201,6 +236,5 @@ defineExpose({
|
||||
pointer-events: none;
|
||||
transition: top 0.2s ease-in-out;
|
||||
z-index: 0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||