web themes

This commit is contained in:
Mo Bitar
2017-04-10 15:05:13 -05:00
parent 7a814eb122
commit 5e722e5291
10 changed files with 431 additions and 53 deletions

View File

@@ -1,11 +1,12 @@
class BaseCtrl {
constructor(syncManager, dbManager) {
constructor($scope, syncManager, dbManager, $timeout) {
dbManager.openDatabase(null, function(){
// new database, delete syncToken so that items can be refetched entirely from server
syncManager.clearSyncToken();
syncManager.sync();
})
}
}
angular.module('app.frontend').controller('BaseCtrl', BaseCtrl);

View File

@@ -1,5 +1,5 @@
angular.module('app.frontend')
.controller('HomeCtrl', function ($scope, $location, $rootScope, $timeout, modelManager, syncManager, authManager) {
.controller('HomeCtrl', function ($scope, $location, $rootScope, $timeout, modelManager, syncManager, authManager, themeManager) {
function urlParam(key) {
return $location.search()[key];
@@ -34,6 +34,7 @@ angular.module('app.frontend')
syncManager.loadLocalItems(function(items) {
$scope.allTag.didLoad = true;
themeManager.activateInitialTheme();
$scope.$apply();
syncManager.sync(null);