1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

option to disable change password notification

This commit is contained in:
Kyle Spearrin
2018-07-31 23:48:11 -04:00
parent cf57eadd1d
commit 4076247908
5 changed files with 53 additions and 19 deletions

View File

@@ -200,6 +200,7 @@ export default class RuntimeBackground {
}
this.main.notificationQueue.splice(i, 1);
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
const loginModel = new LoginView();
const loginUri = new LoginUriView();
@@ -218,8 +219,6 @@ export default class RuntimeBackground {
hitType: 'event',
eventAction: 'Added Login from Notification Bar',
});
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
}
}
@@ -236,6 +235,7 @@ export default class RuntimeBackground {
}
this.main.notificationQueue.splice(i, 1);
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
const cipher = await this.cipherService.get(queueMessage.cipherId);
if (cipher != null && cipher.type === CipherType.Login) {
@@ -248,8 +248,6 @@ export default class RuntimeBackground {
eventAction: 'Changed Password from Notification Bar',
});
}
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
}
}
@@ -266,9 +264,10 @@ export default class RuntimeBackground {
}
this.main.notificationQueue.splice(i, 1);
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
const hostname = Utils.getHostname(tab.url);
await this.cipherService.saveNeverDomain(hostname);
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
}
}
@@ -418,8 +417,10 @@ export default class RuntimeBackground {
const responseData: any = {};
if (responseCommand === 'notificationBarDataResponse') {
responseData.neverDomains = await this.storageService.get<any>(ConstantsService.neverDomainsKey);
responseData.disabledNotification = await this.storageService.get<boolean>(
responseData.disabledAddLoginNotification = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey);
responseData.disabledChangedPasswordNotification = await this.storageService.get<boolean>(
ConstantsService.disableChangedPasswordNotificationKey);
} else if (responseCommand === 'autofillerAutofillOnPageLoadEnabledResponse') {
responseData.autofillEnabled = await this.storageService.get<boolean>(
ConstantsService.enableAutoFillOnPageLoadKey);