Minor fixes I missed initially

This commit is contained in:
Robyn MacCallum 2021-11-16 10:02:15 -05:00
parent 3fd627a67b
commit fc2256ce1b
5 changed files with 6 additions and 11 deletions

View File

@ -155,7 +155,9 @@ export default class MainBackground {
this.messagingService = new BrowserMessagingService();
this.storageService = new BrowserStorageService();
this.secureStorageService = new BrowserStorageService();
this.logService = new ConsoleLogService(false);
// const storeService = new StoreService(this.storageService, this.secureStorageService);
this.stateService = new StateService(this.storageService, this.secureStorageService, this.logService);
this.platformUtilsService = new BrowserPlatformUtilsService(this.messagingService, this.stateService,
(clipboardValue, clearMs) => {
if (this.systemService != null) {
@ -177,7 +179,6 @@ export default class MainBackground {
});
this.i18nService = new I18nService(BrowserApi.getUILanguage(window));
this.cryptoFunctionService = new WebCryptoFunctionService(window, this.platformUtilsService);
this.logService = new ConsoleLogService(false);
this.cryptoService = new BrowserCryptoService(this.cryptoFunctionService, this.platformUtilsService,
this.logService, this.stateService);
this.tokenService = new TokenService(this.stateService);
@ -200,7 +201,6 @@ export default class MainBackground {
this.sendService = new SendService(this.cryptoService, this.apiService,
this.fileUploadService, this.i18nService,
this.cryptoFunctionService, this.stateService);
this.stateService = new StateService(this.storageService, this.secureStorageService, this.logService);
this.organizationService = new OrganizationService(this.stateService);
this.policyService = new PolicyService(this.stateService, this.organizationService, this.apiService);
this.keyConnectorSerivce = new KeyConnectorService(this.stateService, this.cryptoService,

View File

@ -5,7 +5,6 @@ import { I18nService } from 'jslib-common/abstractions/i18n.service';
import { MessagingService } from 'jslib-common/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
import { StateService } from 'jslib-common/abstractions/state.service';
import { StorageService } from 'jslib-common/abstractions/storage.service';
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
import { Utils } from 'jslib-common/misc/utils';

View File

@ -9,7 +9,6 @@ import { FolderService } from 'jslib-common/abstractions/folder.service';
import { PolicyService } from 'jslib-common/abstractions/policy.service';
import { StorageService } from 'jslib-common/abstractions/storage.service';
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
import { ConstantsService } from 'jslib-common/services/constants.service';
import { AutofillService } from '../services/abstractions/autofill.service';
import { BrowserApi } from '../browser/browserApi';
@ -26,6 +25,7 @@ import AddLoginRuntimeMessage from './models/addLoginRuntimeMessage';
import ChangePasswordRuntimeMessage from './models/changePasswordRuntimeMessage';
import LockedVaultPendingNotificationsItem from './models/lockedVaultPendingNotificationsItem';
import { NotificationQueueMessageType } from './models/notificationQueueMessageType';
import { StateService } from 'jslib-common/abstractions/state.service';
export default class NotificationBackground {
@ -34,7 +34,7 @@ export default class NotificationBackground {
constructor(private main: MainBackground, private autofillService: AutofillService,
private cipherService: CipherService, private storageService: StorageService,
private vaultTimeoutService: VaultTimeoutService, private policyService: PolicyService,
private folderService: FolderService) {
private folderService: FolderService, private stateService: StateService) {
}
async init() {
@ -204,8 +204,7 @@ export default class NotificationBackground {
const usernameMatches = ciphers.filter(c =>
c.login.username != null && c.login.username.toLowerCase() === normalizedUsername);
if (usernameMatches.length === 0) {
const disabledAddLogin = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey);
const disabledAddLogin = await this.stateService.getDisableAddLoginNotification();
if (disabledAddLogin) {
return;
}
@ -217,8 +216,7 @@ export default class NotificationBackground {
this.pushAddLoginToQueue(loginDomain, loginInfo, tab);
} else if (usernameMatches.length === 1 && usernameMatches[0].login.password !== loginInfo.password) {
const disabledChangePassword = await this.storageService.get<boolean>(
ConstantsService.disableChangedPasswordNotificationKey);
const disabledChangePassword = await this.stateService.getDisableChangedPasswordNotification();
if (disabledChangePassword) {
return;
}

View File

@ -7,7 +7,6 @@ import { LogService } from 'jslib-common/abstractions/log.service';
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hint.component';
import { LogService } from 'jslib-common/abstractions/log.service';
@Component({
selector: 'app-hint',

View File

@ -14,7 +14,6 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import {
FolderAddEditComponent as BaseFolderAddEditComponent,
} from 'jslib-angular/components/folder-add-edit.component';
import { LogService } from 'jslib-common/abstractions/log.service';
@Component({
selector: 'app-folder-add-edit',