Introduce basic welcome tutorial flow

This commit is contained in:
Johannes Zellner
2016-05-06 13:06:12 +02:00
parent d50fa70f47
commit bf99475dbd
3 changed files with 106 additions and 0 deletions

View File

@@ -7,6 +7,27 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
$scope.config = {};
$scope.client = Client;
$scope.welcomeStep = -1;
$scope.welcomeSteps = [
{ title: 'intro', page: '#/apps' },
{ title: 'apps', page: '#/apps' },
{ title: 'appstore', page: '#/appstore' },
{ title: 'users', page: '#/users' },
{ title: 'finish', page: '#/apps' }
];
$scope.nextWelcomeStep = function () {
$scope.welcomeStep += 1;
if ($scope.welcomeSteps[$scope.welcomeStep]) window.location.href = $scope.welcomeSteps[$scope.welcomeStep].page;
};
$scope.prevWelcomeStep = function () {
$scope.welcomeStep -= 1;
if ($scope.welcomeSteps[$scope.welcomeStep]) window.location.href = $scope.welcomeSteps[$scope.welcomeStep].page;
};
$scope.update = {
busy: false,
error: {},
@@ -142,6 +163,11 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
}
});
}
// welcome screen
// setTimeout(function () {
// $scope.nextWelcomeStep();
// }, 1000);
});
});
});