added password setting error UI
This commit is contained in:
parent
c18f488be7
commit
14b40d820b
9 changed files with 63 additions and 48 deletions
|
@ -21,11 +21,17 @@ export default class OwnedFile {
|
|||
}
|
||||
|
||||
async setPassword(password) {
|
||||
this.password = password;
|
||||
this._hasPassword = true;
|
||||
this.keychain.setPassword(password, this.url);
|
||||
const result = await setPassword(this.id, this.ownerToken, this.keychain);
|
||||
return result;
|
||||
try {
|
||||
this.password = password;
|
||||
this._hasPassword = true;
|
||||
this.keychain.setPassword(password, this.url);
|
||||
const result = await setPassword(this.id, this.ownerToken, this.keychain);
|
||||
return result;
|
||||
} catch (e) {
|
||||
this.password = null;
|
||||
this._hasPassword = false;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
del() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue