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

View File

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