Remove the tutorial components and logic
This commit is contained in:
@@ -73,35 +73,6 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- Welcome logic -->
|
||||
<div class="welcome ng-cloak" ng-show="tutorialSteps[tutorialStep]">
|
||||
<div class="dialog" ng-show="tutorialSteps[tutorialStep].title === 'intro'">
|
||||
<h2>Welcome {{ user.username }}</h2>
|
||||
<p>This is the administration page of your Cloudron. It shows your installed apps.</p>
|
||||
<br/>
|
||||
<button class="btn btn-default pull-left" ng-click="endTutorial();">Skip</button>
|
||||
<button class="btn btn-success pull-right" ng-click="nextTutorialStep();">Next: <b>Cloudron Store</b></button>
|
||||
</div>
|
||||
|
||||
<div class="dialog" ng-show="tutorialSteps[tutorialStep].title === 'appstore'">
|
||||
<h2>Cloudron Store</h2>
|
||||
<p>Install apps easily into any subdomain and control who can access it.</p>
|
||||
<p>Your apps stay updated, backed up and secure with no effort on your part.</p>
|
||||
<br/>
|
||||
<button class="btn btn-default pull-left" ng-click="prevTutorialStep();">Back</button>
|
||||
<button class="btn btn-success pull-right" ng-click="nextTutorialStep();">Last: <b>Users and Groups</b></button>
|
||||
</div>
|
||||
|
||||
<div class="dialog" ng-show="tutorialSteps[tutorialStep].title === 'users'">
|
||||
<h2>Users and Groups</h2>
|
||||
<p>The Cloudron comes with built-in user and group managment</p>
|
||||
<p>Remember, you can use the same credentials to login to all your apps.</p>
|
||||
<br/>
|
||||
<button class="btn btn-default pull-left" ng-click="prevTutorialStep();">Back</button>
|
||||
<button class="btn btn-success pull-right" ng-click="nextTutorialStep();">Start using apps and invite users</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal update -->
|
||||
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -7,45 +7,6 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
$scope.config = {};
|
||||
$scope.client = Client;
|
||||
|
||||
$scope.tutorialStep = -1;
|
||||
$scope.tutorialSteps = [
|
||||
{ title: 'intro', page: '#/apps' },
|
||||
{ title: 'appstore', page: '#/appstore' },
|
||||
{ title: 'users', page: '#/users' }
|
||||
];
|
||||
|
||||
$scope.startTutorial = function () {
|
||||
$scope.tutorialStep = 0;
|
||||
if ($scope.tutorialSteps[$scope.tutorialStep]) window.location.href = $scope.tutorialSteps[$scope.tutorialStep].page;
|
||||
};
|
||||
|
||||
$scope.endTutorial = function () {
|
||||
$scope.tutorialStep = -1;
|
||||
|
||||
Client.setShowTutorial(false, function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
window.location.href = '#/apps';
|
||||
|
||||
// now run configure checks which might show notifications
|
||||
runConfigurationChecks();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.nextTutorialStep = function () {
|
||||
$scope.tutorialStep += 1;
|
||||
|
||||
if ($scope.tutorialSteps[$scope.tutorialStep]) window.location.href = $scope.tutorialSteps[$scope.tutorialStep].page;
|
||||
|
||||
if ($scope.tutorialStep >= $scope.tutorialSteps.length) $scope.endTutorial();
|
||||
};
|
||||
|
||||
$scope.prevTutorialStep = function () {
|
||||
$scope.tutorialStep -= 1;
|
||||
|
||||
if ($scope.tutorialSteps[$scope.tutorialStep]) window.location.href = $scope.tutorialSteps[$scope.tutorialStep].page;
|
||||
};
|
||||
|
||||
$scope.update = {
|
||||
busy: false,
|
||||
error: {},
|
||||
@@ -202,11 +163,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
});
|
||||
}
|
||||
|
||||
if ($scope.user.admin) {
|
||||
// welcome screen or configure checks immediately
|
||||
if ($scope.user.showTutorial) $scope.startTutorial();
|
||||
else runConfigurationChecks();
|
||||
}
|
||||
if ($scope.user.admin) runConfigurationChecks();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -136,7 +136,6 @@
|
||||
<tr>
|
||||
<td class="text-right" colspan="2" style="vertical-align: top;">
|
||||
<br/>
|
||||
<button class="btn btn-outline btn-xs btn-default" ng-show="user.admin" ng-click="showTutorial()">Show Tutorial</button>
|
||||
<button class="btn btn-outline btn-xs btn-danger" ng-click="passwordchange.show()">Change Password</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -167,13 +167,6 @@ angular.module('Application').controller('AccountController', ['$scope', 'Client
|
||||
}
|
||||
};
|
||||
|
||||
$scope.showTutorial = function () {
|
||||
Client.setShowTutorial(true, function (error) {
|
||||
if (error) return console.error(error);
|
||||
$scope.$parent.startTutorial();
|
||||
});
|
||||
};
|
||||
|
||||
// poor man's async
|
||||
function asyncForEach(items, handler, callback) {
|
||||
var cur = 0;
|
||||
|
||||
Reference in New Issue
Block a user