Skip to content

Commit 370bcbe

Browse files
authored
Merge pull request #16 from RecordEvolution/DewitteRuben/issue2
fix: do not reject dialog on wrong password (keep dialog promise alive)
2 parents 730d92c + ccda731 commit 370bcbe

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

src/renderer/src/components/SudoDialog.vue

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ async function setSudoPassword() {
2121
snackstore.setText('errors.invalid_sudo_password')
2222
snackstore.setColor('error')
2323
snackstore.setVisible(true)
24-
25-
return reject.value()
24+
25+
return // do nothing
2626
} finally {
2727
checkingPassword.value = false
2828
}
@@ -92,28 +92,14 @@ watch(showDialog, (newVal) => {
9292
</v-container>
9393

9494
<v-container py-2>
95-
<v-text-field
96-
v-model="sudoPassword"
97-
autofocus
98-
:append-icon="showSudoPassword ? 'mdi-eye' : 'mdi-eye-off'"
99-
:type="showSudoPassword ? 'text' : 'password'"
100-
name="input-sudoPasswd"
101-
variant="outlined"
102-
:label="$t('admin_password')"
103-
:disabled="checkingPassword"
104-
@click:append="showSudoPassword = !showSudoPassword"
105-
v-on:keyup.enter="setSudoPassword"
106-
></v-text-field>
95+
<v-text-field v-model="sudoPassword" autofocus :append-icon="showSudoPassword ? 'mdi-eye' : 'mdi-eye-off'"
96+
:type="showSudoPassword ? 'text' : 'password'" name="input-sudoPasswd" variant="outlined"
97+
:label="$t('admin_password')" :disabled="checkingPassword"
98+
@click:append="showSudoPassword = !showSudoPassword" v-on:keyup.enter="setSudoPassword"></v-text-field>
10799
</v-container>
108100

109101
<div class="d-flex justify-center">
110-
<v-btn
111-
small
112-
color="secondary"
113-
rounded
114-
:loading="checkingPassword"
115-
@click="setSudoPassword"
116-
>
102+
<v-btn small color="secondary" rounded :loading="checkingPassword" @click="setSudoPassword">
117103
<v-icon left> mdi-exit-to-app </v-icon>
118104
{{ $t('submit') }}
119105
</v-btn>

0 commit comments

Comments
 (0)