Change what is being called for version

If I tried to grab version directly in the computed section, it would
throw a null error on reload in browser (didn't see any issue on an
actual device). Doing it this way fixes that
This commit is contained in:
jmt-gh 2022-06-09 12:08:04 -07:00
parent 2180e2f649
commit a391db5dc2

View file

@ -19,7 +19,7 @@
</div>
<div class="absolute bottom-0 left-0 w-full py-6 px-6 text-gray-300">
<div v-if="serverConnectionConfig" class="mb-4 flex justify-center">
<p class="text-xs" style="word-break: break-word">{{ serverConnectionConfig.address }} (v{{serverVersion}})</p>
<p class="text-xs" style="word-break: break-word">{{ serverConnectionConfig.address }} (v{{serverSettings.version}})</p>
</div>
<div class="flex items-center">
<p class="text-xs">{{ $config.version }}</p>
@ -71,8 +71,8 @@ export default {
serverConnectionConfig() {
return this.$store.state.user.serverConnectionConfig
},
serverVersion() {
return this.$store.state.serverSettings.version || 'Version Unavailable'
serverSettings() {
return this.$store.state.serverSettings || 'Version Unavailable'
},
username() {
return this.user ? this.user.username : ''