From 6508e319a6b1423fad4720bac30e3b499b4b74f7 Mon Sep 17 00:00:00 2001 From: stapxs <1007028430.stapx@gmail.com> Date: Thu, 5 Sep 2024 16:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=B8=80=E6=97=B6=E7=88=BD?= =?UTF-8?q?=EF=BC=8CBUG=20=E7=81=AB=E8=91=AC=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :sparkles: 支持群 poke 消息以及相关动画/窗口动画 :sparkles: 新增一个没什么用的 bot 状态功能,仅限于开启了 ws 心跳功能的 bot :bug: 修正消息列表在窄布局下的错误,由 3a5483e42d0c42708d525c1ff36a22c9007c5a99 损坏 :bug: 修正在 iOS 浏览器下由于通知功能缺失导致通知下游功能损坏的问题 :bug: 修正初次打开由于存储的商城表情未初始化导致的页面卡死问题 :bug: 修正初次打开由于存储的代码未初始导致的页面卡死问题 :bug: 修正由于消息解析器调整公告解析出现错误导致的页面卡死问题,由 c64592d54c8490906ad6eb184b7842f4519fa66b 损坏 :lipstick: 将全局字体限制为非衬线字体,防止在某些浏览器以及 linux 下出现默认为衬线字体的情况 :lipstick: 新增一组常见状态色便于使用 :heavy_plus_sign: 新增依赖:animejs :green_heart: 发布版本现在会构建一个用于 root 的 web 包便于使用 --- .github/workflows/build-app.yml | 57 +++++++++++++------- package.json | 4 +- public/css/append-dark.css | 11 ++++ public/css/append-light.css | 11 ++++ public/index.html | 1 + src/assets/css/append/append_vibrancy.css | 4 ++ src/assets/css/msg.css | 7 +++ src/assets/css/options.css | 35 +++++++++++++ src/assets/css/view.css | 4 +- src/assets/l10n/zh-CN.json | 3 ++ src/components/BulletinBody.vue | 2 +- src/components/NoticeBody.vue | 64 +++++++++++++++++++++-- src/function/electron/ipc.ts | 19 ++++++- src/function/msg.ts | 60 +++++++++++++-------- src/function/option.ts | 5 +- src/function/utils/msgUtil.ts | 2 +- src/pages/Chat.vue | 5 +- src/pages/Scripts.vue | 4 +- src/pages/options/OptAccount.vue | 23 ++++++++ 19 files changed, 263 insertions(+), 58 deletions(-) create mode 100644 public/css/append-dark.css create mode 100644 public/css/append-light.css diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml index 1158aa36..965a4819 100644 --- a/.github/workflows/build-app.yml +++ b/.github/workflows/build-app.yml @@ -25,31 +25,50 @@ jobs: - name: Init Env id: step_init run: | - # 判断是否需要构建 web 版本,检查 push message 中最后一行是否不包含 [not-build-web](默认构建) - if [[ $(git log -1 --pretty=%B) != *"[not-build-web]"* ]]; then - echo 'BUILD_WEB=true' - echo 'BUILD_WEB=true' >> $GITHUB_OUTPUT - else - echo 'BUILD_WEB=false' - echo 'BUILD_WEB=false' >> $GITHUB_OUTPUT - fi - # 判断是否需要构建 electron 版本,检查 push message 中最后一行是否包含 [build-electron] - if [[ $(git log -1 --pretty=%B) == *"[build-electron]"* ]]; then - echo 'BUILD_ELECTRON=true' - echo 'BUILD_ELECTRON=true' >> $GITHUB_OUTPUT - else - echo 'BUILD_ELECTRON=false' - echo 'BUILD_ELECTRON=false' >> $GITHUB_OUTPUT - fi # 获取版本号 echo VERSION=$(node -p "require('./package.json').version") >> $GITHUB_OUTPUT - # ========================= 构建 Web 版本 ========================= + # ========================= 构建 Web 版本 ========================= + + build-root-web: + name: 构建 Web 版本(根目录) + runs-on: ubuntu-latest + needs: init + steps: + # 拉取代码 + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + persist-credentials: false + # 设置 Node.js 版本 + - name: Load Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + # 更新依赖 + - name: Install + run: yarn + # 构建 + - name: Build + run: yarn build + + # 将 dist 目录压缩为 zip + - name: Zip + run: zip -r Stapxs.QQ.Lite-${{ needs.init.outputs.version }}-web.zip dist + + # 上传构建结果 + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ needs.init.outputs.version }}-web + path: Stapxs.QQ.Lite-${{ needs.init.outputs.version }}-web.zip + + # ==================== 构建 Github Pages 版本 ===================== build-pages: name: 构建 Github Pages 版本 runs-on: ubuntu-latest needs: init - if: needs.init.outputs.build_web == 'true' steps: # 拉取代码 - name: Checkout @@ -90,10 +109,8 @@ jobs: version: ${{ needs.init.outputs.version }} needs: init - if: needs.init.outputs.build_electron == 'true' steps: - # 拉取代码 - name: Checkout uses: actions/checkout@v4 diff --git a/package.json b/package.json index 123a5f89..db4cd90e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stapxs-qq-lite", - "version": "2.8.5", + "version": "2.8.6", "private": false, "author": "Stapx Steve [林槐]", "description": "一个兼容 OneBot 的非官方网页版 QQ 客户端,使用 Vue 重制的全新版本。", @@ -19,6 +19,7 @@ "@jakejarrett/gtk-theme": "^2.0.1", "@stapxs/umami-logger-typescript": "^1.0.12", "@types/prismjs": "^1.26.4", + "animejs": "^3.2.2", "axios": "^1.7.2", "browser-image-compression": "^2.0.0", "core-js": "^3.8.3", @@ -50,6 +51,7 @@ "xss": "^1.0.14" }, "devDependencies": { + "@types/animejs": "^3.1.12", "@types/css": "^0.0.33", "@types/electron-devtools-installer": "^2.2.0", "@types/jsonpath": "^0.2.3", diff --git a/public/css/append-dark.css b/public/css/append-dark.css new file mode 100644 index 00000000..c88c7292 --- /dev/null +++ b/public/css/append-dark.css @@ -0,0 +1,11 @@ +:root { + --color-blue: #316cf4; + --color-green: #408558; + --color-red: #cb444a; + --color-yellow: #f6c344; + + --color-bg-blue: #393e47; + --color-bg-green: #3f544a; + --color-bg-red: #523a3c; + --color-bg-yellow: #504b3d; +} \ No newline at end of file diff --git a/public/css/append-light.css b/public/css/append-light.css new file mode 100644 index 00000000..9cb77a7e --- /dev/null +++ b/public/css/append-light.css @@ -0,0 +1,11 @@ +:root { + --color-blue: #316cf4; + --color-green: #408558; + --color-red: #cb444a; + --color-yellow: #f6c344; + + --color-bg-blue: #d3e1fc; + --color-bg-green: #d5e6de; + --color-bg-red: #f3d8da; + --color-bg-yellow: #fdf3d1; +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 03a2933e..67dd18cf 100644 --- a/public/index.html +++ b/public/index.html @@ -9,6 +9,7 @@ Stapxs QQ Lite +