From 0ccedafdb61eae9d3f40fc16bf9da41011682a69 Mon Sep 17 00:00:00 2001 From: Dawn <2439646234@qq.com> Date: Wed, 27 Aug 2025 00:02:39 +0800 Subject: [PATCH] feat(screenshot): :sparkles: add screenshots of rounded corners and write input box update readme update release.yml and remove pr-chatbot-review.yml closed #323 --- .github/workflows/pr-chatbot-review.yml | 145 ------------------ .github/workflows/release.yml | 5 +- README.en.md | 3 +- README.md | 3 +- src/App.vue | 2 +- src/components/common/Screenshot.vue | 45 +++++- src/components/rightBox/MsgInput.vue | 28 +++- .../rightBox/chatBox/ChatSidebar.vue | 2 +- src/components/windows/ActionBar.vue | 2 +- src/hooks/useGlobalShortcut.ts | 6 +- src/hooks/useMessage.ts | 2 +- src/hooks/useTauriListener.ts | 2 +- src/layout/left/components/ActionList.vue | 2 +- src/layout/left/components/InfoEdit.vue | 4 +- src/layout/left/hook.ts | 4 +- src/mobile/views/chat-room/ChatMain.vue | 6 +- src/views/homeWindow/SharedScreen.vue | 26 ++-- src/views/homeWindow/message/index.vue | 2 +- src/views/imageViewerWindow/index.vue | 2 +- src/views/previewFileWindow/index.vue | 2 +- src/views/videoViewerWindow/index.vue | 2 +- 21 files changed, 108 insertions(+), 187 deletions(-) delete mode 100644 .github/workflows/pr-chatbot-review.yml diff --git a/.github/workflows/pr-chatbot-review.yml b/.github/workflows/pr-chatbot-review.yml deleted file mode 100644 index b41116d3..00000000 --- a/.github/workflows/pr-chatbot-review.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: PR Review Bot - -on: - pull_request: - types: [opened, synchronize] - -permissions: - contents: read - pull-requests: write - -jobs: - review: - # 跳过 Renovate PR - if: | - github.actor != 'renovate[bot]' && - github.actor != 'renovate-preview[bot]' - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get PR diff - id: diff - run: | - git fetch origin ${{ github.event.pull_request.base.sha }} - # 排除配置文件,只分析源代码文件 - DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- \ - 'src/**/*.vue' \ - 'src/**/*.ts' \ - 'src/**/*.tsx' \ - 'src-tauri/**/*.rs' \ - ':!:**/*.json' \ - ':!:**/*.yaml' \ - ':!:**/*.yml' \ - ':!:**/*.config.*' \ - ':!:**/*.lock' \ - ':!:**/*.toml' \ - ':!:.env*' \ - ':!:.eslintrc*' \ - ':!:.prettierrc*') - - # 如果没有相关文件变更,设置一个提示信息 - if [ -z "$DIFF" ]; then - echo "NO_CHANGES=true" >> $GITHUB_ENV - echo "DIFF=没有检测到相关文件的变更。" >> $GITHUB_ENV - else - echo "NO_CHANGES=false" >> $GITHUB_ENV - echo "DIFF<> $GITHUB_ENV - echo "$DIFF" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - fi - - # 首先安装 pnpm - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - run_install: false - - # 然后设置 Node.js - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'pnpm' - - - name: Install dependencies - run: | - pnpm config set registry https://registry.npmmirror.com/ - pnpm install - pnpm add openai - - - name: Analyze PR - id: analyze - if: env.NO_CHANGES != 'true' - uses: actions/github-script@v7 - env: - DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} - with: - script: | - const OpenAI = require('openai'); - - const openai = new OpenAI({ - apiKey: process.env.DASHSCOPE_API_KEY, - baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1" - }); - - const diff = process.env.DIFF; - - try { - const completion = await openai.chat.completions.create({ - model: "qwen-plus", - messages: [{ - role: "system", - content: "你是一个代码审查助手。请用中文分析以下代码变更,重点关注:\n" + - "1. 代码逻辑的改动\n" + - "2. 潜在的问题或优化空间\n" + - "3. TypeScript 类型定义的准确性\n" + - "4. Vue 组件的性能影响\n" + - "5. Rust 代码的安全性和性能\n" + - "请用中文简明扼要地总结。" - }, { - role: "user", - content: `请分析以下代码变更并总结主要改动:\n\n${diff}` - }], - temperature: 0.7, - max_tokens: 1000 - }); - - const analysis = completion.choices[0].message.content; - core.setOutput('analysis', analysis); - - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - PR 代码分析 - - ${analysis} - - *这是由通义千问 AI 自动生成的 PR 分析,仅供参考。*` - }); - } catch (error) { - core.setFailed(`分析失败: ${error.message}`); - } - - - name: Skip Analysis Comment - if: env.NO_CHANGES == 'true' - uses: actions/github-script@v7 - with: - script: | - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `## PR 代码分析 - - 本次变更不包含需要分析的代码文件(src 目录下的 .vue/.ts/.tsx 文件或 src-tauri 目录下的 .rs 文件)。 - - --- - *这是自动生成的通知。*` - }); \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 323b184c..e1752c74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,9 +69,6 @@ jobs: - name: Install dependencies run: pnpm install - - name: Build Vite + Tauri - run: pnpm build - # 安装 Rust - name: install Rust stable uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly @@ -98,4 +95,4 @@ jobs: releaseBody: 'See the assets to download and install this version.' releaseDraft: true prerelease: false - args: ${{ matrix.args }} \ No newline at end of file + args: ${{ matrix.args }} diff --git a/README.en.md b/README.en.md index cb4ae61f..79254203 100644 --- a/README.en.md +++ b/README.en.md @@ -237,7 +237,7 @@ HuLa is an instant messaging system built with Tauri, Vite 7, Vue 3, and TypeScr | Feature | Description | Status | |---------|-------------|--------| | 💻 | Windows/macOS/Linux | ![Completed](https://img.shields.io/badge/✅-Completed-008080?style=flat&labelColor=e6f7f7&color=008080) | -| 📱 | iOS/Android Adaptation | ![In Progress](https://img.shields.io/badge/🐣-Accomplish60%-ee9f20?style=flat&labelColor=fef7e6&color=ee9f20) | +| 📱 | iOS/Android Adaptation | ![In Progress](https://img.shields.io/badge/🐣-In_Progress-ee9f20?style=flat&labelColor=fef7e6&color=ee9f20) | ### 🤖 AI Integration | Feature | Description | Status | @@ -344,6 +344,7 @@ Execute **pnpm run commit** to invoke _git commit_ interaction, complete informa ### 🏆 Gold Sponsors ($15+) | 💝 Date | 👤 Sponsor | 💰 Amount | 🏷️ Platform | |---------|----------|--------|---------| +| 2025-08-26 | **唐勇** | `¥200` | ![WeChat](https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-04-25 | **上官俊斌** | `¥200` | ![WeChat](https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-05-27 | **临安居士** | `¥188` | ![WeChat](https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-04-20 | **姜兴(Simon)** | `¥188` | ![WeChat](https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white) | diff --git a/README.md b/README.md index f069d2cc..e5f54973 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ HuLa 是一款基于 Tauri、Vite 7、Vue 3 和 TypeScript 构建的即时通讯 | 功能 | 描述 | 状态 | |------|------|------| | 💻 | Windows/macOS/Linux | ![完成](https://img.shields.io/badge/✅-完成-008080?style=flat&labelColor=e6f7f7&color=008080) | -| 📱 | iOS/Android 适配 | ![进行中](https://img.shields.io/badge/🐣-完成60%-ee9f20?style=flat&labelColor=fef7e6&color=ee9f20) | +| 📱 | iOS/Android 适配 | ![进行中](https://img.shields.io/badge/🐣-进行中-ee9f20?style=flat&labelColor=fef7e6&color=ee9f20) | ### 🤖 AI 集成 | 功能 | 描述 | 状态 | @@ -345,6 +345,7 @@ sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app ### 🏆 金牌赞助者 (¥100+) | 💝 日期 | 👤 赞助者 | 💰 金额 | 🏷️ 平台 | |---------|----------|--------|---------| +| 2025-08-26 | **唐勇** | `¥200` | ![微信赞赏](https://img.shields.io/badge/微信赞赏-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-04-25 | **上官俊斌** | `¥200` | ![微信赞赏](https://img.shields.io/badge/微信赞赏-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-05-27 | **临安居士** | `¥188` | ![微信赞赏](https://img.shields.io/badge/微信赞赏-07C160?style=flat&logo=wechat&logoColor=white) | | 2025-04-20 | **姜兴(Simon)** | `¥188` | ![微信赞赏](https://img.shields.io/badge/微信赞赏-07C160?style=flat&logo=wechat&logoColor=white) | diff --git a/src/App.vue b/src/App.vue index 239d5bf1..40db97bb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -137,7 +137,7 @@ onMounted(async () => { closeWindow?.close() }) - addListener( + await addListener( listen('refresh_token_event', (event) => { console.log('🔄 收到 refresh_token 事件') diff --git a/src/components/common/Screenshot.vue b/src/components/common/Screenshot.vue index 470d0209..9a5b146c 100644 --- a/src/components/common/Screenshot.vue +++ b/src/components/common/Screenshot.vue @@ -84,6 +84,7 @@