97
97
id =" password_check_button"
98
98
type =" button"
99
99
class =" btn btn-success"
100
- data-dismiss =" modal"
101
100
@click =" checkMasterPassword"
102
101
>
103
102
Ok
@@ -142,7 +141,6 @@ export default {
142
141
isNewPassword: false ,
143
142
passwordMessage:
144
143
" Please provide your master password to unlock your connection credentials for this session." ,
145
- masterPassConfirmed: true ,
146
144
};
147
145
},
148
146
computed: {
@@ -179,14 +177,10 @@ export default {
179
177
this .$refs .masterPassCheckInput .focus ();
180
178
}
181
179
});
182
-
183
- $ (this .$refs .masterPasswordModal ).on (" hidden.bs.modal" , () => {
184
- if (! this .masterPassConfirmed ) {
185
- this .showModal ();
186
- }
187
- });
188
180
},
189
181
showModal () {
182
+ this .passwordMessage =
183
+ " Please provide your master password to unlock your connection credentials for this session." ;
190
184
$ (this .$refs .masterPasswordModal ).modal ({
191
185
backdrop: " static" ,
192
186
keyboard: false ,
@@ -198,27 +192,24 @@ export default {
198
192
master_password: this .password ,
199
193
})
200
194
.then (() => {
201
- this .$emit (" checkCompleted" )
195
+ this .$emit (" checkCompleted" );
202
196
showToast (" success" , " Master password created." );
203
197
});
204
198
},
205
199
checkMasterPassword () {
206
- $ (this .$refs .masterPasswordModal ).modal (" hide" );
207
200
axios
208
201
.post (" /master_password/" , {
209
202
master_password: this .checkPassword ,
210
203
})
211
204
.then (() => {
212
- this .$emit ( " checkCompleted " )
213
- this .masterPassConfirmed = true ;
205
+ $ ( this .$refs . masterPasswordModal ). modal ( " hide " );
206
+ this .$emit ( " checkCompleted " ) ;
214
207
})
215
208
.catch ((error ) => {
216
209
this .passwordMessage = error .response .data .data ;
217
- this .masterPassConfirmed = false ;
218
210
});
219
211
},
220
212
resetPassword () {
221
- this .masterPassConfirmed = true ;
222
213
createMessageModal (
223
214
` Are you sure you want to reset you master password?
224
215
You will lose your saved connection passwords.` ,
0 commit comments