diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-03 01:58:23 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-03 01:58:23 +0200 |
commit | b09138a7f97559f2c59d240f882f16ec08d4934c (patch) | |
tree | dffe343bb99e11b26e7efcfadc2f87a61612ca03 | |
parent | e0aad4f931a57aa7621d4dc7e0a1c1e54170146e (diff) | |
download | FlightCore-b09138a7f97559f2c59d240f882f16ec08d4934c.tar.gz FlightCore-b09138a7f97559f2c59d240f882f16ec08d4934c.zip |
fix: Do not show install button if TF|2 not found
Instead show a button saying that Titanfall2 was not found
-rw-r--r-- | src-vue/src/components/PlayButton.vue | 2 | ||||
-rw-r--r-- | src-vue/src/plugins/store.ts | 5 | ||||
-rw-r--r-- | src-vue/src/utils/NorthstarState.ts | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src-vue/src/components/PlayButton.vue b/src-vue/src/components/PlayButton.vue index b5541abe..e2ee2bcc 100644 --- a/src-vue/src/components/PlayButton.vue +++ b/src-vue/src/components/PlayButton.vue @@ -12,6 +12,8 @@ export default defineComponent({ } switch(this.$store.state.northstar_state) { + case NorthstarState.GAME_NOT_FOUND: + return "Titanfall2 not found"; case NorthstarState.INSTALL: return "Install"; case NorthstarState.INSTALLING: diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index ddd46e53..5087221b 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -32,7 +32,7 @@ export const store = createStore({ install_type: undefined, installed_northstar_version: "", - northstar_state: NorthstarState.INSTALL, + northstar_state: NorthstarState.GAME_NOT_FOUND, release_canal: ReleaseCanal.RELEASE, northstar_is_running: false, @@ -190,4 +190,7 @@ async function _get_northstar_version_number(state: any) { alert(error); }); } + else { + state.northstar_state = NorthstarState.INSTALL; + } } diff --git a/src-vue/src/utils/NorthstarState.ts b/src-vue/src/utils/NorthstarState.ts index d6e31923..4150a380 100644 --- a/src-vue/src/utils/NorthstarState.ts +++ b/src-vue/src/utils/NorthstarState.ts @@ -1,4 +1,5 @@ export enum NorthstarState { + GAME_NOT_FOUND, INSTALL, INSTALLING, MUST_UPDATE, |