diff --git a/src/js/client.js b/src/js/client.js index 824629094..04a8c35b3 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -2272,6 +2272,9 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout // we only allow the owner to do so if (!this._userInfo.isAtLeastOwner) return; + // basically the user has not setup appstore account yet + if (!subscription.plan) return window.location.href = '/#/appstore'; + var that = this; var email = subscription.emailEncoded; @@ -2285,7 +2288,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout var url = that.getConfig().webServerOrigin + '/console.html#/userprofile?view=subscriptions&email=' + email + '&token=' + token; // Only open the subscription setup dialog when no subscription exists - if (subscription.plan.id === 'free') url += '&cloudronId=' + cloudronId + if (!subscription.plan || subscription.plan.id === 'free') url += '&cloudronId=' + cloudronId window.location.href = url; }); diff --git a/src/views/branding.html b/src/views/branding.html index cc5555d46..89039d08b 100644 --- a/src/views/branding.html +++ b/src/views/branding.html @@ -89,6 +89,10 @@
- Customizing the footer is only available in the premium plan. +
+
+ Customizing the footer is only available in the paid plans. Setup Subscription Now +
+
diff --git a/src/views/branding.js b/src/views/branding.js index 648c7b56a..745417b6d 100644 --- a/src/views/branding.js +++ b/src/views/branding.js @@ -9,6 +9,10 @@ angular.module('Application').controller('BrandingController', ['$scope', '$loca $scope.user = Client.getUserInfo(); $scope.config = Client.getConfig(); + $scope.openSubscriptionSetup = function () { + Client.openSubscriptionSetup($scope.$parent.subscription); + }; + $scope.avatarChange = { avatar: null, // { file, data, url }