Added icons on seasons page more buttons

Better implementation of autoRefreshReleases
No more electron alert dialog on 429 errors
This commit is contained in:
Kylart 2017-05-19 18:25:21 +02:00
parent 9a14fce7a2
commit 8add4144c5
3 changed files with 24 additions and 4 deletions

View File

@ -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,

View File

@ -78,29 +78,44 @@
</v-btn>
<v-list>
<v-list-item>
<v-list-tile>
<v-list-tile-title v-on:click.stop="openModal(item.title, item.synopsis)">
<v-list-tile v-on:click.native="openModal(item.title, item.synopsis)">
<v-list-tile-action>
<v-icon>more</v-icon>
</v-list-tile-action>
<v-list-tile-title>
Check synopsis
</v-list-tile-title>
</v-list-tile>
</v-list-item>
<v-list-item>
<v-list-tile>
<v-list-tile-action>
<v-icon>info_outline</v-icon>
</v-list-tile-action>
<v-list-tile-title>Information</v-list-tile-title>
</v-list-tile>
</v-list-item>
<v-list-item @click.capture="addTo('watchList', item.title)">
<v-list-tile>
<v-list-tile-action>
<v-icon>watch_later</v-icon>
</v-list-tile-action>
<v-list-tile-title>Add to my Watch list</v-list-tile-title>
</v-list-tile>
</v-list-item>
<v-list-item @click.capture="addTo('watching', item.title)">
<v-list-tile>
<v-list-tile-action>
<v-icon>tv</v-icon>
</v-list-tile-action>
<v-list-tile-title>Add to &laquo;Watching&raquo;</v-list-tile-title>
</v-list-tile>
</v-list-item>
<v-list-item @click.capture="addTo('seen', item.title)">
<v-list-tile>
<v-list-tile-action>
<v-icon>done_all</v-icon>
</v-list-tile-action>
<v-list-tile-title>Add to &laquo;Seen&raquo;</v-list-tile-title>
</v-list-tile>
</v-list-item>

View File

@ -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)
}
},