mirror of
https://gitlab.com/RemixDev/deemix-webui.git
synced 2024-12-28 18:36:30 +00:00
Added support for updates check
This commit is contained in:
parent
f399df1285
commit
5ab3472a27
11
src/app.js
11
src/app.js
|
@ -89,6 +89,17 @@ async function startApp() {
|
|||
} else {
|
||||
loggedIn({ status: 3, user: connectResponse.currentUser, arl })
|
||||
}
|
||||
|
||||
if (connectResponse.checkForUpdates) {
|
||||
toast(i18n.t('toasts.checkingUpdates'), 'loading', false, 'updates-toast')
|
||||
const updates = await fetchData('checkForUpdates')
|
||||
store.dispatch('setUpdateInfo', updates).catch(console.error)
|
||||
if (updates.updateAvailable) {
|
||||
toast(i18n.t('toasts.updateAvailable'), 'chevron-triple-up', true, 'updates-toast')
|
||||
} else {
|
||||
toast(i18n.t('toasts.noUpdateAvailable'), 'done', true, 'updates-toast')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initClient() {
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
|
||||
<h2>{{ $t('about.titles.usefulLinks') }}</h2>
|
||||
<ul class="no-dots">
|
||||
<!-- <li>
|
||||
<a href="" target="_blank">🌍 {{ $t('about.officialWebsite') }}</a>
|
||||
</li> -->
|
||||
<li>
|
||||
<a href="https://deemix.app/gui" target="_blank">🌍 {{ $t('about.officialWebsite') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://git.freezer.life/RemixDev/deemix-js" target="_blank">🚀 {{ $t('about.officialRepo') }}</a>
|
||||
</li>
|
||||
|
|
|
@ -217,7 +217,10 @@ const en = {
|
|||
deezerNotAvailable: 'Deezer is not available in your country. You should use a VPN.',
|
||||
startGeneratingItems: 'Processing {n} items...',
|
||||
finishGeneratingItems: 'Generated {n} items.',
|
||||
noLovedPlaylist: 'No loved tracks playlist!'
|
||||
noLovedPlaylist: 'No loved tracks playlist!',
|
||||
checkingUpdates: 'Checking for updates...',
|
||||
noUpdateAvailable: 'No updates found',
|
||||
updateAvailable: 'An update is available!'
|
||||
},
|
||||
settings: {
|
||||
title: 'Settings',
|
||||
|
|
|
@ -217,7 +217,10 @@ const it = {
|
|||
deezerNotAvailable: 'Deezer non è disponibile nel tuo paese. Dovresti usare una VPN.',
|
||||
startGeneratingItems: 'Elaborando {n} oggetti...',
|
||||
finishGeneratingItems: '{n} oggetti generati.',
|
||||
noLovedPlaylist: 'Nessuna playlist "Canzoni del cuore"!'
|
||||
noLovedPlaylist: 'Nessuna playlist "Canzoni del cuore"!',
|
||||
checkingUpdates: 'Cercando aggiornamenti...',
|
||||
noUpdateAvailable: 'Nessun aggiornamento trovato',
|
||||
updateAvailable: 'È disponibile un aggiornamento!'
|
||||
},
|
||||
settings: {
|
||||
title: 'Impostazioni',
|
||||
|
|
|
@ -39,9 +39,11 @@ const actions = {
|
|||
*/
|
||||
setAppInfo({ commit }, payload) {
|
||||
commit('SET_CURRENT_COMMIT', payload.currentCommit)
|
||||
commit('SET_DEEMIX_VERSION', payload.deemixVersion)
|
||||
},
|
||||
setUpdateInfo({ commit }, payload) {
|
||||
commit('SET_LATEST_COMMIT', payload.latestCommit)
|
||||
commit('SET_UPDATE_AVAILABLE', payload.updateAvailable)
|
||||
commit('SET_DEEMIX_VERSION', payload.deemixVersion)
|
||||
},
|
||||
/**
|
||||
* @param {any} action
|
||||
|
|
Loading…
Reference in a new issue