🌻 update(custom): 更新好友和群聊详情页面

This commit is contained in:
nongyehong
2024-03-09 03:39:35 +08:00
parent ebd7a41e89
commit 16007a204c
14 changed files with 356 additions and 150 deletions

96
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,96 @@
# 可选,将显示在 GitHub 存储库的“操作”选项卡中的工作流名称
name: Release CI
# 指定此工作流的触发器
on:
push:
# 匹配特定标签 (refs/tags)
tags:
- 'v*' # 推送事件匹配 v*, 例如 v1.0v20.15.10 等来触发工作流
# 需要运行的作业组合
jobs:
# 任务:创建 release 版本
create-release:
runs-on: ubuntu-latest
outputs:
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}
steps:
- uses: actions/checkout@v2
# 查询版本号tag
- name: Query version number
id: get_version
shell: bash
run: |
echo "using version tag ${GITHUB_REF:10}"
echo ::set-output name=version::"${GITHUB_REF:10}"
# 根据查询到的版本号创建 release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: '${{ steps.get_version.outputs.VERSION }}'
release_name: 'app ${{ steps.get_version.outputs.VERSION }}'
body: 'See the assets to download this version and install.'
# 编译 Tauri
build-tauri:
needs: create-release
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
# 安装 Node.js
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20
cache: 'pnpm'
# 安装 Rust
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# 使用 Rust 缓存,加快安装速度
- uses: Swatinem/rust-cache@v1
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
# # 可选,如果需要将 Rust 编译为 wasm则安装 wasm-pack
# - uses: jetli/wasm-pack-action@v0.3.0
# with:
# # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
# version: v0.9.1
# # 可选,如果需要使用 rsw 构建 wasm则安装 rsw
# - name: Install rsw
# run: cargo install rsw
- name: Build Vite + Tauri
run: pnpm build
- name: Create release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__ # 这个操作会自动将\_\_VERSION\_\_替换为app version
releaseName: 'v__VERSION__'
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false

View File

