perf: correct some english words

This commit is contained in:
tiny-craft 2023-08-19 01:50:16 +08:00
parent bf16e22647
commit 2f5d1e1d51
2 changed files with 26 additions and 20 deletions

View File

@ -11,9 +11,9 @@
"new_conn": "Add New Connection",
"new_group": "Add New Group",
"rename_group": "Rename Group",
"disconnect_all": "Disconnect all connections",
"disconnect_all": "Disconnect all",
"filter": "Filter",
"sort_conn": "Resort Connections",
"sort_conn": "Sort Connections",
"close_confirm": "Confirm close this tab and connection",
"edit_close_confirm": "Please close the relevant connections before editing. Do you want to continue?",
"opening_connection": "Opening Connection...",
@ -22,12 +22,12 @@
"forever": "Forever",
"rename_key": "Rename Key",
"delete_key": "Delete Key",
"batch_delete_key": "Batch Delete Key",
"batch_delete_key": "Batch Delete Keys",
"db_index": "Database Index",
"key_expression": "Key Expression",
"affected_key": "Affected Key",
"show_affected_key": "Show Affected Key",
"confirm_delete_key": "Confirm Delete {num}",
"affected_key": "Affected Keys",
"show_affected_key": "Show Affected Keys",
"confirm_delete_key": "Confirm Delete {num} Keys",
"delete_key_succ": "\"{key}\" has been deleted",
"copy_value": "Copy Value",
"edit_value": "Edit Value",
@ -38,12 +38,14 @@
"edit_row": "Edit Row",
"delete_row": "Delete Row",
"search": "Search",
"filter_field": "Filter Field",
"filter_value": "Filter Value",
"view_as": "View As",
"reload": "Reload",
"open_connection": "Open Connection",
"open_db": "Open Database",
"close_db": "Close Database",
"filter_key": "Filter Keys",
"filter_key": "Filter Key",
"disconnect": "Disconnect",
"dup_conn": "Duplicate Connection",
"remove_conn": "Delete Connection",
@ -54,7 +56,7 @@
"no_group": "No Group",
"copy_path": "Copy Path",
"batch_delete": "Batch Delete",
"copy_key": "Copy Key Name",
"copy_key": "Copy Key",
"remove_key": "Remove Key",
"new_conn_title": "New Connection",
"edit_conn_title": "Edit Connection",
@ -85,8 +87,8 @@
"new_key_name": "New Key Name",
"new_key": "Add New Key",
"new_field": "Add New Field",
"overwrite_field": "Overwrite Duplicated Field",
"ignore_field": "Ignore Duplicated Field",
"overwrite_field": "Overwrite Existing Field",
"ignore_field": "Ignore Existing Field",
"new_item": "Add New Item",
"insert_type": "Insert",
"append_item": "Append",
@ -124,14 +126,14 @@
"auto_check_update": "Automatically check for updates",
"set_ttl": "Set Key TTL",
"persist_key": "Persist Key",
"copy_value_succ": "Value Copied !",
"copy_succ": "Value Copied !",
"save_value_succ": "Value Saved !",
"handle_succ": "Handle Success !",
"reload_succ": "Reload Success !",
"handle_succ": "Success!",
"reload_succ": "Reloaded!",
"field_required": "This item should not be blank",
"spec_field_required": "\"{key}\" should not be blank",
"nonexist_tab_content": "The selected key does not exist. Please retry",
"empty_server_content": "Connect server from left list",
"nonexist_tab_content": "Selected key does not exist. Please retry",
"empty_server_content": "Select and open a connection from the left",
"empty_server_list": "No redis server",
"reload_when_succ": "Reload immediately after success",
"server": "Server",

View File

@ -208,14 +208,18 @@ const useTabStore = defineStore('tab', {
* @param {string} server
* @param {string|string[]} keys
*/
setSelectedKeys(server, keys) {
if (typeof keys === 'string') {
keys = [keys]
}
setSelectedKeys(server, keys = null) {
let tab = find(this.tabList, { name: server })
if (tab != null) {
if (keys == null) {
// select nothing
tab.selectedKeys = [server]
} else if (typeof keys === 'string') {
tab.selectedKeys = [keys]
} else {
tab.selectedKeys = keys
}
}
},
},
})