[Release] 1.0.7

This commit is contained in:
Akkadius 2023-11-07 00:47:33 -08:00
parent cb223f4e54
commit 63ebcaa462
6 changed files with 27 additions and 14 deletions

View file

@ -1,4 +1,4 @@
## [1.0.6] 11/6/2023
## [1.0.7] 11/6/2023
Updates testing

10
app.go
View file

@ -174,8 +174,14 @@ func (a *App) GetAssetBasepath() string {
return a.assets.Basepath()
}
func (a *App) GetEnv() updater.EnvResponse {
_, e := a.updater.GetAppVersion()
return e
}
func (a *App) CheckForUpdate() string {
if a.updater.IsUpdateAvailable() && !env.IsAppEnvDev() {
if !env.IsAppEnvDev() && a.updater.IsUpdateAvailable() {
response, _ := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{
Type: runtime.QuestionDialog,
Title: "Update Available",
@ -184,7 +190,7 @@ func (a *App) CheckForUpdate() string {
})
if response == "Yes" {
a.updater.CheckForUpdates()
}
}

View file

@ -2,7 +2,7 @@
<eq-window
style="margin: 10px 0 0; width: 100%; height: 99%;"
:title-draggable="true"
title="ProjectEQ Expansions Client Switcher Utility"
:title="'ProjectEQ Expansions Client Switcher Utility (v' + version + ')'"
class="main-window pb-0"
id="main-window"
>
@ -40,7 +40,7 @@
<script>
import EqWindow from "./components/eq-ui/EQWindow.vue";
import {AppInitializationCheck, CheckForUpdate, CloseApp} from "../wailsjs/go/main/App.js";
import {AppInitializationCheck, CheckForUpdate, CloseApp, GetEnv} from "../wailsjs/go/main/App.js";
import EqTabs from "./components/eq-ui/EQTabs.vue";
import EqTab from "./components/eq-ui/EQTab.vue";
import {WindowToggleMaximise} from "../wailsjs/runtime/runtime.js";
@ -52,12 +52,20 @@ export default {
data() {
return {
isInitialized: false,
version: "0.0.0",
}
},
mounted() {
this.checkAppInitialized()
async mounted() {
await CheckForUpdate()
await this.checkAppInitialized()
const r = await GetEnv()
if (r) {
this.version = r.version
}
CheckForUpdate()
},
methods: {
async checkAppInitialized() {

View file

@ -1,7 +1,6 @@
<template>
<div class="row">
<div class="col-4">
<h6>ProjectEQ Expansions Client <br>Switcher Utility</h6>
<p>
This utility will allow you to switch between ProjectEQ expansions
without having to manually copy files around.

View file

@ -49,8 +49,8 @@ type PackageJson struct {
} `json:"repository"`
}
// getAppVersion gets the app version from the package.json embedded in the binary
func (s Service) getAppVersion() (error, EnvResponse) {
// GetAppVersion gets the app version from the package.json embedded in the binary
func (s Service) GetAppVersion() (error, EnvResponse) {
var pkg PackageJson
err := json.Unmarshal(s.packageJson, &pkg)
if err != nil {
@ -114,7 +114,7 @@ func (s Service) IsUpdateAvailable() bool {
}
// get app version
err, e := s.getAppVersion()
err, e := s.GetAppVersion()
if err != nil {
log.Println(err)
}
@ -177,7 +177,7 @@ func (s Service) CheckForUpdates() {
}
// get app version
err, e := s.getAppVersion()
err, e := s.GetAppVersion()
if err != nil {
log.Println(err)
}

View file

@ -1,6 +1,6 @@
{
"name": "eq-expansion-switcher",
"version": "1.0.5",
"version": "1.0.7",
"repository": {
"type": "git",
"url": "https://github.com/Akkadius/eq-expansion-switcher"