feat(core): current language selected status

This commit is contained in:
OldHawk
2018-05-12 14:04:59 +08:00
parent a96abac21a
commit 600d6f0cd3
4 changed files with 33 additions and 11 deletions

View File

@@ -6,13 +6,14 @@
.controller('HeaderController', HeaderController);
HeaderController.$inject = ['$scope', '$state', '$timeout', '$translate', 'Authentication', 'menuService', 'MeanTorrentConfig', 'localStorageService',
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService', 'UsersService', 'DebugConsoleService'];
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService', 'UsersService', 'DebugConsoleService', 'getStorageLangService'];
function HeaderController($scope, $state, $timeout, $translate, Authentication, menuService, MeanTorrentConfig, localStorageService, ScoreLevelService,
InvitationsService, $interval, MessagesService, TorrentsService, UsersService, mtDebug) {
InvitationsService, $interval, MessagesService, TorrentsService, UsersService, mtDebug, getStorageLangService) {
$scope.$state = $state;
var vm = this;
vm.user = Authentication.user;
vm.langService = getStorageLangService;
vm.language = MeanTorrentConfig.meanTorrentConfig.language;
vm.announceConfig = MeanTorrentConfig.meanTorrentConfig.announce;
vm.messageConfig = MeanTorrentConfig.meanTorrentConfig.messages;