aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-04 15:53:10 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-04 15:53:10 +0200
commitdddbc93c3bab88a9d4ad3752cdfe35e15692e03f (patch)
treeaf74bc5f19f719f59ec1bf5ab64d6aaac72a1c63 /src-vue/src
parent2a0df9b69a3730e01ed6f0389d19843f5373f909 (diff)
downloadFlightCore-dddbc93c3bab88a9d4ad3752cdfe35e15692e03f.tar.gz
FlightCore-dddbc93c3bab88a9d4ad3752cdfe35e15692e03f.zip
feat: Show notification if FlightCore is outdated
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/plugins/store.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 6ce16c80..ccc90b1b 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -149,8 +149,21 @@ async function _initializeApp(state: any) {
}
async function _checkForFlightCoreUpdates(state: FlightCoreStore) {
- // Check if up-to-date
+ // Check if FlightCore up-to-date
let flightcore_is_outdated = await invoke("check_is_flightcore_outdated_caller") as boolean;
+
+ // Get FlightCore version number
+ let flightcore_version_number = await invoke("get_version_number") as string;
+
+ if (flightcore_is_outdated) {
+ ElNotification({
+ title: 'FlightCore outdated!',
+ message: `Please update FlightCore. Running outdated version ${flightcore_version_number}`,
+ type: 'warning',
+ position: 'bottom-right',
+ duration: 0 // Duration `0` means the notification will not auto-vanish
+ });
+ }
}
/**