From dddbc93c3bab88a9d4ad3752cdfe35e15692e03f Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Tue, 4 Oct 2022 15:53:10 +0200 Subject: feat: Show notification if FlightCore is outdated --- src-vue/src/plugins/store.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src-vue/src/plugins') 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 + }); + } } /** -- cgit v1.2.3