fix: incorrect status display in connection dialog.

This commit is contained in:
tiny-craft 2023-10-05 19:38:33 +08:00
parent 66ac7194e2
commit aad4bcf17b
3 changed files with 5 additions and 1 deletions

View File

@ -126,6 +126,7 @@ const onSaveConnection = async () => {
const resetForm = () => {
generalForm.value = connectionStore.newDefaultConnection()
generalFormRef.value?.restoreValidation()
testing.value = false
showTestResult.value = false
testResult.value = ''
tab.value = 'general'
@ -135,6 +136,7 @@ watch(
() => dialogStore.connDialogVisible,
(visible) => {
if (visible) {
resetForm()
editName.value = get(dialogStore.connParam, 'name', '')
generalForm.value = dialogStore.connParam || connectionStore.newDefaultConnection()
generalForm.value.ssh.loginType = generalForm.value.ssh.loginType || 'pwd'
@ -286,7 +288,7 @@ const onClose = () => {
<n-form-item :label="$t('dialogue.connection.addr')" required>
<n-input
v-model:value="generalForm.ssh.addr"
:placeholder="$t('dialogue.connection.addr_tip')" />
:placeholder="$t('dialogue.connection.ssh_addr_tip')" />
<n-text style="width: 40px; text-align: center">:</n-text>
<n-input-number
v-model:value="generalForm.ssh.port"

View File

@ -139,6 +139,7 @@
"login_type": "Login Type",
"pkfile": "Private Key File",
"passphrase": "Passphrase",
"ssh_addr_tip": "SSH Server Host",
"ssh_usr_tip": "SSH Username",
"ssh_pwd_tip": "SSH Password",
"pkfile_tip": "SSH Private Key File Path",

View File

@ -139,6 +139,7 @@
"login_type": "登录类型",
"pkfile": "私钥文件",
"passphrase": "私钥密码",
"ssh_addr_tip": "SSH地址",
"ssh_usr_tip": "SSH登录用户名",
"ssh_pwd_tip": "SSH登录密码",
"pkfile_tip": "SSH私钥文件路径",