mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-31 08:20:37 +01:00
lint fixes
This commit is contained in:
parent
cae8beaa8f
commit
a57110b935
@ -4,7 +4,9 @@ angular
|
|||||||
.config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider,
|
.config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider,
|
||||||
$uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, appSettings
|
$uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, appSettings
|
||||||
// @if !selfHosted
|
// @if !selfHosted
|
||||||
|
/* jshint ignore:start */
|
||||||
, stripeProvider
|
, stripeProvider
|
||||||
|
/* jshint ignore:end */
|
||||||
// @endif
|
// @endif
|
||||||
) {
|
) {
|
||||||
angular.extend(appSettings, window.bitwardenAppSettings);
|
angular.extend(appSettings, window.bitwardenAppSettings);
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
.controller('organizationBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService,
|
.controller('organizationBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService,
|
||||||
$analytics, toastr, existingPaymentMethod
|
$analytics, toastr, existingPaymentMethod
|
||||||
// @if !selfHosted
|
// @if !selfHosted
|
||||||
|
/* jshint ignore:start */
|
||||||
, stripe
|
, stripe
|
||||||
|
/* jshint ignore:end */
|
||||||
// @endif
|
// @endif
|
||||||
) {
|
) {
|
||||||
$analytics.eventTrack('organizationBillingChangePaymentController', { category: 'Modal' });
|
$analytics.eventTrack('organizationBillingChangePaymentController', { category: 'Modal' });
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
var url = appSettings.apiUri + '/organizations/' + $state.params.orgId +
|
var url = appSettings.apiUri + '/organizations/' + $state.params.orgId +
|
||||||
'/billing-invoice/' + charge.invoiceId + '?access_token=' + tokenService.getToken();
|
'/billing-invoice/' + charge.invoiceId + '?access_token=' + tokenService.getToken();
|
||||||
$window.open(url);
|
$window.open(url);
|
||||||
}
|
};
|
||||||
|
|
||||||
function load() {
|
function load() {
|
||||||
apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) {
|
apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) {
|
||||||
|
@ -88,7 +88,6 @@
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exportCiphers.push(cipher);
|
exportCiphers.push(cipher);
|
||||||
|
@ -87,15 +87,16 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
editModel.result.then(function (returnVal) {
|
editModel.result.then(function (returnVal) {
|
||||||
|
var index;
|
||||||
if (returnVal.action === 'edit') {
|
if (returnVal.action === 'edit') {
|
||||||
var index = $scope.ciphers.indexOf(cipher);
|
index = $scope.ciphers.indexOf(cipher);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
|
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
|
||||||
$scope.ciphers[index] = returnVal.data;
|
$scope.ciphers[index] = returnVal.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (returnVal.action === 'delete') {
|
else if (returnVal.action === 'delete') {
|
||||||
var index = $scope.ciphers.indexOf(cipher);
|
index = $scope.ciphers.indexOf(cipher);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
$scope.ciphers.splice(index, 1);
|
$scope.ciphers.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@
|
|||||||
case 'login': case null: case undefined:
|
case 'login': case null: case undefined:
|
||||||
cipher.type = constants.cipherType.login;
|
cipher.type = constants.cipherType.login;
|
||||||
|
|
||||||
var totp = value.login_totp || value.totp
|
var totp = value.login_totp || value.totp;
|
||||||
var uri = value.login_uri || value.uri;
|
var uri = value.login_uri || value.uri;
|
||||||
var username = value.login_username || value.username;
|
var username = value.login_username || value.username;
|
||||||
var password = value.login_password || value.password;
|
var password = value.login_password || value.password;
|
||||||
@ -434,7 +434,7 @@
|
|||||||
case 'login': case null: case undefined:
|
case 'login': case null: case undefined:
|
||||||
cipher.type = constants.cipherType.login;
|
cipher.type = constants.cipherType.login;
|
||||||
|
|
||||||
var totp = value.login_totp || value.totp
|
var totp = value.login_totp || value.totp;
|
||||||
var uri = value.login_uri || value.uri;
|
var uri = value.login_uri || value.uri;
|
||||||
var username = value.login_username || value.username;
|
var username = value.login_username || value.username;
|
||||||
var password = value.login_password || value.password;
|
var password = value.login_password || value.password;
|
||||||
@ -2319,6 +2319,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fields = [];
|
var fields = [];
|
||||||
|
/* jshint ignore:start */
|
||||||
$.each(outterTable.find('table td:not(.subcaption)'), function (indexInArray, valueOfElement) {
|
$.each(outterTable.find('table td:not(.subcaption)'), function (indexInArray, valueOfElement) {
|
||||||
$(valueOfElement).find('br').replaceWith('\n');
|
$(valueOfElement).find('br').replaceWith('\n');
|
||||||
var t = $(valueOfElement).text();
|
var t = $(valueOfElement).text();
|
||||||
@ -2326,6 +2327,7 @@
|
|||||||
fields.push(t.split('\\n').join('\n'));
|
fields.push(t.split('\\n').join('\n'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
/* jshint ignore:end */
|
||||||
|
|
||||||
if (fields.length && (fields.length % 2 === 0))
|
if (fields.length && (fields.length % 2 === 0))
|
||||||
for (var j = 0; j < fields.length; j += 2) {
|
for (var j = 0; j < fields.length; j += 2) {
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
.controller('settingsBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService,
|
.controller('settingsBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService,
|
||||||
$analytics, toastr, existingPaymentMethod, appSettings, $timeout
|
$analytics, toastr, existingPaymentMethod, appSettings, $timeout
|
||||||
// @if !selfHosted
|
// @if !selfHosted
|
||||||
|
/* jshint ignore:start */
|
||||||
, stripe
|
, stripe
|
||||||
|
/* jshint ignore:end */
|
||||||
// @endif
|
// @endif
|
||||||
) {
|
) {
|
||||||
$analytics.eventTrack('settingsBillingChangePaymentController', { category: 'Modal' });
|
$analytics.eventTrack('settingsBillingChangePaymentController', { category: 'Modal' });
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
.controller('settingsCreateOrganizationController', function ($scope, $state, apiService, cryptoService,
|
.controller('settingsCreateOrganizationController', function ($scope, $state, apiService, cryptoService,
|
||||||
toastr, $analytics, authService, constants, appSettings, validationService
|
toastr, $analytics, authService, constants, appSettings, validationService
|
||||||
// @if !selfHosted
|
// @if !selfHosted
|
||||||
|
/* jshint ignore:start */
|
||||||
, stripe
|
, stripe
|
||||||
|
/* jshint ignore:end */
|
||||||
// @endif
|
// @endif
|
||||||
) {
|
) {
|
||||||
$scope.plans = constants.plans;
|
$scope.plans = constants.plans;
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
.controller('settingsPremiumController', function ($scope, $state, apiService, toastr, $analytics, authService,
|
.controller('settingsPremiumController', function ($scope, $state, apiService, toastr, $analytics, authService,
|
||||||
constants, $timeout, appSettings, validationService
|
constants, $timeout, appSettings, validationService
|
||||||
// @if !selfHosted
|
// @if !selfHosted
|
||||||
|
/* jshint ignore:start */
|
||||||
, stripe
|
, stripe
|
||||||
|
/* jshint ignore:end */
|
||||||
// @endif
|
// @endif
|
||||||
) {
|
) {
|
||||||
var profile = null;
|
var profile = null;
|
||||||
|
@ -79,7 +79,6 @@
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exportCiphers.push(cipher);
|
exportCiphers.push(cipher);
|
||||||
|
@ -112,6 +112,7 @@
|
|||||||
var attachmentSharePromises = [];
|
var attachmentSharePromises = [];
|
||||||
if ($scope.cipher.attachments) {
|
if ($scope.cipher.attachments) {
|
||||||
for (var i = 0; i < $scope.cipher.attachments.length; i++) {
|
for (var i = 0; i < $scope.cipher.attachments.length; i++) {
|
||||||
|
/* jshint ignore:start */
|
||||||
(function (attachment) {
|
(function (attachment) {
|
||||||
var promise = cipherService.downloadAndDecryptAttachment(null, attachment, false)
|
var promise = cipherService.downloadAndDecryptAttachment(null, attachment, false)
|
||||||
.then(function (decData) {
|
.then(function (decData) {
|
||||||
@ -136,6 +137,7 @@
|
|||||||
});
|
});
|
||||||
attachmentSharePromises.push(promise);
|
attachmentSharePromises.push(promise);
|
||||||
})($scope.cipher.attachments[i]);
|
})($scope.cipher.attachments[i]);
|
||||||
|
/* jshint ignore:end */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,10 +142,11 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
editModel.result.then(function (returnVal) {
|
editModel.result.then(function (returnVal) {
|
||||||
var rootCipher = findRootCipher(cipher) || { meta: {} };
|
var rootCipher = findRootCipher(cipher) || { meta: {} },
|
||||||
|
index;
|
||||||
|
|
||||||
if (returnVal.action === 'edit') {
|
if (returnVal.action === 'edit') {
|
||||||
var index = $scope.ciphers.indexOf(cipher);
|
index = $scope.ciphers.indexOf(cipher);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
|
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
|
||||||
$scope.ciphers[index] = returnVal.data;
|
$scope.ciphers[index] = returnVal.data;
|
||||||
@ -163,7 +164,7 @@
|
|||||||
cipher.favorite = rootCipher.favorite = returnVal.data.favorite;
|
cipher.favorite = rootCipher.favorite = returnVal.data.favorite;
|
||||||
}
|
}
|
||||||
else if (returnVal.action === 'delete') {
|
else if (returnVal.action === 'delete') {
|
||||||
var index = $scope.ciphers.indexOf(cipher);
|
index = $scope.ciphers.indexOf(cipher);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
$scope.ciphers.splice(index, 1);
|
$scope.ciphers.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user