mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
@@ -299,27 +299,30 @@ export class AddEditComponent implements OnInit {
|
|||||||
this.password = null;
|
this.password = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const encSend = await this.encryptSend(file);
|
this.formPromise = this.encryptSend(file)
|
||||||
try {
|
.then(async encSend => {
|
||||||
this.formPromise = this.sendService.saveWithServer(encSend);
|
try {
|
||||||
let inactive = false;
|
const uploadPromise = this.sendService.saveWithServer(encSend);
|
||||||
setTimeout(() => inactive = true, 4500);
|
let inactive = false;
|
||||||
await this.formPromise;
|
setTimeout(() => inactive = true, 4500);
|
||||||
if (this.send.id == null) {
|
await uploadPromise;
|
||||||
this.send.id = encSend[0].id;
|
if (this.send.id == null) {
|
||||||
}
|
this.send.id = encSend[0].id;
|
||||||
if (this.send.accessId == null) {
|
}
|
||||||
this.send.accessId = encSend[0].accessId;
|
if (this.send.accessId == null) {
|
||||||
}
|
this.send.accessId = encSend[0].accessId;
|
||||||
this.onSavedSend.emit(this.send);
|
}
|
||||||
await this.showSuccessMessage(inactive);
|
this.onSavedSend.emit(this.send);
|
||||||
if (this.copyLink) {
|
await this.showSuccessMessage(inactive);
|
||||||
this.copyLinkToClipboard(this.link);
|
if (this.copyLink) {
|
||||||
}
|
this.copyLinkToClipboard(this.link);
|
||||||
return true;
|
}
|
||||||
} catch { }
|
return true;
|
||||||
|
} catch { }
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
return await this.formPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
async showSuccessMessage(inactive: boolean) {
|
async showSuccessMessage(inactive: boolean) {
|
||||||
|
|||||||
Reference in New Issue
Block a user