@@ -1,7 +1,7 @@
{
"name": "hula-im-tauri",
"private": true,
"version": "v1.2.8-alpha",
"version": "v1.2.9-alpha",
"packageManager": "pnpm@8.15.4",
"engines": {
"node": ">=18.12.0",
@@ -41,7 +41,7 @@
"naive-ui": "^2.38.1",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"vue": "^3.4.19",
"vue": "^3.4.21",
"vue-draggable-plus": "^0.3.5",
"vue-router": "^4.3.0"
},

211
pnpm-lock.yaml generated
View File

@@ -22,22 +22,22 @@ dependencies:
version: 3.0.1
naive-ui:
specifier: ^2.38.1
version: 2.38.1(vue@3.4.19)
version: 2.38.1(vue@3.4.21)
pinia:
specifier: ^2.1.7
version: 2.1.7(typescript@5.4.2)(vue@3.4.19)
version: 2.1.7(typescript@5.4.2)(vue@3.4.21)
pinia-plugin-persistedstate:
specifier: ^3.2.1
version: 3.2.1(pinia@2.1.7)
vue:
specifier: ^3.4.19
version: 3.4.19(typescript@5.4.2)
specifier: ^3.4.21
version: 3.4.21(typescript@5.4.2)
vue-draggable-plus:
specifier: ^0.3.5
version: 0.3.5(@types/sortablejs@1.15.8)
vue-router:
specifier: ^4.3.0
version: 4.3.0(vue@3.4.19)
version: 4.3.0(vue@3.4.21)
devDependencies:
'@babel/eslint-parser':
@@ -75,13 +75,13 @@ devDependencies:
version: 0.58.4(vite@5.1.4)
'@vitejs/plugin-vue':
specifier: ^5.0.3
version: 5.0.3(vite@5.1.4)(vue@3.4.19)
version: 5.0.3(vite@5.1.4)(vue@3.4.21)
'@vitejs/plugin-vue-jsx':
specifier: ^3.1.0
version: 3.1.0(vite@5.1.4)(vue@3.4.19)
version: 3.1.0(vite@5.1.4)(vue@3.4.21)
'@vueuse/core':
specifier: ^10.8.0
version: 10.8.0(vue@3.4.19)
version: 10.8.0(vue@3.4.21)
commitizen:
specifier: ^4.3.0
version: 4.3.0(@types/node@20.11.7)(typescript@5.4.2)
@@ -138,7 +138,7 @@ devDependencies:
version: 0.17.5(@vueuse/core@10.8.0)
unplugin-vue-components:
specifier: ^0.26.0
version: 0.26.0(vue@3.4.19)
version: 0.26.0(vue@3.4.21)
vite:
specifier: 5.1.4
version: 5.1.4(@types/node@20.11.7)(sass@1.71.1)
@@ -302,7 +302,7 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.23.9
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/helper-hoist-variables@7.22.5:
@@ -316,7 +316,7 @@ packages:
resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/helper-module-imports@7.22.15:
@@ -358,7 +358,7 @@ packages:
resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/helper-plugin-utils@7.22.5:
@@ -389,14 +389,14 @@ packages:
resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/helper-split-export-declaration@7.22.6:
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/helper-string-parser@7.23.4:
@@ -449,6 +449,7 @@ packages:
hasBin: true
dependencies:
'@babel/types': 7.23.9
dev: true
/@babel/parser@7.24.0:
resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==}
@@ -456,7 +457,6 @@ packages:
hasBin: true
dependencies:
'@babel/types': 7.24.0
dev: true
/@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==}
@@ -559,6 +559,7 @@ packages:
'@babel/helper-string-parser': 7.23.4
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
dev: true
/@babel/types@7.24.0:
resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==}
@@ -567,7 +568,6 @@ packages:
'@babel/helper-string-parser': 7.23.4
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
dev: true
/@commitlint/config-validator@19.0.3:
resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==}
@@ -639,12 +639,12 @@ packages:
css-render: 0.15.12
dev: false
/@css-render/vue3-ssr@0.15.12(vue@3.4.19):
/@css-render/vue3-ssr@0.15.12(vue@3.4.21):
resolution: {integrity: sha512-AQLGhhaE0F+rwybRCkKUdzBdTEM/5PZBYy+fSYe1T9z9+yxMuV/k7ZRqa4M69X+EI1W8pa4kc9Iq2VjQkZx4rg==}
peerDependencies:
vue: ^3.0.11
dependencies:
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: false
/@emotion/hash@0.8.0:
@@ -1645,7 +1645,7 @@ packages:
- rollup
dev: true
/@vitejs/plugin-vue-jsx@3.1.0(vite@5.1.4)(vue@3.4.19):
/@vitejs/plugin-vue-jsx@3.1.0(vite@5.1.4)(vue@3.4.21):
resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@@ -1656,12 +1656,12 @@ packages:
'@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.9)
'@vue/babel-plugin-jsx': 1.2.1(@babel/core@7.23.9)
vite: 5.1.4(@types/node@20.11.7)(sass@1.71.1)
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
transitivePeerDependencies:
- supports-color
dev: true
/@vitejs/plugin-vue@5.0.3(vite@5.1.4)(vue@3.4.19):
/@vitejs/plugin-vue@5.0.3(vite@5.1.4)(vue@3.4.21):
resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
@@ -1669,7 +1669,7 @@ packages:
vue: ^3.2.25
dependencies:
vite: 5.1.4(@types/node@20.11.7)(sass@1.71.1)
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: true
/@volar/language-core@2.1.2:
@@ -1728,19 +1728,10 @@ packages:
'@babel/core': 7.23.9
'@babel/helper-module-imports': 7.22.15
'@babel/helper-plugin-utils': 7.22.5
'@babel/parser': 7.23.9
'@vue/compiler-sfc': 3.4.19
'@babel/parser': 7.24.0
'@vue/compiler-sfc': 3.4.21
dev: true
/@vue/compiler-core@3.4.19:
resolution: {integrity: sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==}
dependencies:
'@babel/parser': 7.23.9
'@vue/shared': 3.4.19
entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.0.2
/@vue/compiler-core@3.4.21:
resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}
dependencies:
@@ -1749,39 +1740,31 @@ packages:
entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.0.2
dev: true
/@vue/compiler-dom@3.4.19:
resolution: {integrity: sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==}
dependencies:
'@vue/compiler-core': 3.4.19
'@vue/shared': 3.4.19
/@vue/compiler-dom@3.4.21:
resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}
dependencies:
'@vue/compiler-core': 3.4.21
'@vue/shared': 3.4.21
dev: true
/@vue/compiler-sfc@3.4.19:
resolution: {integrity: sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==}
/@vue/compiler-sfc@3.4.21:
resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==}
dependencies:
'@babel/parser': 7.23.9
'@vue/compiler-core': 3.4.19
'@vue/compiler-dom': 3.4.19
'@vue/compiler-ssr': 3.4.19
'@vue/shared': 3.4.19
'@babel/parser': 7.24.0
'@vue/compiler-core': 3.4.21
'@vue/compiler-dom': 3.4.21
'@vue/compiler-ssr': 3.4.21
'@vue/shared': 3.4.21
estree-walker: 2.0.2
magic-string: 0.30.7
magic-string: 0.30.8
postcss: 8.4.35
source-map-js: 1.0.2
/@vue/compiler-ssr@3.4.19:
resolution: {integrity: sha512-P0PLKC4+u4OMJ8sinba/5Z/iDT84uMRRlrWzadgLA69opCpI1gG4N55qDSC+dedwq2fJtzmGald05LWR5TFfLw==}
/@vue/compiler-ssr@3.4.21:
resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==}
dependencies:
'@vue/compiler-dom': 3.4.19
'@vue/shared': 3.4.19
'@vue/compiler-dom': 3.4.21
'@vue/shared': 3.4.21
/@vue/devtools-api@6.5.1:
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
@@ -1805,47 +1788,43 @@ packages:
vue-template-compiler: 2.7.16
dev: true
/@vue/reactivity@3.4.19:
resolution: {integrity: sha512-+VcwrQvLZgEclGZRHx4O2XhyEEcKaBi50WbxdVItEezUf4fqRh838Ix6amWTdX0CNb/b6t3Gkz3eOebfcSt+UA==}
/@vue/reactivity@3.4.21:
resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}
dependencies:
'@vue/shared': 3.4.19
'@vue/shared': 3.4.21
/@vue/runtime-core@3.4.19:
resolution: {integrity: sha512-/Z3tFwOrerJB/oyutmJGoYbuoadphDcJAd5jOuJE86THNZji9pYjZroQ2NFsZkTxOq0GJbb+s2kxTYToDiyZzw==}
/@vue/runtime-core@3.4.21:
resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==}
dependencies:
'@vue/reactivity': 3.4.19
'@vue/shared': 3.4.19
'@vue/reactivity': 3.4.21
'@vue/shared': 3.4.21
/@vue/runtime-dom@3.4.19:
resolution: {integrity: sha512-IyZzIDqfNCF0OyZOauL+F4yzjMPN2rPd8nhqPP2N1lBn3kYqJpPHHru+83Rkvo2lHz5mW+rEeIMEF9qY3PB94g==}
/@vue/runtime-dom@3.4.21:
resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==}
dependencies:
'@vue/runtime-core': 3.4.19
'@vue/shared': 3.4.19
'@vue/runtime-core': 3.4.21
'@vue/shared': 3.4.21
csstype: 3.1.3
/@vue/server-renderer@3.4.19(vue@3.4.19):
resolution: {integrity: sha512-eAj2p0c429RZyyhtMRnttjcSToch+kTWxFPHlzGMkR28ZbF1PDlTcmGmlDxccBuqNd9iOQ7xPRPAGgPVj+YpQw==}
/@vue/server-renderer@3.4.21(vue@3.4.21):
resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==}
peerDependencies:
vue: 3.4.19
vue: 3.4.21
dependencies:
'@vue/compiler-ssr': 3.4.19
'@vue/shared': 3.4.19
vue: 3.4.19(typescript@5.4.2)
/@vue/shared@3.4.19:
resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==}
'@vue/compiler-ssr': 3.4.21
'@vue/shared': 3.4.21
vue: 3.4.21(typescript@5.4.2)
/@vue/shared@3.4.21:
resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}
dev: true
/@vueuse/core@10.8.0(vue@3.4.19):
/@vueuse/core@10.8.0(vue@3.4.21):
resolution: {integrity: sha512-G9Ok9fjx10TkNIPn8V1dJmK1NcdJCtYmDRyYiTMUyJ1p0Tywc1zmOoCQ2xhHYyz8ULBU4KjIJQ9n+Lrty74iVw==}
dependencies:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 10.8.0
'@vueuse/shared': 10.8.0(vue@3.4.19)
vue-demi: 0.14.7(vue@3.4.19)
'@vueuse/shared': 10.8.0(vue@3.4.21)
vue-demi: 0.14.7(vue@3.4.21)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -1855,10 +1834,10 @@ packages:
resolution: {integrity: sha512-Nim/Vle5OgXcXhAvGOgkJQXB1Yb+Kq/fMbLuv3YYDYbiQrwr39ljuD4k9fPeq4yUyokYRo2RaNQmbbIMWB/9+w==}
dev: true
/@vueuse/shared@10.8.0(vue@3.4.19):
/@vueuse/shared@10.8.0(vue@3.4.21):
resolution: {integrity: sha512-dUdy6zwHhULGxmr9YUg8e+EnB39gcM4Fe2oKBSrh3cOsV30JcMPtsyuspgFCUo5xxFNaeMf/W2yyKfST7Bg8oQ==}
dependencies:
vue-demi: 0.14.7(vue@3.4.19)
vue-demi: 0.14.7(vue@3.4.21)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -4135,8 +4114,8 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/magic-string@0.30.7:
resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==}
/magic-string@0.30.8:
resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
@@ -4264,13 +4243,13 @@ packages:
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
dev: true
/naive-ui@2.38.1(vue@3.4.19):
/naive-ui@2.38.1(vue@3.4.21):
resolution: {integrity: sha512-AnU1FQ7K/CbhguAX++V4kCFjk7h7RvWt4nvZPRjORMpq+fUIlzD+EcQ5Cv1VqDloNF8+eMv4Akc2Ogacc9S+5A==}
peerDependencies:
vue: ^3.0.0
dependencies:
'@css-render/plugin-bem': 0.15.12(css-render@0.15.12)
'@css-render/vue3-ssr': 0.15.12(vue@3.4.19)
'@css-render/vue3-ssr': 0.15.12(vue@3.4.21)
'@types/katex': 0.16.7
'@types/lodash': 4.14.202
'@types/lodash-es': 4.17.12
@@ -4285,10 +4264,10 @@ packages:
lodash-es: 4.17.21
seemly: 0.3.8
treemate: 0.3.11
vdirs: 0.1.8(vue@3.4.19)
vooks: 0.2.12(vue@3.4.19)
vue: 3.4.19(typescript@5.4.2)
vueuc: 0.4.58(vue@3.4.19)
vdirs: 0.1.8(vue@3.4.21)
vooks: 0.2.12(vue@3.4.21)
vue: 3.4.21(typescript@5.4.2)
vueuc: 0.4.58(vue@3.4.21)
dev: false
/nanoid@3.3.7:
@@ -4593,10 +4572,10 @@ packages:
peerDependencies:
pinia: ^2.0.0
dependencies:
pinia: 2.1.7(typescript@5.4.2)(vue@3.4.19)
pinia: 2.1.7(typescript@5.4.2)(vue@3.4.21)
dev: false
/pinia@2.1.7(typescript@5.4.2)(vue@3.4.19):
/pinia@2.1.7(typescript@5.4.2)(vue@3.4.21):
resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==}
peerDependencies:
'@vue/composition-api': ^1.4.0
@@ -4610,8 +4589,8 @@ packages:
dependencies:
'@vue/devtools-api': 6.5.1
typescript: 5.4.2
vue: 3.4.19(typescript@5.4.2)
vue-demi: 0.14.6(vue@3.4.19)
vue: 3.4.21(typescript@5.4.2)
vue-demi: 0.14.6(vue@3.4.21)
dev: false
/pkg-types@1.0.3:
@@ -5465,7 +5444,7 @@ packages:
dependencies:
'@antfu/utils': 0.7.7
'@rollup/pluginutils': 5.1.0
'@vueuse/core': 10.8.0(vue@3.4.19)
'@vueuse/core': 10.8.0(vue@3.4.21)
fast-glob: 3.3.2
local-pkg: 0.5.0
magic-string: 0.30.5
@@ -5476,7 +5455,7 @@ packages:
- rollup
dev: true
/unplugin-vue-components@0.26.0(vue@3.4.19):
/unplugin-vue-components@0.26.0(vue@3.4.21):
resolution: {integrity: sha512-s7IdPDlnOvPamjunVxw8kNgKNK8A5KM1YpK5j/p97jEKTjlPNrA0nZBiSfAKKlK1gWZuyWXlKL5dk3EDw874LQ==}
engines: {node: '>=14'}
peerDependencies:
@@ -5499,7 +5478,7 @@ packages:
minimatch: 9.0.3
resolve: 1.22.8
unplugin: 1.6.0
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
transitivePeerDependencies:
- rollup
- supports-color
@@ -5549,13 +5528,13 @@ packages:
spdx-expression-parse: 3.0.1
dev: true
/vdirs@0.1.8(vue@3.4.19):
/vdirs@0.1.8(vue@3.4.21):
resolution: {integrity: sha512-H9V1zGRLQZg9b+GdMk8MXDN2Lva0zx72MPahDKc30v+DtwKjfyOSXWRIX4t2mhDubM1H09gPhWeth/BJWPHGUw==}
peerDependencies:
vue: ^3.0.11
dependencies:
evtd: 0.2.4
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: false
/vite@5.1.4(@types/node@20.11.7)(sass@1.71.1):
@@ -5595,16 +5574,16 @@ packages:
fsevents: 2.3.3
dev: true
/vooks@0.2.12(vue@3.4.19):
/vooks@0.2.12(vue@3.4.21):
resolution: {integrity: sha512-iox0I3RZzxtKlcgYaStQYKEzWWGAduMmq+jS7OrNdQo1FgGfPMubGL3uGHOU9n97NIvfFDBGnpSvkWyb/NSn/Q==}
peerDependencies:
vue: ^3.0.0
dependencies:
evtd: 0.2.4
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: false
/vue-demi@0.14.6(vue@3.4.19):
/vue-demi@0.14.6(vue@3.4.21):
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
engines: {node: '>=12'}
hasBin: true
@@ -5616,10 +5595,10 @@ packages:
'@vue/composition-api':
optional: true
dependencies:
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: false
/vue-demi@0.14.7(vue@3.4.19):
/vue-demi@0.14.7(vue@3.4.21):
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
engines: {node: '>=12'}
hasBin: true
@@ -5631,7 +5610,7 @@ packages:
'@vue/composition-api':
optional: true
dependencies:
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: true
/vue-draggable-plus@0.3.5(@types/sortablejs@1.15.8):
@@ -5664,13 +5643,13 @@ packages:
- supports-color
dev: true
/vue-router@4.3.0(vue@3.4.19):
/vue-router@4.3.0(vue@3.4.21):
resolution: {integrity: sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.5.1
vue: 3.4.19(typescript@5.4.2)
vue: 3.4.21(typescript@5.4.2)
dev: false
/vue-template-compiler@2.7.16:
@@ -5692,34 +5671,34 @@ packages:
typescript: 5.4.2
dev: true
/vue@3.4.19(typescript@5.4.2):
resolution: {integrity: sha512-W/7Fc9KUkajFU8dBeDluM4sRGc/aa4YJnOYck8dkjgZoXtVsn3OeTGni66FV1l3+nvPA7VBFYtPioaGKUmEADw==}
/vue@3.4.21(typescript@5.4.2):
resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@vue/compiler-dom': 3.4.19
'@vue/compiler-sfc': 3.4.19
'@vue/runtime-dom': 3.4.19
'@vue/server-renderer': 3.4.19(vue@3.4.19)
'@vue/shared': 3.4.19
'@vue/compiler-dom': 3.4.21
'@vue/compiler-sfc': 3.4.21
'@vue/runtime-dom': 3.4.21
'@vue/server-renderer': 3.4.21(vue@3.4.21)
'@vue/shared': 3.4.21
typescript: 5.4.2
/vueuc@0.4.58(vue@3.4.19):
/vueuc@0.4.58(vue@3.4.21):
resolution: {integrity: sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==}
peerDependencies:
vue: ^3.0.11
dependencies:
'@css-render/vue3-ssr': 0.15.12(vue@3.4.19)
'@css-render/vue3-ssr': 0.15.12(vue@3.4.21)
'@juggle/resize-observer': 3.4.0
css-render: 0.15.12
evtd: 0.2.4
seemly: 0.3.8
vdirs: 0.1.8(vue@3.4.19)
vooks: 0.2.12(vue@3.4.19)
vue: 3.4.19(typescript@5.4.2)
vdirs: 0.1.8(vue@3.4.21)
vooks: 0.2.12(vue@3.4.21)
vue: 3.4.21(typescript@5.4.2)
dev: false
/wcwidth@1.0.1:

View File

@@ -7,7 +7,7 @@
},
"package": {
"productName": "HuLa-IM-Tauri",
"version": "1.2.8-alpha"
"version": "1.2.9-alpha"
},
"tauri": {
"allowlist": {

View File

@@ -92,6 +92,12 @@ const themeOverrides: GlobalThemeOverrides = {
},
Popover: {
padding: '5px'
},
Dropdown: {
borderRadius: '8px'
},
Avatar: {
border: '1px solid #fff'
}
}

View File

@@ -1,15 +1,78 @@
<template>
<!-- 好友详情 -->
<div class="flex flex-col items-center mt-60px gap-20px">
<div v-if="item.type === RoomTypeEnum.SINGLE" class="flex flex-col items-center mt-60px gap-30px select-none">
<n-image width="146px" height="146px" class="rounded-50%" :src="item.avatar" alt="" />
<span class="text-20px">{{ item.accountName }}</span>
<span class="text-14px color-#909090">这个人很高冷,暂时没有留下什么</span>
<n-flex align="center" justify="space-between" :size="30" class="color-#606060">
<span>性别</span>
<span>电话13213213213</span>
</n-flex>
<!-- 选项按钮 -->
<n-flex align="center" justify="space-between" :size="60">
<n-icon-wrapper
v-for="(item, index) in footerOptions"
:key="index"
@click="() => item.click()"
class="cursor-pointer"
:size="28"
:border-radius="10"
:color="'rgba(5, 150, 105, 0.8)'">
<n-icon :size="20">
<svg><use :href="item.url"></use></svg>
</n-icon>
</n-icon-wrapper>
</n-flex>
</div>
<div>{{ item }}</div>
<!-- 群聊详情 -->
<div v-else class="flex flex-col flex-1 mt-60px gap-30px select-none p-[0_40px] box-border">
<!-- 群聊头像以及简介 -->
<n-flex align="center" justify="space-between">
<n-flex align="center">
<n-image width="120px" height="120px" class="rounded-50%" :src="item.avatar" alt="" />
<n-flex vertical :size="16" justify="space-between" class="text-14px color-#909090">
<span class="text-16px color-[--text-color]">{{ item.accountName }}</span>
<span>群号1235873897182</span>
<span>创建时间2021-01-01</span>
</n-flex>
</n-flex>
<n-icon-wrapper class="cursor-pointer" :size="40" :border-radius="10" :color="'rgba(5, 150, 105, 0.8)'">
<n-icon :size="22">
<svg><use href="#message"></use></svg>
</n-icon>
</n-icon-wrapper>
</n-flex>
<n-space vertical :size="20">
<span>群成员({{ options.length }})</span>
<n-avatar-group :options="options" :size="40" :max="4">
<template #avatar="{ option: { name, src } }">
<n-tooltip>
<template #trigger>
<n-avatar :src="src" />
</template>
{{ name }}
</n-tooltip>
</template>
<template #rest="{ options: restOptions, rest }">
<n-dropdown :options="createDropdownOptions(restOptions)" placement="top">
<n-avatar :color="'#52aea3'">+{{ rest }}</n-avatar>
</n-dropdown>
</template>
</n-avatar-group>
</n-space>
</div>
</template>
<script setup lang="ts">
import { MockItem } from '@/services/types.ts'
import { RoomTypeEnum } from '@/enums'
const props = defineProps<{
content: any[]
@@ -18,6 +81,60 @@ const { content } = toRefs(props)
const item = computed<MockItem>(() => {
return content.value[0]
})
type FooterOption = {
url: string
click: (...args: any[]) => void
}
const footerOptions = ref<FooterOption[]>([
{
url: '#message',
click: () => {
console.log(123)
}
},
{
url: '#phone-telephone',
click: () => {
console.log(123)
}
},
{
url: '#video-one',
click: () => {
console.log(123)
}
}
])
const options = [
{
name: '张三',
src: 'https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg'
},
{
name: '李四',
src: 'https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg'
},
{
name: '王五',
src: 'https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg'
},
{
name: '赵六',
src: 'https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg'
},
{
name: '七仔',
src: 'https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg'
}
]
const createDropdownOptions = (options: Array<{ name: string; src: string }>) => {
return options.map((option) => ({
key: option.name,
label: option.name
}))
}
</script>
<style scoped></style>

View File

@@ -28,7 +28,7 @@
<div
class="flex flex-col gap-8px color-[--text-color]"
:class="item.accountId === userId ? 'items-end mr-10px' : ''">
<span class="text-13px select-none" v-if="activeItem.type === RoomTypeEnum.GROUP">
<span class="text-12px select-none color-#909090" v-if="activeItem.type === RoomTypeEnum.GROUP">
{{ item.accountId === userId ? item.value : activeItem.accountName }}
</span>
<!-- 右键菜单及其气泡样式 -->
@@ -137,6 +137,14 @@ import { VirtualListInst } from 'naive-ui'
const activeBubble = ref(-1)
const userId = ref(10086)
const copyright = ref('-HuLa©-版权所有')
const copyrightComputed = computed(() => {
const copy = (index: number) => {
items.value[index].content.endsWith(copyright.value)
? navigator.clipboard.writeText(items.value[index].content)
: navigator.clipboard.writeText(items.value[index].content + copyright.value)
}
return { copy }
})
/* 提醒框标题 */
const tips = ref()
const modalShow = ref(false)
@@ -188,7 +196,7 @@ const menuList = ref<Menu>([
icon: 'copy',
click: (index: number) => {
// 复制内容到剪贴板
navigator.clipboard.writeText(items.value[index].content + copyright.value)
copyrightComputed.value.copy(index)
}
},
{
@@ -265,7 +273,7 @@ const handleMsgClick = (item: any) => {
// 启用键盘监听
const handleKeyPress = (e: KeyboardEvent) => {
if (e.ctrlKey && e.key === 'c') {
navigator.clipboard.writeText(items.value[item.key].content + copyright.value)
copyrightComputed.value.copy(item.key)
// 取消监听键盘事件,以免多次绑定
document.removeEventListener('keydown', handleKeyPress)
}
@@ -308,7 +316,7 @@ const handleSendMessage = (msg: any) => {
const addToDomUpdateQueue = (index: number, id: number) => {
// 使用 nextTick 确保虚拟列表渲染完最新的项目后进行滚动
nextTick(() => {
if (!floatFooter.value) {
if (!floatFooter.value || id === userId.value) {
virtualListInst.value?.scrollTo({ position: 'bottom' })
}
/* data-key标识的气泡,添加前缀用于区分用户消息,不然气泡动画会被覆盖 */

View File

@@ -35,8 +35,11 @@
</svg>
</div>
<svg @click="settingShow = !settingShow" class="more w-22px h-22px relative">
<use href="#hamburger-button"></use>
<svg
@click="settingShow = !settingShow"
class="more w-22px h-22px relative"
:class="{ 'color-#059669': settingShow }">
<use :href="settingShow ? '#hamburger-button-action' : '#hamburger-button'"></use>
</svg>
<!-- 更多选项面板 -->
@@ -211,7 +214,7 @@ const openContent = (title: string, label: string) => {
}
const closeMenu = (event: any) => {
if (!event.target.matches('.setting-item, .more')) {
if (!event.target.matches('.setting-item, .more, .more *')) {
settingShow.value = false
}
}

View File

@@ -17,6 +17,5 @@ export const alwaysOnTop = defineStore('alwaysOnTop', {
getWindowTop(key: string) {
return this.$state[key]
}
},
persist: true
}
})

View File

@@ -1,5 +1,10 @@
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { createPersistedState } from 'pinia-plugin-persistedstate'
export const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 默认开启持久化存储
pinia.use(
createPersistedState({
auto: true
})
)

View File

@@ -2,20 +2,17 @@ import { defineStore } from 'pinia'
import { ThemeEnum } from '@/enums'
export const theme = defineStore('theme', {
state: () => {
return {
/* 主题 */
THEME: 'light',
/* 选中的主题模式 */
PATTERN: 'light'
}
},
state: () => ({
/* 主题 */
THEME: '',
/* 选中的主题模式 */
PATTERN: ''
}),
actions: {
initTheme(theme: string) {
this.THEME = theme
document.documentElement.dataset.theme = theme
this.PATTERN = theme
localStorage.setItem('theme', JSON.stringify({ THEME: theme, PATTERN: theme }))
},
toggleTheme(theme: string) {
if (theme === ThemeEnum.OS) {
@@ -29,7 +26,5 @@ export const theme = defineStore('theme', {
this.PATTERN = theme
}
}
},
//开启数据持久化
persist: true
}
})

View File

@@ -30,7 +30,5 @@ export const userStore = defineStore('localUserInfo', {
//删除localStorage中的用户信息
localStorage.removeItem('localUserInfo')
}
},
//开启数据持久化
persist: true
}
})

View File

@@ -1,9 +1,9 @@
/*! 可以根据自己的喜好搭配渐变网址https://webgradients.com/ */
.login-box {
background-color: rgb(216, 238, 226);
background-color: #d8eee2;
background-image:
radial-gradient(closest-side, #30cfd0, rgba(235, 105, 78, 0)),
radial-gradient(closest-side, rgb(82, 174, 163), rgba(243, 11, 164, 0)),
radial-gradient(closest-side, #52aea3, rgba(243, 11, 164, 0)),
radial-gradient(closest-side, #fff1eb, rgba(254, 234, 131, 0)),
radial-gradient(closest-side, #fed6e3, rgba(170, 142, 245, 0)),
radial-gradient(closest-side, #a8edea, rgba(248, 192, 147, 0));

View File

@@ -37,7 +37,7 @@
</template>
</n-input>
<!-- 账号选择框 -->
<!-- 账号选择框 TODO 尝试使用n-popover组件来实现这个功能 (nyh -> 2024-03-09 02:56:06)-->
<div
style="border: 1px solid rgba(70, 70, 70, 0.1)"
v-if="accountOption.length > 0 && arrowStatus"