From 0b1be2d78701c22324998e1f044e9cfa649fab34 Mon Sep 17 00:00:00 2001 From: ayangweb <75017711+ayangweb@users.noreply.github.com> Date: Fri, 25 Apr 2025 22:38:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E6=96=B0=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=81=8F=E5=A5=BD=E8=AE=BE=E7=BD=AE=20UI=20(#89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.ts | 1 + package.json | 1 + pnpm-lock.yaml | 3 + public/models/keyboard/cat.model3.json | 24 ++--- public/models/standard/cat.model3.json | 19 ++-- src-tauri/tauri.conf.json | 2 - src/components/pro-list-item/index.vue | 12 ++- src/components/pro-list/index.vue | 16 +++- src/components/update-app/index.vue | 16 +++- src/composables/useModel.ts | 19 +++- src/constants/index.ts | 1 + src/layouts/preference/index.vue | 35 ------- src/pages/main/index.vue | 13 ++- src/pages/model/index.vue | 6 -- .../components}/about/index.vue | 22 ++++- .../{ => preference/components}/cat/index.vue | 21 +++- .../components}/general/index.vue | 0 .../preference/components/model/index.vue | 7 ++ src/pages/preference/index.vue | 96 +++++++++++++++++++ src/router/index.ts | 41 +------- src/stores/model.ts | 8 +- src/utils/live2d.ts | 10 +- 22 files changed, 234 insertions(+), 139 deletions(-) delete mode 100644 src/layouts/preference/index.vue delete mode 100644 src/pages/model/index.vue rename src/pages/{ => preference/components}/about/index.vue (69%) rename src/pages/{ => preference/components}/cat/index.vue (69%) rename src/pages/{ => preference/components}/general/index.vue (100%) create mode 100644 src/pages/preference/components/model/index.vue create mode 100644 src/pages/preference/index.vue diff --git a/eslint.config.ts b/eslint.config.ts index 85a325a..7b311f3 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -21,6 +21,7 @@ export default antfu({ }, ], 'vue/attributes-order': ['error', { alphabetical: true }], + 'vue/max-attributes-per-line': 'error', }, ignores: ['**/*.toml'], }) diff --git a/package.json b/package.json index c9bdeac..2bd64ea 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "release": "release-it" }, "dependencies": { + "@ant-design/icons-vue": "^7.0.1", "@tauri-apps/api": "^2.5.0", "@tauri-apps/plugin-log": "~2.3.1", "@tauri-apps/plugin-opener": "~2.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98a2334..22050cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,9 @@ importers: .: dependencies: + '@ant-design/icons-vue': + specifier: ^7.0.1 + version: 7.0.1(vue@3.5.13(typescript@5.6.3)) '@tauri-apps/api': specifier: ^2.5.0 version: 2.5.0 diff --git a/public/models/keyboard/cat.model3.json b/public/models/keyboard/cat.model3.json index 5404d72..47ca5ed 100755 --- a/public/models/keyboard/cat.model3.json +++ b/public/models/keyboard/cat.model3.json @@ -10,40 +10,30 @@ "DisplayInfo": "demomodel2.cdi3.json", "Expressions": [ { - "Name": "live2d_expression0.exp3.json", + "Name": "默认喵", "File": "live2d_expression0.exp3.json" }, { - "Name": "live2d_expression1.exp3.json", - "File": "live2d_expression1.exp3.json" + "Name": "社会喵", + "File": "live2d_expression1.exp3.json", + "Description": "喵喵我叼根小烟,耍个帅气俏皮的wink~超有范儿!但直播里用这招,怕是会让铲屎官和平台瞪大眼,本喵还是低调点,偷偷耍酷好啦!" }, { - "Name": "live2d_expression2.exp3.json", + "Name": "天使喵", "File": "live2d_expression2.exp3.json" } ], "Motions": { "CAT_motion": [ { + "Name": "雷霆喵", "File": "live2d_motion1.motion3.json", "Sound": "live2d_motion1.flac", "FadeInTime": 0, "FadeOutTime": 0 }, { - "File": "live2d_motion2.motion3.json", - "FadeInTime": 0, - "FadeOutTime": 0 - } - ], - "CAT_motion_lock": [ - { - "File": "live2d_motion1.motion3.json", - "Sound": "live2d_motion1.flac", - "FadeInTime": 0, - "FadeOutTime": 0 - }, - { + "Name": "摇摆喵", "File": "live2d_motion2.motion3.json", "FadeInTime": 0, "FadeOutTime": 0 diff --git a/public/models/standard/cat.model3.json b/public/models/standard/cat.model3.json index 26e6370..8b534d9 100755 --- a/public/models/standard/cat.model3.json +++ b/public/models/standard/cat.model3.json @@ -10,34 +10,31 @@ "DisplayInfo": "demomodel.cdi3.json", "Expressions": [ { - "Key": "", - "Name": "去掉表情", + "Name": "默认喵", "File": "live2d_expression0.exp3.json" }, { - "Key": "", - "Name": "戴上墨镜", - "File": "live2d_expression1.exp3.json" + "Name": "社会喵", + "File": "live2d_expression1.exp3.json", + "Description": "喵喵我叼根小烟,耍个帅气俏皮的wink~超有范儿!但直播里用这招,怕是会让铲屎官和平台瞪大眼,本喵还是低调点,偷偷耍酷好啦!" + }, { - "Key": "", - "Name": "升天", + "Name": "天使喵", "File": "live2d_expression2.exp3.json" } ], "Motions": { "CAT_motion": [ { - "Key": "", - "Name": "打雷", + "Name": "雷霆喵", "File": "live2d_motion1.motion3.json", "Sound": "live2d_motion1.flac", "FadeInTime": 0, "FadeOutTime": 0 }, { - "Key": "", - "Name": "左手摇摆", + "Name": "摇摆喵", "File": "live2d_motion2.motion3.json", "FadeInTime": 0, "FadeOutTime": 0 diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index fde1ae0..3d39625 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -31,8 +31,6 @@ "label": "preference", "title": "偏好设置", "url": "index.html/#/preference", - "width": 600, - "height": 450, "visible": false, "resizable": false, "maximizable": false, diff --git a/src/components/pro-list-item/index.vue b/src/components/pro-list-item/index.vue index b3a29f7..b1b5ee2 100644 --- a/src/components/pro-list-item/index.vue +++ b/src/components/pro-list-item/index.vue @@ -22,17 +22,23 @@ const hasDescription = computed(() => {