mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-16 04:12:19 +01:00
feat(core): show warning message only once
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
.controller('HomeController', HomeController);
|
||||
|
||||
HomeController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'TorrentsService', 'Notification', 'MeanTorrentConfig',
|
||||
'getStorageLangService', 'DownloadService', '$timeout'];
|
||||
'getStorageLangService', 'DownloadService', '$timeout', 'localStorageService'];
|
||||
|
||||
function HomeController($scope, $state, $translate, Authentication, TorrentsService, Notification, MeanTorrentConfig, getStorageLangService,
|
||||
DownloadService, $timeout) {
|
||||
DownloadService, $timeout, localStorageService) {
|
||||
var vm = this;
|
||||
vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig;
|
||||
vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app;
|
||||
@@ -67,12 +67,16 @@
|
||||
vm.getTopInfo = function () {
|
||||
vm.getMovieTopInfo();
|
||||
vm.getTVTopInfo();
|
||||
if(vm.appConfig.show_warning_popup) {
|
||||
|
||||
var sw = localStorageService.get('showed_warning');
|
||||
if(vm.appConfig.show_warning_popup && !sw) {
|
||||
$timeout(function () {
|
||||
$('#warning_popup').popup('show');
|
||||
//$('.warning_popup_open').trigger('click');
|
||||
//angular.element('#myselector').triggerHandler('click');
|
||||
}, 300);
|
||||
|
||||
localStorageService.set('showed_warning', true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user