From 8add4144c5041c1329f461f65d5dc1eec721d3d2 Mon Sep 17 00:00:00 2001 From: Kylart Date: Fri, 19 May 2017 18:25:21 +0200 Subject: [PATCH] Added icons on seasons page more buttons Better implementation of autoRefreshReleases No more electron alert dialog on 429 errors --- main.js | 7 ++++++- pages/seasons.vue | 19 +++++++++++++++++-- store/index.js | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 04c695a..9b992a8 100755 --- a/main.js +++ b/main.js @@ -40,7 +40,7 @@ console.log(`KawAnime is at ${_NUXT_URL_}`) /* ** Electron app */ -const {Menu, app, BrowserWindow} = require('electron') +const {Menu, app, BrowserWindow, dialog} = require('electron') const url = require('url') const menuFile = require(join(__dirname, 'assets', 'scripts', 'menu.js')) @@ -58,6 +58,11 @@ const pollServer = () => { .on('error', pollServer) } +// Disable error dialogs by overriding +dialog.showErrorBox = (title, content) => { + console.log(`${title}\n${content}`) +} + const newWin = () => { win = new BrowserWindow({ width: config.electron.width, diff --git a/pages/seasons.vue b/pages/seasons.vue index 75f1a40..e750d3e 100644 --- a/pages/seasons.vue +++ b/pages/seasons.vue @@ -78,29 +78,44 @@ - - + + + more + + Check synopsis + + info_outline + Information + + watch_later + Add to my Watch list + + tv + Add to «Watching» + + done_all + Add to «Seen» diff --git a/store/index.js b/store/index.js index e9a2331..72d13af 100644 --- a/store/index.js +++ b/store/index.js @@ -226,7 +226,7 @@ const store = new Vuex.Store({ commit('setInfoSnackbar', 'Could not get the latest releases. Retrying in 45 seconds.') setTimeout(function () { log(`Retrying to get latest releases.`) - dispatch('refreshReleases').catch(err => { void (err) }) + dispatch('releasesInit').catch(err => { void (err) }) }, 45 * 1000) } },