mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-20 02:01:47 +01:00
Let subclasses override create Send success msg (#362)
This commit is contained in:
parent
5b751d38a0
commit
4eb50d757d
@ -302,6 +302,8 @@ export class AddEditComponent implements OnInit {
|
|||||||
const encSend = await this.encryptSend(file);
|
const encSend = await this.encryptSend(file);
|
||||||
try {
|
try {
|
||||||
this.formPromise = this.sendService.saveWithServer(encSend);
|
this.formPromise = this.sendService.saveWithServer(encSend);
|
||||||
|
let inactive = false;
|
||||||
|
setTimeout(() => inactive = true, 4500);
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
if (this.send.id == null) {
|
if (this.send.id == null) {
|
||||||
this.send.id = encSend[0].id;
|
this.send.id = encSend[0].id;
|
||||||
@ -309,9 +311,8 @@ export class AddEditComponent implements OnInit {
|
|||||||
if (this.send.accessId == null) {
|
if (this.send.accessId == null) {
|
||||||
this.send.accessId = encSend[0].accessId;
|
this.send.accessId = encSend[0].accessId;
|
||||||
}
|
}
|
||||||
this.platformUtilsService.showToast('success', null,
|
|
||||||
this.i18nService.t(this.editMode ? 'editedSend' : 'createdSend'));
|
|
||||||
this.onSavedSend.emit(this.send);
|
this.onSavedSend.emit(this.send);
|
||||||
|
await this.showSuccessMessage(inactive);
|
||||||
if (this.copyLink) {
|
if (this.copyLink) {
|
||||||
this.copyLinkToClipboard(this.link);
|
this.copyLinkToClipboard(this.link);
|
||||||
}
|
}
|
||||||
@ -321,6 +322,11 @@ export class AddEditComponent implements OnInit {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async showSuccessMessage(inactive: boolean) {
|
||||||
|
this.platformUtilsService.showToast('success', null,
|
||||||
|
this.i18nService.t(this.editMode ? 'editedSend' : 'createdSend'));
|
||||||
|
}
|
||||||
|
|
||||||
clearExpiration() {
|
clearExpiration() {
|
||||||
this.expirationDate = null;
|
this.expirationDate = null;
|
||||||
this.expirationDateFallback = null;
|
this.expirationDateFallback = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user