diff --git a/assets/index.html b/assets/index.html index 64551fb..d450899 100644 --- a/assets/index.html +++ b/assets/index.html @@ -56,7 +56,18 @@ {% inline "rotate-cw.svg" %} Refresh Feeds + + + Refresh + + {% inline "check.svg" %} + Manually + Every hour + + + + Sort by {% inline "check.svg" %} diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 7b8f129..0b73d52 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -163,6 +163,7 @@ var vm = new Vue({ 'font': '', 'size': 1, }, + 'refreshRate': undefined, } }, computed: { @@ -270,6 +271,10 @@ var vm = new Vue({ if (oldVal === undefined) return // do nothing, initial setup api.settings.update({item_list_width: newVal}) }, 1000), + 'refreshRate': function(newVal, oldVal) { + if (oldVal === undefined) return // do nothing, initial setup + api.settings.update({refresh_rate: newVal}) + }, }, methods: { refreshStats: function(loopMode) { @@ -574,6 +579,7 @@ api.settings.get().then(function(data) { vm.theme.name = data.theme_name vm.theme.font = data.theme_font vm.theme.size = data.theme_size + vm.refreshRate = data.refresh_rate vm.refreshItems() vm.$mount('#app') }) diff --git a/storage/settings.go b/storage/settings.go index 62aa8e2..2c68123 100644 --- a/storage/settings.go +++ b/storage/settings.go @@ -12,6 +12,7 @@ func settingsDefaults() map[string]interface{} { "theme_name": "light", "theme_font": "", "theme_size": 1, + "refresh_rate": 0, } }