From 89e94b7837c362ae1812d6e3ec61b33993ee596d Mon Sep 17 00:00:00 2001
From: ayangweb <473033518@qq.com>
Date: Tue, 14 Apr 2026 20:12:41 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E3=80=8C=E7=8C=AB?=
=?UTF-8?q?=E5=92=AA=E8=AE=BE=E7=BD=AE=20>=20=E6=A8=A1=E5=9E=8B=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=20>=20=E5=8D=95=E9=94=AE=E6=A8=A1=E5=BC=8F=E3=80=8D?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/composables/useModel.ts | 19 +++++++------------
src/locales/en-US.json | 2 --
src/locales/pt-BR.json | 2 --
src/locales/vi-VN.json | 2 --
src/locales/zh-CN.json | 2 --
src/locales/zh-TW.json | 2 --
src/pages/preference/components/cat/index.vue | 7 -------
src/stores/cat.ts | 6 ------
8 files changed, 7 insertions(+), 35 deletions(-)
diff --git a/src/composables/useModel.ts b/src/composables/useModel.ts
index 7ee53d7e..274a24e0 100644
--- a/src/composables/useModel.ts
+++ b/src/composables/useModel.ts
@@ -5,7 +5,7 @@ import { resolveResource, sep } from '@tauri-apps/api/path'
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
import { message } from 'ant-design-vue'
import { isNil, round } from 'es-toolkit'
-import { nth } from 'es-toolkit/compat'
+import { findKey, nth } from 'es-toolkit/compat'
import { ref } from 'vue'
import live2d from '../utils/live2d'
@@ -141,18 +141,13 @@ export function useModel() {
if (!path) return
- if (catStore.model.single) {
- const dirName = nth(path.split(sep()), -2)!
+ const dirName = nth(path.split(sep()), -2)!
+ const prevKey = findKey(modelStore.pressedKeys, (value) => {
+ return value.includes(dirName)
+ })
- const filterKeys = Object.entries(modelStore.pressedKeys).filter(
- ([, value]) => {
- return value.includes(dirName)
- },
- )
-
- for (const [key] of filterKeys) {
- handleRelease(key)
- }
+ if (prevKey) {
+ handleRelease(prevKey)
}
modelStore.pressedKeys[key] = path
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index f0d3d9c4..51b7c16a 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -12,7 +12,6 @@
"labels": {
"modelSettings": "Model Settings",
"mirrorMode": "Mirror Mode",
- "singleMode": "Single Key Mode",
"mouseMirror": "Mouse Mirror",
"windowSettings": "Window Settings",
"passThrough": "Pass Through",
@@ -28,7 +27,6 @@
},
"hints": {
"mirrorMode": "When enabled, the model will be mirrored horizontally.",
- "singleMode": "When enabled, only the last pressed key is displayed for each hand.",
"mouseMirror": "When enabled, the mouse will mirror the hand movement.",
"motionSound": "When enabled, the model will play corresponding sound effects when performing actions (if they exist).",
"behavior": "When enabled, motions and expressions can be configured and triggered.",
diff --git a/src/locales/pt-BR.json b/src/locales/pt-BR.json
index dacd012c..abaa94f6 100644
--- a/src/locales/pt-BR.json
+++ b/src/locales/pt-BR.json
@@ -12,7 +12,6 @@
"labels": {
"modelSettings": "Configurações do Modelo",
"mirrorMode": "Modo Espelho",
- "singleMode": "Mostrar Apenas Última Tecla",
"mouseMirror": "Espelho do Mouse",
"windowSettings": "Configurações da Janela",
"passThrough": "Janela Transparente",
@@ -28,7 +27,6 @@
},
"hints": {
"mirrorMode": "Quando ativado, o modelo será invertido horizontalmente.",
- "singleMode": "Quando ativado, apenas a última tecla pressionada em cada mão é exibida (evita mostrar múltiplas mãos ao pressionar várias teclas ao mesmo tempo).",
"mouseMirror": "Quando ativado, o mouse espelhará o movimento da mão.",
"motionSound": "Quando ativado, o modelo reproduzirá efeitos sonoros correspondentes ao executar ações (se existirem).",
"behavior": "Quando ativado, movimentos e expressões podem ser configurados e acionados.",
diff --git a/src/locales/vi-VN.json b/src/locales/vi-VN.json
index 676a0f90..3211827a 100644
--- a/src/locales/vi-VN.json
+++ b/src/locales/vi-VN.json
@@ -12,7 +12,6 @@
"labels": {
"modelSettings": "Cài đặt Mô hình",
"mirrorMode": "Chế độ gương",
- "singleMode": "Chỉ hiển thị phím cuối cùng",
"mouseMirror": "Phản chiếu chuột",
"windowSettings": "Cài đặt Cửa sổ",
"passThrough": "Click xuyên",
@@ -28,7 +27,6 @@
},
"hints": {
"mirrorMode": "Bật để lật ngang mô hình.",
- "singleMode": "Khi bật, mỗi tay mèo chỉ hiển thị phím vừa nhấn cuối cùng (tránh hiện nhiều tay khi nhấn nhiều phím cùng lúc).",
"mouseMirror": "Khi bật, chuột của mô hình sẽ phản chiếu theo chuyển động chuột thực tế.",
"motionSound": "Khi bật, mô hình sẽ phát các âm thanh tương ứng khi thực hiện hành động (nếu tồn tại).",
"behavior": "Khi bật, các hành động và biểu cảm có thể được cấu hình và kích hoạt.",
diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json
index 29ab7a3a..bea8316b 100644
--- a/src/locales/zh-CN.json
+++ b/src/locales/zh-CN.json
@@ -12,7 +12,6 @@
"labels": {
"modelSettings": "模型设置",
"mirrorMode": "镜像模式",
- "singleMode": "单键模式",
"mouseMirror": "鼠标镜像",
"windowSettings": "窗口设置",
"passThrough": "窗口穿透",
@@ -28,7 +27,6 @@
},
"hints": {
"mirrorMode": "启用后,模型将水平镜像翻转。",
- "singleMode": "启用后,每只手只显示最后按下的一个按键。",
"mouseMirror": "启用后,鼠标将镜像跟随手部移动。",
"motionSound": "启用后,模型执行动作时会播放对应音效(如果存在)。",
"behavior": "启用后,可以配置和触发模型的动作与表情。",
diff --git a/src/locales/zh-TW.json b/src/locales/zh-TW.json
index 210671d2..76129f7c 100644
--- a/src/locales/zh-TW.json
+++ b/src/locales/zh-TW.json
@@ -12,7 +12,6 @@
"labels": {
"modelSettings": "模型設定",
"mirrorMode": "鏡像模式",
- "singleMode": "單鍵模式",
"mouseMirror": "滑鼠游標鏡像",
"windowSettings": "視窗設定",
"passThrough": "視窗穿透",
@@ -28,7 +27,6 @@
},
"hints": {
"mirrorMode": "啟用後,模型將水平鏡像翻轉。",
- "singleMode": "啟用後,每隻手只顯示最後按下的一個按鍵。",
"mouseMirror": "啟用後,滑鼠游標將鏡像跟隨手部移動。",
"motionSound": "啟用後,模型執行動作時會播放對應音效(如果存在)。",
"behavior": "啟用後,可以配置和觸發模型的動作與表情。",
diff --git a/src/pages/preference/components/cat/index.vue b/src/pages/preference/components/cat/index.vue
index 58be4644..211f6761 100644
--- a/src/pages/preference/components/cat/index.vue
+++ b/src/pages/preference/components/cat/index.vue
@@ -18,13 +18,6 @@ const catStore = useCatStore()
-
-
-
-
{
/** @deprecated 请使用 `model.mirror` */
const mirrorMode = ref(false)
- /** @deprecated 请使用 `model.single` */
- const singleMode = ref(false)
-
/** @deprecated 请使用 `model.mouseMirror` */
const mouseMirror = ref(false)
@@ -51,7 +47,6 @@ export const useCatStore = defineStore('cat', () => {
const model = reactive({
mirror: false,
- single: false,
mouseMirror: false,
motionSound: true,
behavior: true,
@@ -73,7 +68,6 @@ export const useCatStore = defineStore('cat', () => {
if (migrated.value) return
model.mirror = mirrorMode.value
- model.single = singleMode.value
model.mouseMirror = mouseMirror.value
window.visible = true