aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-02-14 21:52:53 +0100
committerGitHub <noreply@github.com>2024-02-14 21:52:53 +0100
commitd45f09613e07c2de04dd3938a37e07c560380e6a (patch)
tree1b00147fbf05dcafaff692c99ef02ff19eb3a1e7 /src-vue/src
parent90dba4678bb2c461d0937699a3d3205b04fbaae5 (diff)
downloadFlightCore-d45f09613e07c2de04dd3938a37e07c560380e6a.tar.gz
FlightCore-d45f09613e07c2de04dd3938a37e07c560380e6a.zip
fix: Show error message in case of failure (#812)
Shows an error message if retrieving release notes failed instead of just doing nothing.
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/plugins/store.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 6c382e0c..85130c8c 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -264,7 +264,13 @@ export const store = createStore<FlightCoreStore>({
},
async fetchReleaseNotes(state: FlightCoreStore) {
if (state.releaseNotes.length !== 0) return;
- state.releaseNotes = await invoke("get_northstar_release_notes");
+ await invoke<ReleaseInfo[]>("get_northstar_release_notes")
+ .then((message) => {
+ state.releaseNotes = message;
+ })
+ .catch((error) => {
+ showErrorNotification(error);
+ });
},
async fetchThunderstoreMods(state: FlightCoreStore) {
// To check if some Thunderstore mods are already installed/outdated, we need to load locally-installed mods.