1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 11:43:46 +00:00

more preprocessing for self host

This commit is contained in:
Kyle Spearrin
2017-08-15 10:05:39 -04:00
parent 635caa9ad0
commit 4d25077108
7 changed files with 66 additions and 11 deletions

View File

@@ -1,8 +1,12 @@
angular
.module('bit.organization')
.controller('settingsBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService, stripe,
$analytics, toastr, existingPaymentMethod, appSettings, $timeout) {
.controller('settingsBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService,
$analytics, toastr, existingPaymentMethod, appSettings, $timeout
// @if !selfHosted
, stripe
// @endif
) {
$analytics.eventTrack('settingsBillingChangePaymentController', { category: 'Modal' });
$scope.existingPaymentMethod = existingPaymentMethod;
$scope.paymentMethod = 'card';

View File

@@ -2,7 +2,11 @@
.module('bit.settings')
.controller('settingsCreateOrganizationController', function ($scope, $state, apiService, cryptoService,
toastr, $analytics, authService, stripe, constants, appSettings, validationService) {
toastr, $analytics, authService, constants, appSettings, validationService
// @if !selfHosted
, stripe
// @endif
) {
$scope.plans = constants.plans;
$scope.storageGb = constants.storageGb;
$scope.paymentMethod = 'card';

View File

@@ -1,8 +1,12 @@
angular
.module('bit.settings')
.controller('settingsPremiumController', function ($scope, $state, apiService, toastr, $analytics, authService, stripe,
constants, $timeout, appSettings, validationService) {
.controller('settingsPremiumController', function ($scope, $state, apiService, toastr, $analytics, authService,
constants, $timeout, appSettings, validationService
// @if !selfHosted
, stripe
// @endif
) {
authService.getUserProfile().then(function (profile) {
if (profile.premium) {
return $state.go('backend.user.settingsBilling');