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