lint fixes
This commit is contained in:
parent
51f2c9a30c
commit
9ffbd0bb69
|
@ -7,7 +7,7 @@ class TokenRequest {
|
|||
device?: any;
|
||||
|
||||
constructor(email: string, masterPasswordHash: string, provider: number,
|
||||
token: string, remember: boolean, device?: any) {
|
||||
token: string, remember: boolean, device?: any) {
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.token = token;
|
||||
|
|
|
@ -9,7 +9,7 @@ class ActionButtonsController implements ng.IController {
|
|||
constants: any;
|
||||
|
||||
constructor(private i18nService: any, private $analytics: any, private constantsService: any, private toastr: any,
|
||||
private $timeout: any, private $window: any, private utilsService: any) {
|
||||
private $timeout: any, private $window: any, private utilsService: any) {
|
||||
this.i18n = i18nService;
|
||||
this.constants = constantsService;
|
||||
}
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
angular
|
||||
.module('bit.components')
|
||||
|
||||
.component('actionButtons', {
|
||||
bindings: {
|
||||
cipher: '<',
|
||||
showView: '<',
|
||||
onView: '&'
|
||||
},
|
||||
templateUrl: 'app/components/views/actionButtons.html',
|
||||
controller: function (i18nService, $analytics, constantsService, toastr, $timeout, $window, utilsService) {
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.$onInit = function () {
|
||||
ctrl.i18n = i18nService;
|
||||
ctrl.constants = constantsService;
|
||||
|
||||
ctrl.launch = function () {
|
||||
$timeout(function () {
|
||||
if (ctrl.cipher.login.uri.startsWith('http://') || ctrl.cipher.login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: ctrl.cipher.login.uri });
|
||||
if (utilsService.inPopup($window)) {
|
||||
$window.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
ctrl.clipboardError = function (e) {
|
||||
toastr.info(i18nService.browserNotSupportClipboard);
|
||||
};
|
||||
|
||||
ctrl.clipboardSuccess = function (e, type, aType) {
|
||||
e.clearSelection();
|
||||
$analytics.eventTrack('Copied ' + aType);
|
||||
toastr.info(type + i18nService.valueCopied);
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
|
@ -16,8 +16,7 @@ class IconController implements ng.IController {
|
|||
if (!this.iconsUrl) {
|
||||
if (environmentService.baseUrl) {
|
||||
this.iconsUrl = environmentService.baseUrl + '/icons';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.iconsUrl = 'https://icons.bitwarden.com';
|
||||
}
|
||||
}
|
||||
|
@ -51,16 +50,13 @@ class IconController implements ng.IController {
|
|||
if (hostnameUri.indexOf('androidapp://') === 0) {
|
||||
this.icon = 'fa-android';
|
||||
this.image = null;
|
||||
}
|
||||
else if (hostnameUri.indexOf('iosapp://') === 0) {
|
||||
} else if (hostnameUri.indexOf('iosapp://') === 0) {
|
||||
this.icon = 'fa-apple';
|
||||
this.image = null;
|
||||
}
|
||||
else if (this.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('.') > -1) {
|
||||
} else if (this.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('.') > -1) {
|
||||
hostnameUri = 'http://' + hostnameUri;
|
||||
isWebsite = true;
|
||||
}
|
||||
else if (this.imageEnabled) {
|
||||
} else if (this.imageEnabled) {
|
||||
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > -1;
|
||||
}
|
||||
|
||||
|
@ -69,11 +65,9 @@ class IconController implements ng.IController {
|
|||
const url = new URL(hostnameUri);
|
||||
this.image = this.iconsUrl + '/' + url.hostname + '/icon.png';
|
||||
this.fallbackImage = chrome.extension.getURL('images/fa-globe.png');
|
||||
}
|
||||
catch (e) { }
|
||||
} catch (e) { }
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.image = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@ export default class UtilsService {
|
|||
|
||||
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Gecko/') !== -1) {
|
||||
this.browserCache = Browser.Firefox;
|
||||
} else if ((!!(window as any).opr && !!(window as any).opr.addons) || !!(window as any).opera || navigator.userAgent.indexOf(' OPR/') >= 0) {
|
||||
} else if ((!!(window as any).opr && !!(window as any).opr.addons) || !!(window as any).opera ||
|
||||
navigator.userAgent.indexOf(' OPR/') >= 0) {
|
||||
this.browserCache = Browser.Opera;
|
||||
} else if (navigator.userAgent.indexOf(' Edge/') !== -1) {
|
||||
this.browserCache = Browser.Edge;
|
||||
|
@ -74,7 +75,8 @@ export default class UtilsService {
|
|||
return;
|
||||
}
|
||||
|
||||
const text = $(this).find('input, textarea').not('input[type="checkbox"], input[type="radio"], input[type="hidden"]');
|
||||
const text = $(this).find('input, textarea')
|
||||
.not('input[type="checkbox"], input[type="radio"], input[type="hidden"]');
|
||||
const checkbox = $(this).find('input[type="checkbox"]');
|
||||
const select = $(this).find('select');
|
||||
|
||||
|
|
Loading…
Reference in New Issue