feat(i18n): add new translation entries (#409)
* feat(i18n): add internationalization support * chore: Deleted the redundant 'useLogin copy.ts' file * feat(i18n): add new translation entries
This commit is contained in:
15
locales/en/home.json
vendored
Normal file
15
locales/en/home.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"search_suggestions": "Search Suggestions",
|
||||
"search_guide": "Search in the search box",
|
||||
"no_search_results": "No relevant results found",
|
||||
"search_result": "Search Results",
|
||||
"search_history": "History",
|
||||
"search_input_placeholder": "Search",
|
||||
"clear_search_history": "Clear",
|
||||
"action": {
|
||||
"message": "Hula",
|
||||
"message_short_title": "Messages",
|
||||
"contact": "Contacts",
|
||||
"contact_short_title": "Contacts"
|
||||
}
|
||||
}
|
||||
2
locales/en/login.json
vendored
2
locales/en/login.json
vendored
@@ -4,7 +4,7 @@
|
||||
"default": "Login",
|
||||
"network_error": "Network Error"
|
||||
},
|
||||
"qr_code": "Login with QR Code"
|
||||
"qr_code": "QR Code"
|
||||
},
|
||||
"input": {
|
||||
"account": {
|
||||
|
||||
20
locales/en/menu.json
vendored
20
locales/en/menu.json
vendored
@@ -3,5 +3,23 @@
|
||||
"lock_screen": "Lock Screen",
|
||||
"settings": "Settings",
|
||||
"about": "About",
|
||||
"sign_out": "Sign Out"
|
||||
"sign_out": "Sign Out",
|
||||
"select": "Select",
|
||||
"add_sticker": "Add Sticker",
|
||||
"forward": "Forward",
|
||||
"reply": "Reply",
|
||||
"recall": "Recall",
|
||||
"copy": "Copy",
|
||||
"save_as": "Save as",
|
||||
"show_in_finder": "Show in Finder",
|
||||
"show_in_folder": "Show in Folder",
|
||||
"translate": "Translate",
|
||||
"del": "Delete",
|
||||
"preview": "Preview",
|
||||
"send_message": "Send Message",
|
||||
"get_user_info": "Peek",
|
||||
"modify_group_nickname": "My Alias in Group",
|
||||
"add_friend": "Add Friend",
|
||||
"report": "Report",
|
||||
"ctx_menu_more": "More"
|
||||
}
|
||||
|
||||
40
locales/en/setting.json
vendored
40
locales/en/setting.json
vendored
@@ -54,5 +54,45 @@
|
||||
"message_ring": "Ring",
|
||||
"message_unblocked": "Unblocked"
|
||||
},
|
||||
"shortcut": {
|
||||
"title": "Shortcuts",
|
||||
"global_shortcut_title": "Global",
|
||||
"enable_global_shortcuts": "Enable Global Shortcuts",
|
||||
"enable_global_shortcuts_hint": "After closing, all shortcuts below will be disabled.",
|
||||
"function_shortcut_title": "Function",
|
||||
"message_title": "Message",
|
||||
"screenshot": "Screenshot",
|
||||
"screenshot_hint": "Press the shortcut key to capture",
|
||||
"panel_switch": "Main panel switch",
|
||||
"panel_switch_hint": "Press the shortcut key to switch the main panel",
|
||||
"message_shortcut": "Message",
|
||||
"send_message_shortcut": "Send Message",
|
||||
"send_message_shortcut_hint": "Press the shortcut key to send a message",
|
||||
"send_message_shortcut_option": "Press {key} to send",
|
||||
"unbound": "Unbound",
|
||||
"bound": "Bound",
|
||||
"reset": "Reset",
|
||||
"shortcut_update_result": "{name} has been updated",
|
||||
"shortcut_setting_failed": "{name} setting failed",
|
||||
"global_enable": "Global shortcuts enabled",
|
||||
"global_disable": "Global shortcuts disabled",
|
||||
"global_toggle_failed": "Failed to set the global shortcut toggle",
|
||||
"send_message_updated": "Send message shortcut updated",
|
||||
"send_message_failed": "Send message shortcut failed"
|
||||
},
|
||||
"storage": {
|
||||
"title": "Storage",
|
||||
"file_scan_progress": "Scanning Progress",
|
||||
"usage": "File Scan Progress",
|
||||
"used_space": "Used Space",
|
||||
"app_used_space": "Hula Data",
|
||||
"free_space": "Free Space",
|
||||
"directory": "Directory",
|
||||
"curr_dir": "Current directory"
|
||||
},
|
||||
"theme": {
|
||||
"title": "Theme",
|
||||
"restore_default": "Restore"
|
||||
},
|
||||
"unknow": "Unknow"
|
||||
}
|
||||
|
||||
15
locales/zh-CN/home.json
vendored
Normal file
15
locales/zh-CN/home.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"search_suggestions": "建议",
|
||||
"search_guide": "在搜索框内搜索",
|
||||
"no_search_results": "未找到相关结果",
|
||||
"search_result": "搜索结果",
|
||||
"search_history": "历史记录",
|
||||
"search_input_placeholder": "搜索",
|
||||
"clear_search_history": "清空",
|
||||
"action": {
|
||||
"message": "Hula",
|
||||
"message_short_title": "消息",
|
||||
"contact": "好友列表",
|
||||
"contact_short_title": "好友"
|
||||
}
|
||||
}
|
||||
20
locales/zh-CN/menu.json
vendored
20
locales/zh-CN/menu.json
vendored
@@ -3,5 +3,23 @@
|
||||
"lock_screen": "锁定屏幕",
|
||||
"settings": "设置",
|
||||
"about": "关于",
|
||||
"sign_out": "退出登录"
|
||||
"sign_out": "退出登录",
|
||||
"select": "选择",
|
||||
"add_sticker": "添加表情",
|
||||
"forward": "转发",
|
||||
"reply": "回复",
|
||||
"recall": "撤回",
|
||||
"copy": "复制",
|
||||
"save_as": "另存为",
|
||||
"show_in_finder": "在 Finder 中显示",
|
||||
"show_in_folder": "在文件夹中显示",
|
||||
"translate": "翻译",
|
||||
"del": "删除",
|
||||
"preview": "预览",
|
||||
"send_message": "发送消息",
|
||||
"get_user_info": "查看信息",
|
||||
"modify_group_nickname": "修改在群昵称",
|
||||
"add_friend": "添加好友",
|
||||
"report": "举报",
|
||||
"ctx_menu_more": "更多"
|
||||
}
|
||||
|
||||
40
locales/zh-CN/setting.json
vendored
40
locales/zh-CN/setting.json
vendored
@@ -54,5 +54,45 @@
|
||||
"message_ring": "响铃",
|
||||
"message_unblocked": "已取消屏蔽"
|
||||
},
|
||||
"shortcut": {
|
||||
"title": "快捷键",
|
||||
"global_shortcut_title": "全局",
|
||||
"enable_global_shortcuts": "启用全局快捷键",
|
||||
"enable_global_shortcuts_hint": "关闭后,下方所有快捷键将失效。",
|
||||
"function_shortcut_title": "功能",
|
||||
"message_title": "Message",
|
||||
"screenshot": "截图",
|
||||
"screenshot_hint": "按快捷键进行截图",
|
||||
"panel_switch": "主面板切换",
|
||||
"panel_switch_hint": "按快捷键切换主面板",
|
||||
"message_shortcut": "消息",
|
||||
"send_message_shortcut": "发送消息",
|
||||
"send_message_shortcut_hint": "按快捷键发送消息",
|
||||
"send_message_shortcut_option": "按 {key} 键发送消息",
|
||||
"unbound": "未绑定",
|
||||
"bound": "已绑定",
|
||||
"reset": "重置",
|
||||
"shortcut_update_result": "{name} 已更新",
|
||||
"shortcut_setting_failed": "{name} 设置失败",
|
||||
"global_enable": "全局快捷键已开启",
|
||||
"global_disable": "全局快捷键已关闭",
|
||||
"global_toggle_failed": "全局快捷键开关设置失败",
|
||||
"send_message_updated": "发送消息快捷键已更新",
|
||||
"send_message_failed": "发送消息快捷键设置失败"
|
||||
},
|
||||
"storage": {
|
||||
"title": "存储",
|
||||
"file_scan_progress": "扫描文件中",
|
||||
"usage": "扫描文件占比",
|
||||
"used_space": "已用空间",
|
||||
"app_used_space": "Hula 数据",
|
||||
"free_space": "可用空间",
|
||||
"directory": "目录",
|
||||
"curr_dir": "当前目录"
|
||||
},
|
||||
"theme": {
|
||||
"title": "主题",
|
||||
"restore_default": "恢复默认"
|
||||
},
|
||||
"unknow": "未知"
|
||||
}
|
||||
|
||||
191
pnpm-lock.yaml
generated
vendored
191
pnpm-lock.yaml
generated
vendored
@@ -1547,124 +1547,124 @@ packages:
|
||||
'@rolldown/pluginutils@1.0.0-beta.41':
|
||||
resolution: {integrity: sha512-ycMEPrS3StOIeb87BT3/+bu+blEtyvwQ4zmo2IcJQy0Rd1DAAhKksA0iUZ3MYSpJtjlPhg0Eo6mvVS6ggPhRbw==}
|
||||
|
||||
'@rollup/rollup-android-arm-eabi@4.53.3':
|
||||
resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==}
|
||||
'@rollup/rollup-android-arm-eabi@4.53.1':
|
||||
resolution: {integrity: sha512-bxZtughE4VNVJlL1RdoSE545kc4JxL7op57KKoi59/gwuU5rV6jLWFXXc8jwgFoT6vtj+ZjO+Z2C5nrY0Cl6wA==}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
'@rollup/rollup-android-arm64@4.53.3':
|
||||
resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==}
|
||||
'@rollup/rollup-android-arm64@4.53.1':
|
||||
resolution: {integrity: sha512-44a1hreb02cAAfAKmZfXVercPFaDjqXCK+iKeVOlJ9ltvnO6QqsBHgKVPTu+MJHSLLeMEUbeG2qiDYgbFPU48g==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@rollup/rollup-darwin-arm64@4.53.3':
|
||||
resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==}
|
||||
'@rollup/rollup-darwin-arm64@4.53.1':
|
||||
resolution: {integrity: sha512-usmzIgD0rf1syoOZ2WZvy8YpXK5G1V3btm3QZddoGSa6mOgfXWkkv+642bfUUldomgrbiLQGrPryb7DXLovPWQ==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@rollup/rollup-darwin-x64@4.53.3':
|
||||
resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==}
|
||||
'@rollup/rollup-darwin-x64@4.53.1':
|
||||
resolution: {integrity: sha512-is3r/k4vig2Gt8mKtTlzzyaSQ+hd87kDxiN3uDSDwggJLUV56Umli6OoL+/YZa/KvtdrdyNfMKHzL/P4siOOmg==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@rollup/rollup-freebsd-arm64@4.53.3':
|
||||
resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==}
|
||||
'@rollup/rollup-freebsd-arm64@4.53.1':
|
||||
resolution: {integrity: sha512-QJ1ksgp/bDJkZB4daldVmHaEQkG4r8PUXitCOC2WRmRaSaHx5RwPoI3DHVfXKwDkB+Sk6auFI/+JHacTekPRSw==}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@rollup/rollup-freebsd-x64@4.53.3':
|
||||
resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==}
|
||||
'@rollup/rollup-freebsd-x64@4.53.1':
|
||||
resolution: {integrity: sha512-J6ma5xgAzvqsnU6a0+jgGX/gvoGokqpkx6zY4cWizRrm0ffhHDpJKQgC8dtDb3+MqfZDIqs64REbfHDMzxLMqQ==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@rollup/rollup-linux-arm-gnueabihf@4.53.3':
|
||||
resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==}
|
||||
'@rollup/rollup-linux-arm-gnueabihf@4.53.1':
|
||||
resolution: {integrity: sha512-JzWRR41o2U3/KMNKRuZNsDUAcAVUYhsPuMlx5RUldw0E4lvSIXFUwejtYz1HJXohUmqs/M6BBJAUBzKXZVddbg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.53.3':
|
||||
resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==}
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.53.1':
|
||||
resolution: {integrity: sha512-L8kRIrnfMrEoHLHtHn+4uYA52fiLDEDyezgxZtGUTiII/yb04Krq+vk3P2Try+Vya9LeCE9ZHU8CXD6J9EhzHQ==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==}
|
||||
'@rollup/rollup-linux-arm64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-ysAc0MFRV+WtQ8li8hi3EoFi7us6d1UzaS/+Dp7FYZfg3NdDljGMoVyiIp6Ucz7uhlYDBZ/zt6XI0YEZbUO11Q==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.53.3':
|
||||
resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==}
|
||||
'@rollup/rollup-linux-arm64-musl@4.53.1':
|
||||
resolution: {integrity: sha512-UV6l9MJpDbDZZ/fJvqNcvO1PcivGEf1AvKuTcHoLjVZVFeAMygnamCTDikCVMRnA+qJe+B3pSbgX2+lBMqgBhA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-loong64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==}
|
||||
'@rollup/rollup-linux-loong64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-UDUtelEprkA85g95Q+nj3Xf0M4hHa4DiJ+3P3h4BuGliY4NReYYqwlc0Y8ICLjN4+uIgCEvaygYlpf0hUj90Yg==}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==}
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-vrRn+BYhEtNOte/zbc2wAUQReJXxEx2URfTol6OEfY2zFEUK92pkFBSXRylDM7aHi+YqEPJt9/ABYzmcrS4SgQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==}
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-gto/1CxHyi4A7YqZZNznQYrVlPSaodOBPKM+6xcDSCMVZN/Fzb4K+AIkNz/1yAYz9h3Ng+e2fY9H6bgawVq17w==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-musl@4.53.3':
|
||||
resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==}
|
||||
'@rollup/rollup-linux-riscv64-musl@4.53.1':
|
||||
resolution: {integrity: sha512-KZ6Vx7jAw3aLNjFR8eYVcQVdFa/cvBzDNRFM3z7XhNNunWjA03eUrEwJYPk0G8V7Gs08IThFKcAPS4WY/ybIrQ==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==}
|
||||
'@rollup/rollup-linux-s390x-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-HvEixy2s/rWNgpwyKpXJcHmE7om1M89hxBTBi9Fs6zVuLU4gOrEMQNbNsN/tBVIMbLyysz/iwNiGtMOpLAOlvA==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==}
|
||||
'@rollup/rollup-linux-x64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-E/n8x2MSjAQgjj9IixO4UeEUeqXLtiA7pyoXCFYLuXpBA/t2hnbIdxHfA7kK9BFsYAoNU4st1rHYdldl8dTqGA==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.53.3':
|
||||
resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==}
|
||||
'@rollup/rollup-linux-x64-musl@4.53.1':
|
||||
resolution: {integrity: sha512-IhJ087PbLOQXCN6Ui/3FUkI9pWNZe/Z7rEIVOzMsOs1/HSAECCvSZ7PkIbkNqL/AZn6WbZvnoVZw/qwqYMo4/w==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-openharmony-arm64@4.53.3':
|
||||
resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==}
|
||||
'@rollup/rollup-openharmony-arm64@4.53.1':
|
||||
resolution: {integrity: sha512-0++oPNgLJHBblreu0SFM7b3mAsBJBTY0Ksrmu9N6ZVrPiTkRgda52mWR7TKhHAsUb9noCjFvAw9l6ZO1yzaVbA==}
|
||||
cpu: [arm64]
|
||||
os: [openharmony]
|
||||
|
||||
'@rollup/rollup-win32-arm64-msvc@4.53.3':
|
||||
resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==}
|
||||
'@rollup/rollup-win32-arm64-msvc@4.53.1':
|
||||
resolution: {integrity: sha512-VJXivz61c5uVdbmitLkDlbcTk9Or43YC2QVLRkqp86QoeFSqI81bNgjhttqhKNMKnQMWnecOCm7lZz4s+WLGpQ==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@rollup/rollup-win32-ia32-msvc@4.53.3':
|
||||
resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==}
|
||||
'@rollup/rollup-win32-ia32-msvc@4.53.1':
|
||||
resolution: {integrity: sha512-NmZPVTUOitCXUH6erJDzTQ/jotYw4CnkMDjCYRxNHVD9bNyfrGoIse684F9okwzKCV4AIHRbUkeTBc9F2OOH5Q==}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@rollup/rollup-win32-x64-gnu@4.53.3':
|
||||
resolution: {integrity: sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==}
|
||||
'@rollup/rollup-win32-x64-gnu@4.53.1':
|
||||
resolution: {integrity: sha512-2SNj7COIdAf6yliSpLdLG8BEsp5lgzRehgfkP0Av8zKfQFKku6JcvbobvHASPJu4f3BFxej5g+HuQPvqPhHvpQ==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@rollup/rollup-win32-x64-msvc@4.53.3':
|
||||
resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==}
|
||||
'@rollup/rollup-win32-x64-msvc@4.53.1':
|
||||
resolution: {integrity: sha512-rLarc1Ofcs3DHtgSzFO31pZsCh8g05R2azN1q3fF+H423Co87My0R+tazOEvYVKXSLh8C4LerMK41/K7wlklcg==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
@@ -2774,9 +2774,6 @@ packages:
|
||||
csstype@3.1.3:
|
||||
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
||||
|
||||
csstype@3.2.3:
|
||||
resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
|
||||
|
||||
cwise-compiler@1.1.3:
|
||||
resolution: {integrity: sha512-WXlK/m+Di8DMMcCjcWr4i+XzcQra9eCdXIJrgh4TUgh0pIS/yJduLxS9JgefsHJ/YVLdgPtXm9r62W92MvanEQ==}
|
||||
|
||||
@@ -4494,8 +4491,8 @@ packages:
|
||||
robust-predicates@3.0.2:
|
||||
resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==}
|
||||
|
||||
rollup@4.53.3:
|
||||
resolution: {integrity: sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==}
|
||||
rollup@4.53.1:
|
||||
resolution: {integrity: sha512-n2I0V0lN3E9cxxMqBCT3opWOiQBzRN7UG60z/WDKqdX2zHUS/39lezBcsckZFsV6fUTSnfqI7kHf60jDAPGKug==}
|
||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
||||
hasBin: true
|
||||
|
||||
@@ -6498,70 +6495,70 @@ snapshots:
|
||||
|
||||
'@rolldown/pluginutils@1.0.0-beta.41': {}
|
||||
|
||||
'@rollup/rollup-android-arm-eabi@4.53.3':
|
||||
'@rollup/rollup-android-arm-eabi@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-android-arm64@4.53.3':
|
||||
'@rollup/rollup-android-arm64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-darwin-arm64@4.53.3':
|
||||
'@rollup/rollup-darwin-arm64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-darwin-x64@4.53.3':
|
||||
'@rollup/rollup-darwin-x64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-freebsd-arm64@4.53.3':
|
||||
'@rollup/rollup-freebsd-arm64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-freebsd-x64@4.53.3':
|
||||
'@rollup/rollup-freebsd-x64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-arm-gnueabihf@4.53.3':
|
||||
'@rollup/rollup-linux-arm-gnueabihf@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.53.3':
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-arm64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.53.3':
|
||||
'@rollup/rollup-linux-arm64-musl@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-loong64-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-loong64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-riscv64-musl@4.53.3':
|
||||
'@rollup/rollup-linux-riscv64-musl@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-s390x-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.53.3':
|
||||
'@rollup/rollup-linux-x64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.53.3':
|
||||
'@rollup/rollup-linux-x64-musl@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-openharmony-arm64@4.53.3':
|
||||
'@rollup/rollup-openharmony-arm64@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-win32-arm64-msvc@4.53.3':
|
||||
'@rollup/rollup-win32-arm64-msvc@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-win32-ia32-msvc@4.53.3':
|
||||
'@rollup/rollup-win32-ia32-msvc@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-win32-x64-gnu@4.53.3':
|
||||
'@rollup/rollup-win32-x64-gnu@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-win32-x64-msvc@4.53.3':
|
||||
'@rollup/rollup-win32-x64-msvc@4.53.1':
|
||||
optional: true
|
||||
|
||||
'@shikijs/core@3.15.0':
|
||||
@@ -7284,7 +7281,7 @@ snapshots:
|
||||
'@vue/reactivity': 3.5.25
|
||||
'@vue/runtime-core': 3.5.25
|
||||
'@vue/shared': 3.5.25
|
||||
csstype: 3.2.3
|
||||
csstype: 3.1.3
|
||||
|
||||
'@vue/server-renderer@3.5.25(vue@3.5.25(typescript@5.9.3))':
|
||||
dependencies:
|
||||
@@ -7835,8 +7832,6 @@ snapshots:
|
||||
|
||||
csstype@3.1.3: {}
|
||||
|
||||
csstype@3.2.3: {}
|
||||
|
||||
cwise-compiler@1.1.3:
|
||||
dependencies:
|
||||
uniq: 1.0.1
|
||||
@@ -9644,32 +9639,32 @@ snapshots:
|
||||
|
||||
robust-predicates@3.0.2: {}
|
||||
|
||||
rollup@4.53.3:
|
||||
rollup@4.53.1:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.8
|
||||
optionalDependencies:
|
||||
'@rollup/rollup-android-arm-eabi': 4.53.3
|
||||
'@rollup/rollup-android-arm64': 4.53.3
|
||||
'@rollup/rollup-darwin-arm64': 4.53.3
|
||||
'@rollup/rollup-darwin-x64': 4.53.3
|
||||
'@rollup/rollup-freebsd-arm64': 4.53.3
|
||||
'@rollup/rollup-freebsd-x64': 4.53.3
|
||||
'@rollup/rollup-linux-arm-gnueabihf': 4.53.3
|
||||
'@rollup/rollup-linux-arm-musleabihf': 4.53.3
|
||||
'@rollup/rollup-linux-arm64-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-arm64-musl': 4.53.3
|
||||
'@rollup/rollup-linux-loong64-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-ppc64-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-riscv64-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-riscv64-musl': 4.53.3
|
||||
'@rollup/rollup-linux-s390x-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-x64-gnu': 4.53.3
|
||||
'@rollup/rollup-linux-x64-musl': 4.53.3
|
||||
'@rollup/rollup-openharmony-arm64': 4.53.3
|
||||
'@rollup/rollup-win32-arm64-msvc': 4.53.3
|
||||
'@rollup/rollup-win32-ia32-msvc': 4.53.3
|
||||
'@rollup/rollup-win32-x64-gnu': 4.53.3
|
||||
'@rollup/rollup-win32-x64-msvc': 4.53.3
|
||||
'@rollup/rollup-android-arm-eabi': 4.53.1
|
||||
'@rollup/rollup-android-arm64': 4.53.1
|
||||
'@rollup/rollup-darwin-arm64': 4.53.1
|
||||
'@rollup/rollup-darwin-x64': 4.53.1
|
||||
'@rollup/rollup-freebsd-arm64': 4.53.1
|
||||
'@rollup/rollup-freebsd-x64': 4.53.1
|
||||
'@rollup/rollup-linux-arm-gnueabihf': 4.53.1
|
||||
'@rollup/rollup-linux-arm-musleabihf': 4.53.1
|
||||
'@rollup/rollup-linux-arm64-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-arm64-musl': 4.53.1
|
||||
'@rollup/rollup-linux-loong64-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-ppc64-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-riscv64-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-riscv64-musl': 4.53.1
|
||||
'@rollup/rollup-linux-s390x-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-x64-gnu': 4.53.1
|
||||
'@rollup/rollup-linux-x64-musl': 4.53.1
|
||||
'@rollup/rollup-openharmony-arm64': 4.53.1
|
||||
'@rollup/rollup-win32-arm64-msvc': 4.53.1
|
||||
'@rollup/rollup-win32-ia32-msvc': 4.53.1
|
||||
'@rollup/rollup-win32-x64-gnu': 4.53.1
|
||||
'@rollup/rollup-win32-x64-msvc': 4.53.1
|
||||
fsevents: 2.3.3
|
||||
|
||||
roughjs@4.6.6:
|
||||
@@ -10247,7 +10242,7 @@ snapshots:
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
picomatch: 4.0.3
|
||||
postcss: 8.5.6
|
||||
rollup: 4.53.3
|
||||
rollup: 4.53.1
|
||||
tinyglobby: 0.2.15
|
||||
optionalDependencies:
|
||||
'@types/node': 24.10.0
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</n-popover>
|
||||
</div>
|
||||
<div v-if="!showAllEmojis && emoji.length > 4" class="p-4px">
|
||||
<div class="emoji-more-btn" @click="showAllEmojis = true">更多</div>
|
||||
<div class="emoji-more-btn" @click="showAllEmojis = true">{{ t('menu.ctx_menu_more') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,6 +132,7 @@
|
||||
import { useContextMenu } from '@/hooks/useContextMenu.ts'
|
||||
import { useViewport } from '@/hooks/useViewport.ts'
|
||||
import { isMobile } from '@/utils/PlatformConstants'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
type Props = {
|
||||
content?: Record<string, any>
|
||||
@@ -139,6 +140,7 @@ type Props = {
|
||||
emoji?: any[]
|
||||
specialMenu?: any[]
|
||||
}
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
content: () => ({}),
|
||||
|
||||
@@ -40,6 +40,7 @@ import { detectRemoteFileType, getFilesMeta } from '@/utils/PathUtil'
|
||||
import { isMac, isMobile } from '@/utils/PlatformConstants'
|
||||
import { invokeWithErrorHandler } from '@/utils/TauriInvokeHandler'
|
||||
import { useWindow } from './useWindow'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
type UseChatMainOptions = {
|
||||
enableGroupNicknameModal?: boolean
|
||||
@@ -53,6 +54,7 @@ type GroupNicknameModalPayload = {
|
||||
}
|
||||
|
||||
export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions = {}) => {
|
||||
const { t } = useI18n()
|
||||
const { openMsgSession, userUid } = useCommon()
|
||||
const { createWebviewWindow, sendWindowPayload, startRtcCall } = useWindow()
|
||||
const { getLocalVideoPath, checkVideoDownloaded } = useVideoViewer()
|
||||
@@ -185,7 +187,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
|
||||
const commonMenuList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '多选',
|
||||
label: t('menu.select'),
|
||||
icon: 'list-checkbox',
|
||||
click: () => {
|
||||
chatStore.setMsgMultiChoose(true)
|
||||
@@ -193,7 +195,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
visible: (item: MessageType) => !isNoticeMessage(item)
|
||||
},
|
||||
{
|
||||
label: '添加到表情',
|
||||
label: t('menu.add_sticker'),
|
||||
icon: 'add-expression',
|
||||
click: async (item: MessageType) => {
|
||||
const imageUrl = item.message.body.url || item.message.body.content
|
||||
@@ -208,7 +210,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '转发',
|
||||
label: t('menu.forward'),
|
||||
icon: 'share',
|
||||
click: (item: MessageType) => {
|
||||
if (isMobile()) {
|
||||
@@ -227,14 +229,14 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
// }
|
||||
// },
|
||||
{
|
||||
label: '回复',
|
||||
label: t('menu.reply'),
|
||||
icon: 'reply',
|
||||
click: (item: any) => {
|
||||
useMitt.emit(MittEnum.REPLY_MEG, item)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '撤回',
|
||||
label: t('menu.recall'),
|
||||
icon: 'corner-down-left',
|
||||
click: async (item: MessageType) => {
|
||||
const msg = { ...item }
|
||||
@@ -284,7 +286,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
])
|
||||
const videoMenuList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '复制',
|
||||
label: t('menu.copy'),
|
||||
icon: 'copy',
|
||||
click: (item: MessageType) => {
|
||||
if (isMobile()) {
|
||||
@@ -296,7 +298,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
...commonMenuList.value,
|
||||
{
|
||||
label: '另存为',
|
||||
label: t('menu.save_as'),
|
||||
icon: 'Importing',
|
||||
click: async (item: MessageType) => {
|
||||
if (isMobile()) {
|
||||
@@ -312,7 +314,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
|
||||
{
|
||||
label: isMac() ? '在Finder中显示' : '在文件夹中打开',
|
||||
label: isMac() ? t('menu.show_in_finder') : t('menu.show_in_folder'),
|
||||
icon: 'file2',
|
||||
click: async (item: MessageType) => {
|
||||
try {
|
||||
@@ -342,7 +344,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
/** 右键消息菜单列表 */
|
||||
const menuList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '复制',
|
||||
label: t('menu.copy'),
|
||||
icon: 'copy',
|
||||
click: (item: MessageType) => {
|
||||
handleCopy(item.message.body.content, true, item.message.id)
|
||||
@@ -350,7 +352,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
visible: (item: MessageType) => !shouldHideCopy(item)
|
||||
},
|
||||
{
|
||||
label: '翻译',
|
||||
label: t('menu.translate'),
|
||||
icon: 'translate',
|
||||
click: async (item: MessageType) => {
|
||||
const selectedText = getSelectedText(item.message.id)
|
||||
@@ -383,7 +385,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
// 历史记录模式:基础菜单(复制、转发)
|
||||
const baseMenus: OPT.RightMenu[] = [
|
||||
{
|
||||
label: '复制',
|
||||
label: t('menu.copy'),
|
||||
icon: 'copy',
|
||||
click: (item: MessageType) => {
|
||||
const content = item.message.body.url || item.message.body.content
|
||||
@@ -395,14 +397,14 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
if (!disableHistoryActions) {
|
||||
baseMenus.push(
|
||||
{
|
||||
label: '多选',
|
||||
label: t('menu.select'),
|
||||
icon: 'list-checkbox',
|
||||
click: () => {
|
||||
chatStore.setMsgMultiChoose(true)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '转发',
|
||||
label: t('menu.forward'),
|
||||
icon: 'share',
|
||||
click: (item: MessageType) => {
|
||||
handleForward(item)
|
||||
@@ -427,7 +429,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
// }
|
||||
// },
|
||||
{
|
||||
label: '另存为',
|
||||
label: t('menu.save_as'),
|
||||
icon: 'Importing',
|
||||
click: async (item: MessageType) => {
|
||||
if (isMobile()) {
|
||||
@@ -453,7 +455,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
|
||||
{
|
||||
label: isMac() ? '在Finder中显示' : '打开文件夹',
|
||||
label: isMac() ? t('menu.show_in_finder') : t('menu.open_folder'),
|
||||
icon: 'file2',
|
||||
click: async (item: RightMouseMessageItem) => {
|
||||
console.log('打开文件夹的item项:', item)
|
||||
@@ -511,7 +513,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
// 正常聊天模式:只显示删除
|
||||
return [
|
||||
{
|
||||
label: '删除',
|
||||
label: t('menu.del'),
|
||||
icon: 'delete',
|
||||
click: (item: any) => {
|
||||
tips.value = '删除后将不会出现在你的消息记录中,确定删除吗?'
|
||||
@@ -527,7 +529,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
/** 文件类型右键菜单 */
|
||||
const fileMenuList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '预览',
|
||||
label: t('menu.preview'),
|
||||
icon: 'preview-open',
|
||||
click: (item: RightMouseMessageItem) => {
|
||||
console.log('预览文件的参数:', item)
|
||||
@@ -637,7 +639,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
...commonMenuList.value,
|
||||
{
|
||||
label: '另存为',
|
||||
label: t('save_as'),
|
||||
icon: 'Importing',
|
||||
click: async (item: RightMouseMessageItem) => {
|
||||
if (isMobile()) {
|
||||
@@ -653,7 +655,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
|
||||
{
|
||||
label: isMac() ? '在Finder中显示' : '打开文件夹',
|
||||
label: isMac() ? t('menu.show_in_finder') : t('menu.open_folder'),
|
||||
icon: 'file2',
|
||||
click: async (item: RightMouseMessageItem) => {
|
||||
console.log('打开文件夹的item项:', item)
|
||||
@@ -706,7 +708,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
/** 图片类型右键菜单 */
|
||||
const imageMenuList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '复制',
|
||||
label: t('menu.copy'),
|
||||
icon: 'copy',
|
||||
click: async (item: MessageType) => {
|
||||
// 对于图片消息,优先使用 url 字段,回退到 content 字段
|
||||
@@ -716,7 +718,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
},
|
||||
...commonMenuList.value,
|
||||
{
|
||||
label: '另存为',
|
||||
label: t('menu.save_as'),
|
||||
icon: 'Importing',
|
||||
click: async (item: MessageType) => {
|
||||
if (isMobile()) {
|
||||
@@ -748,7 +750,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
}
|
||||
},
|
||||
{
|
||||
label: isMac() ? '在Finder中显示' : '打开文件夹',
|
||||
label: isMac() ? t('menu.show_in_finder') : t('menu.open_folder'),
|
||||
icon: 'file2',
|
||||
click: async (item: MessageType) => {
|
||||
const fileUrl = item.message.body.url || item.message.body.content
|
||||
@@ -798,7 +800,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
/** 右键用户信息菜单(群聊的时候显示) */
|
||||
const optionsList = ref<OPT.RightMenu[]>([
|
||||
{
|
||||
label: '发送信息',
|
||||
label: t('menu.send_message'),
|
||||
icon: 'message-action',
|
||||
click: (item: any) => {
|
||||
openMsgSession(item.uid || item.fromUser.uid)
|
||||
@@ -814,7 +816,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
visible: (item: any) => (item.uid ? item.uid !== userUid.value : item.fromUser.uid !== userUid.value)
|
||||
},
|
||||
{
|
||||
label: '查看资料',
|
||||
label: t('menu.get_user_info'),
|
||||
icon: 'notes',
|
||||
click: (item: any, type: string) => {
|
||||
// 如果是聊天框内的资料就使用的是消息的key,如果是群聊成员的资料就使用的是uid
|
||||
@@ -823,7 +825,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '修改群昵称',
|
||||
label: t('menu.modify_group_nickname'),
|
||||
icon: 'edit',
|
||||
click: (item: any) => {
|
||||
const targetUid = item.uid || item.fromUser?.uid
|
||||
@@ -847,7 +849,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
visible: (item: any) => (item.uid ? item.uid === userUid.value : item.fromUser.uid === userUid.value)
|
||||
},
|
||||
{
|
||||
label: '添加好友',
|
||||
label: t('menu.add_friend'),
|
||||
icon: 'people-plus',
|
||||
click: async (item: any) => {
|
||||
await createWebviewWindow('申请加好友', 'addFriendVerify', 380, 300, '', false, 380, 300)
|
||||
@@ -1003,7 +1005,7 @@ export const useChatMain = (isHistoryMode = false, options: UseChatMainOptions =
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '举报',
|
||||
label: t('menu.report'),
|
||||
icon: 'caution',
|
||||
click: () => {}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
id="search"
|
||||
v-model:value="searchText"
|
||||
@focus="() => handleSearchFocus()"
|
||||
@blur="() => (searchText = '搜索')"
|
||||
@blur="() => (searchText = t('home.search_input_placeholder'))"
|
||||
@update:value="handleSearchInputChange"
|
||||
class="rounded-6px w-full relative text-12px"
|
||||
style="background: var(--search-bg-color)"
|
||||
@@ -42,7 +42,7 @@
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
size="small"
|
||||
:placeholder="isSearchMode ? '' : '搜索'">
|
||||
:placeholder="isSearchMode ? '' : t('home.search_input_placeholder')">
|
||||
<template #prefix>
|
||||
<svg class="w-12px h-12px"><use href="#search"></use></svg>
|
||||
</template>
|
||||
@@ -140,7 +140,9 @@ import { useSettingStore } from '@/stores/setting.ts'
|
||||
import * as ImRequestUtils from '@/utils/ImRequestUtils'
|
||||
import { isMac, isWindows } from '@/utils/PlatformConstants'
|
||||
import { options, renderLabel, renderSourceList, renderTargetList } from './model.tsx'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { createWebviewWindow } = useWindow()
|
||||
|
||||
const chatStore = useChatStore()
|
||||
@@ -164,7 +166,7 @@ const { width } = useWindowSize()
|
||||
/** 是否拖拽 */
|
||||
const isDrag = ref(true)
|
||||
/** 搜索框文字 */
|
||||
const searchText = ref('搜索')
|
||||
const searchText = ref(t('home.search_input_placeholder'))
|
||||
/** 是否处于搜索模式 */
|
||||
const isSearchMode = ref(false)
|
||||
/** 添加面板是否显示 */
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { type PluginEnum, StoresEnum } from '@/enums'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
export const useMenuTopStore = defineStore(
|
||||
StoresEnum.MENUTOP,
|
||||
() => {
|
||||
const { t } = useI18n()
|
||||
// 初始状态
|
||||
const initialState: OPT.L.Common[] = [
|
||||
{
|
||||
url: 'message',
|
||||
icon: 'message',
|
||||
iconAction: 'message-action',
|
||||
title: '消息列表',
|
||||
shortTitle: '消息'
|
||||
title: t('home.action.message'),
|
||||
shortTitle: t('home.action.message_short_title')
|
||||
},
|
||||
{
|
||||
url: 'friendsList',
|
||||
icon: 'avatar',
|
||||
iconAction: 'avatar-action',
|
||||
title: '好友列表',
|
||||
shortTitle: '好友'
|
||||
title: t('home.action.contact'),
|
||||
shortTitle: t('home.action.contact_short_title')
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 搜索结果为空时显示建议和历史记录 -->
|
||||
<template v-if="searchResults.length === 0 && !searchQuery">
|
||||
<!-- 搜索建议 -->
|
||||
<p class="text-(12px #909090)">搜索建议</p>
|
||||
<p class="text-(12px #909090)">{{ t('home.search_suggestions') }}</p>
|
||||
<n-flex align="center" class="text-(12px #909090)">
|
||||
<p class="p-6px bg-[--search-color] rounded-8px cursor-pointer" @click="applySearchTerm('hula')">hula</p>
|
||||
</n-flex>
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
<!-- 历史记录 -->
|
||||
<n-flex v-if="historyList.length > 0" align="center" justify="space-between">
|
||||
<p class="text-(12px #909090)">历史记录</p>
|
||||
<p class="cursor-pointer text-(12px #13987f)" @click="clearHistory">清除</p>
|
||||
<p class="text-(12px #909090)">{{ t('home.search_history') }}</p>
|
||||
<p class="cursor-pointer text-(12px #13987f)" @click="clearHistory">{{ t('home.clear_search_history') }}</p>
|
||||
</n-flex>
|
||||
|
||||
<n-flex
|
||||
@@ -22,7 +22,7 @@
|
||||
:size="14"
|
||||
class="p-6px mb-6px mr-10px cursor-pointer rounded-8px hover:bg-[--list-hover-color]">
|
||||
<n-avatar :size="38" round src="msgAction/clapping.png" />
|
||||
<p class="text-(12px [--chat-text-color]) flex-1 truncate">在搜索框内搜索</p>
|
||||
<p class="text-(12px [--chat-text-color]) flex-1 truncate">{{ t('home.search_guide') }}</p>
|
||||
</n-flex>
|
||||
|
||||
<n-scrollbar style="max-height: calc(100vh / var(--page-scale, 1) - 212px)">
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<!-- 搜索结果 -->
|
||||
<template v-else-if="searchResults.length > 0">
|
||||
<p class="text-(12px #909090) mb-6px">搜索结果</p>
|
||||
<p class="text-(12px #909090) mb-6px">{{ t('home.search_result') }}</p>
|
||||
|
||||
<n-scrollbar style="max-height: calc(100vh / var(--page-scale, 1) - 118px)">
|
||||
<template v-for="item in searchResults" :key="item.roomId">
|
||||
@@ -61,7 +61,7 @@
|
||||
<template v-else-if="searchQuery && searchResults.length === 0">
|
||||
<div style="height: calc(100vh / var(--page-scale, 1) - 212px)" class="flex-col-center gap-12px">
|
||||
<img class="size-64px" src="/msgAction/exploding-head.png" />
|
||||
<p class="text-(12px [--chat-text-color])">未找到相关结果</p>
|
||||
<p class="text-(12px [--chat-text-color])">{{ t('home.no_search_results') }}</p>
|
||||
</div>
|
||||
</template>
|
||||
</n-flex>
|
||||
@@ -74,6 +74,7 @@ import { useCommon } from '@/hooks/useCommon.ts'
|
||||
import { useMitt } from '@/hooks/useMitt'
|
||||
import { useChatStore } from '@/stores/chat.ts'
|
||||
import { AvatarUtils } from '@/utils/AvatarUtils'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
type SessionItem = {
|
||||
avatar: string
|
||||
@@ -93,6 +94,7 @@ type HistoryItem = {
|
||||
timestamp?: number
|
||||
}
|
||||
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
const chatStore = useChatStore()
|
||||
const { openMsgSession } = useCommon()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ showDiskUsage ? scanFilesUsagePercentage.toFixed(2) : scanningProgress.toFixed(0) }}%
|
||||
</span>
|
||||
<span class="text-(12px #666)">
|
||||
{{ showDiskUsage ? '扫描文件占比' : '扫描进度' }}
|
||||
{{ showDiskUsage ? t('setting.storage.usage') : t('setting.storage.file_scan_progress') }}
|
||||
</span>
|
||||
</n-flex>
|
||||
</n-progress>
|
||||
@@ -36,15 +36,15 @@
|
||||
<n-flex justify="center" :size="8">
|
||||
<n-flex align="center" :size="8">
|
||||
<div class="w-12px h-12px rounded-2px bg-#13987f"></div>
|
||||
<span class="text-(11px #666)">扫描文件已用空间</span>
|
||||
<span class="text-(11px #666)">{{ t('setting.storage.app_used_space') }}</span>
|
||||
</n-flex>
|
||||
<n-flex align="center" :size="8">
|
||||
<div class="w-12px h-12px rounded-2px bg-[--warning-text]"></div>
|
||||
<span class="text-(11px #666)">磁盘分区已用空间</span>
|
||||
<span class="text-(11px #666)">{{ t('setting.storage.used_space') }}</span>
|
||||
</n-flex>
|
||||
<n-flex align="center" :size="8">
|
||||
<div class="w-12px h-12px rounded-2px bg-#7db1ac50"></div>
|
||||
<span class="text-(11px #666)">剩余可用空间</span>
|
||||
<span class="text-(11px #666)">{{ t('setting.storage.free_space') }}</span>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<!-- 用户目录 -->
|
||||
<n-flex vertical class="text-(14px [--text-color])" :size="16">
|
||||
<span class="pl-10px">用户目录</span>
|
||||
<span class="pl-10px">{{ t('setting.storage.directory') }}</span>
|
||||
|
||||
<!-- 存储目录设置 -->
|
||||
<n-flex class="item" :size="16" vertical>
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
<!-- 当前扫描目录显示 -->
|
||||
<n-flex align="center" justify="space-between">
|
||||
<span>当前目录:</span>
|
||||
<span>{{ t('setting.storage.curr_dir') }}</span>
|
||||
<n-flex vertical align="end" :size="8">
|
||||
<span class="text-(12px #666) max-w-300px truncate">
|
||||
{{ currentDirectory || '正在获取目录路径...' }}
|
||||
@@ -146,10 +146,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { open } from '@tauri-apps/plugin-dialog'
|
||||
import { useScannerStore } from '@/stores/scanner.ts'
|
||||
import { formatBytes } from '@/utils/Formatting.ts'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const scannerStore = useScannerStore()
|
||||
const {
|
||||
pathType,
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<n-flex vertical :size="40">
|
||||
<!-- 全局快捷键总开关 -->
|
||||
<n-flex vertical class="text-(14px [--text-color])" :size="16">
|
||||
<span class="pl-10px">全局快捷键</span>
|
||||
<span class="pl-10px">{{ t('setting.shortcut.global_shortcut_title') }}</span>
|
||||
|
||||
<n-flex class="item" align="center" justify="space-between">
|
||||
<n-flex vertical :size="8">
|
||||
<span>启用全局快捷键</span>
|
||||
<span class="text-(12px #909090)">关闭后下方所有快捷键将失效</span>
|
||||
<span>{{ t('setting.shortcut.enable_global_shortcuts') }}</span>
|
||||
<span class="text-(12px #909090)">{{ t('setting.shortcut.enable_global_shortcuts_hint') }}</span>
|
||||
</n-flex>
|
||||
|
||||
<n-switch v-model:value="globalShortcutEnabled" @update:value="handleGlobalShortcutToggle" size="small" />
|
||||
@@ -16,19 +16,20 @@
|
||||
|
||||
<!-- 截图快捷键设置 -->
|
||||
<n-flex vertical class="text-(14px [--text-color])" :size="16">
|
||||
<span class="pl-10px">功能快捷键</span>
|
||||
<span class="pl-10px">{{ t('setting.shortcut.function_shortcut_title') }}</span>
|
||||
|
||||
<n-flex class="item" :size="12" vertical>
|
||||
<!-- 截图快捷键 -->
|
||||
<n-flex align="center" justify="space-between">
|
||||
<n-flex vertical :size="8">
|
||||
<span>{{ shortcutConfigs.screenshot.displayName }}</span>
|
||||
<span class="text-(12px #909090)">按下快捷键即可开始截图</span>
|
||||
<!-- <span>{{ t('setting.shortcut.screenshot') }}</span> -->
|
||||
<span class="text-(12px #909090)">{{ t('setting.shortcut.screenshot_hint') }}</span>
|
||||
</n-flex>
|
||||
|
||||
<n-flex align="center" :size="12">
|
||||
<n-tag v-if="shortcutRegistered !== null" :type="shortcutRegistered ? 'success' : 'error'" size="small">
|
||||
{{ shortcutRegistered ? '已绑定' : '未绑定' }}
|
||||
{{ shortcutRegistered ? t('setting.shortcut.bound') : t('setting.shortcut.unbound') }}
|
||||
</n-tag>
|
||||
<n-input
|
||||
:value="screenshotShortcutDisplay"
|
||||
@@ -51,7 +52,7 @@
|
||||
<use href="#return"></use>
|
||||
</svg>
|
||||
</template>
|
||||
<span>重置</span>
|
||||
<span>{{ t('setting.shortcut.reset') }}</span>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
</n-input>
|
||||
@@ -64,7 +65,8 @@
|
||||
<n-flex align="center" justify="space-between">
|
||||
<n-flex vertical :size="8">
|
||||
<span>{{ shortcutConfigs.openMainPanel.displayName }}</span>
|
||||
<span class="text-(12px #909090)">按下快捷键即可切换主面板显示状态</span>
|
||||
<!-- <span>{{ t('setting.shortcut.panel_switch') }}</span> -->
|
||||
<span class="text-(12px #909090)">{{ t('setting.shortcut.panel_switch_hint') }}</span>
|
||||
</n-flex>
|
||||
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -72,7 +74,7 @@
|
||||
v-if="openMainPanelShortcutRegistered !== null"
|
||||
:type="openMainPanelShortcutRegistered ? 'success' : 'error'"
|
||||
size="small">
|
||||
{{ openMainPanelShortcutRegistered ? '已绑定' : '未绑定' }}
|
||||
{{ openMainPanelShortcutRegistered ? t('setting.shortcut.bound') : t('setting.shortcut.unbound') }}
|
||||
</n-tag>
|
||||
<n-input
|
||||
:value="openMainPanelShortcutDisplay"
|
||||
@@ -95,7 +97,7 @@
|
||||
<use href="#return"></use>
|
||||
</svg>
|
||||
</template>
|
||||
<span>重置</span>
|
||||
<span>{{ t('setting.shortcut.reset') }}</span>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
</n-input>
|
||||
@@ -106,12 +108,12 @@
|
||||
|
||||
<!-- 消息快捷键设置 -->
|
||||
<n-flex vertical class="text-(14px [--text-color])" :size="16">
|
||||
<span class="pl-10px">消息快捷键</span>
|
||||
<span class="pl-10px">{{ t('setting.shortcut.message_title') }}</span>
|
||||
|
||||
<n-flex class="item" align="center" justify="space-between">
|
||||
<n-flex vertical :size="8">
|
||||
<span>发送消息快捷键</span>
|
||||
<span class="text-(12px #909090)">在聊天输入框中按下快捷键发送消息</span>
|
||||
<span>{{ t('setting.shortcut.send_message_shortcut') }}</span>
|
||||
<span class="text-(12px #909090)">{{ t('setting.shortcut.send_message_shortcut_hint') }}</span>
|
||||
</n-flex>
|
||||
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -136,7 +138,9 @@ import { useGlobalShortcut } from '@/hooks/useGlobalShortcut.ts'
|
||||
import { useSettingStore } from '@/stores/setting.ts'
|
||||
import { isMac } from '@/utils/PlatformConstants'
|
||||
import { sendOptions } from './config.ts'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
// 快捷键配置管理
|
||||
type ShortcutConfig = {
|
||||
key: 'screenshot' | 'openMainPanel'
|
||||
@@ -165,7 +169,7 @@ const shortcutConfigs: Record<string, ShortcutConfig> = {
|
||||
defaultValue: getDefaultShortcuts().screenshot,
|
||||
eventName: 'shortcut-updated',
|
||||
registrationEventName: 'shortcut-registration-updated',
|
||||
displayName: '截图快捷键'
|
||||
displayName: t('setting.shortcut.screenshot')
|
||||
},
|
||||
openMainPanel: {
|
||||
key: 'openMainPanel',
|
||||
@@ -176,7 +180,7 @@ const shortcutConfigs: Record<string, ShortcutConfig> = {
|
||||
defaultValue: getDefaultShortcuts().openMainPanel,
|
||||
eventName: 'open-main-panel-shortcut-updated',
|
||||
registrationEventName: 'open-main-panel-shortcut-registration-updated',
|
||||
displayName: '切换主面板快捷键'
|
||||
displayName: t('setting.shortcut.panel_switch')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,10 +415,10 @@ const createSaveShortcutFunction = (config: ShortcutConfig) => {
|
||||
await emit(config.eventName, { shortcut: config.value.value })
|
||||
console.log(`📡 [Settings] ${config.eventName} 事件已发送`)
|
||||
|
||||
window.$message.success(`${config.displayName}已更新`)
|
||||
window.$message.success(t('config.shortcut.shortcut_update_result', { name: config.displayName }))
|
||||
} catch (error) {
|
||||
console.error(`Failed to save ${config.key} shortcut:`, error)
|
||||
window.$message.error(`${config.displayName}设置失败`)
|
||||
window.$message.error(t('config.shortcut.shortcut_setting_failed', { name: config.displayName }))
|
||||
|
||||
// 恢复原来的快捷键
|
||||
config.value.value = config.original.value
|
||||
@@ -458,10 +462,10 @@ const handleGlobalShortcutToggle = async (enabled: boolean) => {
|
||||
// 通知主窗口更新全局快捷键状态
|
||||
await emit('global-shortcut-enabled-changed', { enabled })
|
||||
|
||||
window.$message.success(`全局快捷键已${enabled ? '开启' : '关闭'}`)
|
||||
window.$message.success(enabled ? t('setting.shortcut.global_enable') : t('setting.shortcut.global_disable'))
|
||||
} catch (error) {
|
||||
console.error('Failed to toggle global shortcut:', error)
|
||||
window.$message.error('全局快捷键开关设置失败')
|
||||
window.$message.error(t('setting.shortcut.global_toggle_failed'))
|
||||
|
||||
// 恢复原来的值
|
||||
globalShortcutEnabled.value = !enabled
|
||||
@@ -474,10 +478,11 @@ const saveSendMessageShortcut = async () => {
|
||||
// 保存到 pinia store
|
||||
settingStore.setSendMessageShortcut(sendMessageShortcut.value)
|
||||
|
||||
window.$message.success('发送消息快捷键已更新')
|
||||
window.$message.success(t('setting.shortcut.send_message_updated'))
|
||||
} catch (error) {
|
||||
console.error('Failed to save send message shortcut:', error)
|
||||
window.$message.error('发送消息快捷键设置失败')
|
||||
window.$message.success(t('setting.shortcut.send_message_failed'))
|
||||
|
||||
// 恢复原来的值
|
||||
sendMessageShortcut.value = settingStore.chat?.sendKey || 'Enter'
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
class="bg-[--bg-setting-item] p-[2px_6px] cursor-pointer rounded-50px w-80px h-30px">
|
||||
<svg class="size-22px outline-none color-[--chat-text-color]"><use href="#forbid"></use></svg>
|
||||
|
||||
<p class="text-(12px [--chat-text-color])">恢复默认</p>
|
||||
<p class="text-(12px [--chat-text-color])">{{ t('setting.theme.restore_default') }}</p>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
@@ -37,7 +37,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useSettingStore } from '@/stores/setting.ts'
|
||||
import { versatileModel } from './model.tsx'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const settingStore = useSettingStore()
|
||||
const { themes } = storeToRefs(settingStore)
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ const sideOptions = ref<OPT.L.SettingSide[]>([
|
||||
},
|
||||
{
|
||||
url: '/shortcut',
|
||||
label: '快捷键管理',
|
||||
label: t('setting.shortcut.title'),
|
||||
icon: 'enter-the-keyboard'
|
||||
},
|
||||
{
|
||||
url: '/manageStore',
|
||||
label: '存储管理',
|
||||
label: t('setting.storage.title'),
|
||||
icon: 'mini-sd-card'
|
||||
},
|
||||
{
|
||||
@@ -37,7 +37,7 @@ const sideOptions = ref<OPT.L.SettingSide[]>([
|
||||
},
|
||||
{
|
||||
url: '/versatile',
|
||||
label: '超级变变变',
|
||||
label: t('setting.theme.title'), //'超级变变变'
|
||||
icon: 'platte',
|
||||
versionStatus: 'New'
|
||||
}
|
||||
@@ -46,11 +46,11 @@ const sideOptions = ref<OPT.L.SettingSide[]>([
|
||||
/** 发送按钮快捷键的选项 */
|
||||
const sendOptions = [
|
||||
{
|
||||
label: '按 Enter 键发送消息',
|
||||
label: t('setting.shortcut.send_message_shortcut_option', { key: 'Enter' }),
|
||||
value: 'Enter'
|
||||
},
|
||||
{
|
||||
label: `按 ${key.value} + Enter 键发送消息`,
|
||||
label: t('setting.shortcut.send_message_shortcut_option', { key: key.value }),
|
||||
value: `${key.value}+Enter`
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user