From 3bb71df47e421331553a63c8a4367886c709c10d Mon Sep 17 00:00:00 2001 From: AkiChase <1003019131@qq.com> Date: Mon, 17 Mar 2025 16:11:51 +0800 Subject: [PATCH] feat(sidebar): add tooltip for sidebar button --- src/App.vue | 2 +- src/components/Sidebar.vue | 209 -------------------------- src/components/sidebar/FuncButton.vue | 40 +++++ src/components/sidebar/ModuleNav.vue | 63 ++++++++ src/components/sidebar/Sidebar.vue | 154 +++++++++++++++++++ src/i18n/en-US.json | 15 +- src/i18n/zh-CN.json | 15 +- 7 files changed, 286 insertions(+), 212 deletions(-) delete mode 100644 src/components/Sidebar.vue create mode 100644 src/components/sidebar/FuncButton.vue create mode 100644 src/components/sidebar/ModuleNav.vue create mode 100644 src/components/sidebar/Sidebar.vue diff --git a/src/App.vue b/src/App.vue index 13aedf4..18d8b43 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ - - - - diff --git a/src/components/sidebar/FuncButton.vue b/src/components/sidebar/FuncButton.vue new file mode 100644 index 0000000..39f7098 --- /dev/null +++ b/src/components/sidebar/FuncButton.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/src/components/sidebar/ModuleNav.vue b/src/components/sidebar/ModuleNav.vue new file mode 100644 index 0000000..7aa616c --- /dev/null +++ b/src/components/sidebar/ModuleNav.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/components/sidebar/Sidebar.vue b/src/components/sidebar/Sidebar.vue new file mode 100644 index 0000000..e77d1de --- /dev/null +++ b/src/components/sidebar/Sidebar.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index 3bb4085..9fddc9d 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -282,7 +282,20 @@ } }, "sidebar": { - "noControledDevice": "No devices are controlled" + "noControledDevice": "No devices are controlled", + "tip": { + "mask": "Mask", + "device": "Device", + "keyboard": "Key mapping", + "setting": "Setting", + "screenPowerModeOff": "Screen off", + "screenPowerModeOn": "Screen on", + "volumeUp": "Volume up", + "volumeDown": "Volume down", + "back": "Back", + "home": "Home", + "appSwitch": "App switch" + } }, "websocket": { "open": "Connected to external control server", diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index fb394a0..2868a33 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -282,7 +282,20 @@ } }, "sidebar": { - "noControledDevice": "未控制任何设备" + "noControledDevice": "未控制任何设备", + "tip": { + "mask": "蒙版", + "device": "设备", + "keyboard": "按键映射", + "setting": "设置", + "screenPowerModeOff": "息屏", + "screenPowerModeOn": "亮屏", + "volumeUp": "增加音量", + "volumeDown": "减少音量", + "back": "返回", + "home": "主页", + "appSwitch": "最近任务" + } }, "websocket": { "open": "已连接到外部控制服务端",