Added update check in about tab
This commit is contained in:
parent
0a0351ca78
commit
ea7f80e6aa
File diff suppressed because one or more lines are too long
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div id="about_tab" class="main_tabcontent">
|
||||
<h2 class="page_heading">{{ $t('sidebar.about') }}</h2>
|
||||
<ul>
|
||||
<li>{{ $t('about.updates.currentVersion') }}: <span v-if="current">{{ current }}</span><span v-else>{{ $t('about.updates.versionNotAvailable') }}</span></li>
|
||||
<li v-if="updateAvailable && latest">{{ $t('about.updates.updateAvailable', {version: latest}) }}</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li v-html="$t('about.usesLibrary')"></li>
|
||||
<li v-html="$t('about.thanks')"></li>
|
||||
@ -191,13 +196,28 @@ ul {
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { socket } from '@/utils/socket'
|
||||
import paypal from '@/assets/paypal.svg'
|
||||
import ethereum from '@/assets/ethereum.svg'
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
paypal,
|
||||
ethereum
|
||||
})
|
||||
ethereum,
|
||||
current: null,
|
||||
latest: null,
|
||||
updateAvailable: false
|
||||
}),
|
||||
methods: {
|
||||
initUpdate(data){
|
||||
const { currentCommit, latestCommit, updateAvailable } = data
|
||||
this.current = currentCommit
|
||||
this.latest = latestCommit
|
||||
this.updateAvailable = updateAvailable
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
socket.on('init_update', this.initUpdate)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -41,6 +41,11 @@ const en = {
|
||||
}
|
||||
},
|
||||
about: {
|
||||
updates: {
|
||||
currentVersion: 'Current Version',
|
||||
versionNotAvailable: 'N/A',
|
||||
updateAvailable: `You're not running the latest version available: {version}`
|
||||
},
|
||||
titles: {
|
||||
usefulLinks: 'Useful Links',
|
||||
bugReports: 'Bug Reports',
|
||||
|
@ -41,6 +41,11 @@ const it = {
|
||||
}
|
||||
},
|
||||
about: {
|
||||
updates: {
|
||||
currentVersion: 'Versione corrente',
|
||||
versionNotAvailable: 'N/A',
|
||||
updateAvailable: `Non stai usando l'ultima versione disponibile: {version}`
|
||||
},
|
||||
titles: {
|
||||
usefulLinks: 'Link Utili',
|
||||
bugReports: 'Segnalazione di bug',
|
||||
|
Loading…
Reference in New Issue
Block a user