mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
25 lines
615 B
JavaScript
25 lines
615 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* The menu controller:
|
|
* - sets the menu options, should we do it dynamic so it generates the menu like: width = 1/elements * 100 ?
|
|
* - exposes the model to the template and provides event handlers
|
|
*/
|
|
|
|
habitrpg.controller('MenuCtrl',
|
|
['$scope', '$rootScope', 'User',
|
|
function($scope, $rootScope, User) {
|
|
|
|
//FIXME are these used anywhere? can we get rid of this file?
|
|
|
|
$scope.refreshing = function () {
|
|
User.settings.fetching ? "spin" : ""
|
|
};
|
|
|
|
$scope.queueLength = function () {
|
|
User.settings.sync.queue.length || User.settings.sync.sent.length
|
|
};
|
|
|
|
}
|
|
]);
|