mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
Capitalize class names
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
export default class addChangePasswordQueueMessage {
|
export default class AddChangePasswordQueueMessage {
|
||||||
type: string;
|
type: string;
|
||||||
cipherId: string;
|
cipherId: string;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export default class addLoginQueueMessage {
|
export default class AddLoginQueueMessage {
|
||||||
type: string;
|
type: string;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ import { Utils } from 'jslib-common/misc/utils';
|
|||||||
|
|
||||||
import { PolicyType } from 'jslib-common/enums/policyType';
|
import { PolicyType } from 'jslib-common/enums/policyType';
|
||||||
|
|
||||||
import addChangePasswordQueueMessage from './models/addChangePasswordQueueMessage';
|
import AddChangePasswordQueueMessage from './models/addChangePasswordQueueMessage';
|
||||||
import addLoginQueueMessage from './models/addLoginQueueMessage';
|
import AddLoginQueueMessage from './models/addLoginQueueMessage';
|
||||||
|
|
||||||
export default class RuntimeBackground {
|
export default class RuntimeBackground {
|
||||||
private runtime: any;
|
private runtime: any;
|
||||||
@@ -255,7 +255,7 @@ export default class RuntimeBackground {
|
|||||||
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
|
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
|
||||||
|
|
||||||
if (queueMessage.type === 'changePassword') {
|
if (queueMessage.type === 'changePassword') {
|
||||||
const message = (queueMessage as addChangePasswordQueueMessage);
|
const message = (queueMessage as AddChangePasswordQueueMessage);
|
||||||
const cipher = await this.getDecryptedCipherById(message.cipherId);
|
const cipher = await this.getDecryptedCipherById(message.cipherId);
|
||||||
if (cipher == null) {
|
if (cipher == null) {
|
||||||
return;
|
return;
|
||||||
@@ -270,7 +270,7 @@ export default class RuntimeBackground {
|
|||||||
|
|
||||||
// If the vault was locked, check if a cipher needs updating instead of creating a new one
|
// If the vault was locked, check if a cipher needs updating instead of creating a new one
|
||||||
if (queueMessage.type === 'addLogin' && queueMessage.wasVaultLocked === true) {
|
if (queueMessage.type === 'addLogin' && queueMessage.wasVaultLocked === true) {
|
||||||
const message = (queueMessage as addLoginQueueMessage);
|
const message = (queueMessage as AddLoginQueueMessage);
|
||||||
const ciphers = await this.cipherService.getAllDecryptedForUrl(message.uri);
|
const ciphers = await this.cipherService.getAllDecryptedForUrl(message.uri);
|
||||||
const usernameMatches = ciphers.filter(c => c.login.username != null &&
|
const usernameMatches = ciphers.filter(c => c.login.username != null &&
|
||||||
c.login.username.toLowerCase() === message.username);
|
c.login.username.toLowerCase() === message.username);
|
||||||
@@ -285,7 +285,7 @@ export default class RuntimeBackground {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async createNewCipher(queueMessage: addLoginQueueMessage, folderId: string) {
|
private async createNewCipher(queueMessage: AddLoginQueueMessage, folderId: string) {
|
||||||
const loginModel = new LoginView();
|
const loginModel = new LoginView();
|
||||||
const loginUri = new LoginUriView();
|
const loginUri = new LoginUriView();
|
||||||
loginUri.uri = queueMessage.uri;
|
loginUri.uri = queueMessage.uri;
|
||||||
@@ -390,7 +390,7 @@ export default class RuntimeBackground {
|
|||||||
private async pushAddLoginToQueue(loginDomain: string, loginInfo: any, tab: any, isVaultLocked: boolean = false) {
|
private async pushAddLoginToQueue(loginDomain: string, loginInfo: any, tab: any, isVaultLocked: boolean = false) {
|
||||||
// remove any old messages for this tab
|
// remove any old messages for this tab
|
||||||
this.removeTabFromNotificationQueue(tab);
|
this.removeTabFromNotificationQueue(tab);
|
||||||
const message: addLoginQueueMessage = {
|
const message: AddLoginQueueMessage = {
|
||||||
type: 'addLogin',
|
type: 'addLogin',
|
||||||
username: loginInfo.username,
|
username: loginInfo.username,
|
||||||
password: loginInfo.password,
|
password: loginInfo.password,
|
||||||
@@ -433,7 +433,7 @@ export default class RuntimeBackground {
|
|||||||
private async pushChangePasswordToQueue(cipherId: string, loginDomain: string, newPassword: string, tab: any, isVaultLocked: boolean = false) {
|
private async pushChangePasswordToQueue(cipherId: string, loginDomain: string, newPassword: string, tab: any, isVaultLocked: boolean = false) {
|
||||||
// remove any old messages for this tab
|
// remove any old messages for this tab
|
||||||
this.removeTabFromNotificationQueue(tab);
|
this.removeTabFromNotificationQueue(tab);
|
||||||
const message: addChangePasswordQueueMessage = {
|
const message: AddChangePasswordQueueMessage = {
|
||||||
type: 'changePassword',
|
type: 'changePassword',
|
||||||
cipherId: cipherId,
|
cipherId: cipherId,
|
||||||
newPassword: newPassword,
|
newPassword: newPassword,
|
||||||
|
|||||||
Reference in New Issue
Block a user