diff --git a/interfaces/Glitter/templates/static/javascripts/glitter.main.js b/interfaces/Glitter/templates/static/javascripts/glitter.main.js index 7fed7ba..5125907 100644 --- a/interfaces/Glitter/templates/static/javascripts/glitter.main.js +++ b/interfaces/Glitter/templates/static/javascripts/glitter.main.js @@ -1038,6 +1038,28 @@ function ViewModel() { clear: function() { self.clearMessages('CacheMsg')} }); } + + // Message about tips and tricks, only once + if(response.config.misc.notified_new_skin < 2) { + self.allMessages.push({ + index: 'TipsMsgV110', + type: glitterTranslate.status['INFO'], + text: glitterTranslate.glitterTips + ' Glitter Tips and Tricks ', + css: 'info', + clear: function() { + // Update the config to not show again + callAPI({ + mode: 'set_config', + section: 'misc', + keyword: 'notified_new_skin', + value: 2 + }) + + // Remove the actual message + self.clearMessages('TipsMsgV110') + } + }); + } }) // Orphaned folder check - Not for 5 days if user ignored it @@ -1083,17 +1105,6 @@ function ViewModel() { }); } - // Message about tips and tricks, only once - if(!localStorageGetItem('TipsMsgV110')*1) { - self.allMessages.push({ - index: 'TipsMsgV110', - type: glitterTranslate.status['INFO'], - text: glitterTranslate.glitterTips + ' Glitter Tips and Tricks ', - css: 'info', - clear: function() { self.clearMessages('TipsMsgV110')} - }); - } - /*** Date-stuff ***/ diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py index f3c2c4e..680fc77 100644 --- a/sabnzbd/cfg.py +++ b/sabnzbd/cfg.py @@ -224,7 +224,7 @@ web_color = OptionStr('misc', 'web_color', '') web_color2 = OptionStr('misc', 'web_color2') cleanup_list = OptionList('misc', 'cleanup_list') warned_old_queue = OptionBool('misc', 'warned_old_queue9', False) -notified_new_skin = OptionBool('misc', 'notified_new_skin', False) +notified_new_skin = OptionNumber('misc', 'notified_new_skin', 0) unwanted_extensions = OptionList('misc', 'unwanted_extensions') action_on_unwanted_extensions = OptionNumber('misc', 'action_on_unwanted_extensions', 0) diff --git a/sabnzbd/interface.py b/sabnzbd/interface.py index 43ca525..c297fdd 100644 --- a/sabnzbd/interface.py +++ b/sabnzbd/interface.py @@ -346,7 +346,7 @@ class MainPage(object): if not cfg.notified_new_skin() and cfg.web_dir() != 'Glitter': logging.warning(T('Try our new skin Glitter! Fresh new design that is optimized for desktop and mobile devices. Go to Config -> General to change your skin.')) if not cfg.notified_new_skin(): - cfg.notified_new_skin.set(True) + cfg.notified_new_skin.set(1) config.save_config() if kwargs.get('skip_wizard') or config.get_servers():