aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorRémy Raes <contact@remyraes.com>2022-10-03 16:06:46 +0200
committerGitHub <noreply@github.com>2022-10-03 16:06:46 +0200
commit43d61ce21507d63c82c2252a164d314a18968359 (patch)
tree4b40eaf5a51767ab115cd93bbe77e986c89d0bea /src-vue/src
parent9690e5efe7c8a02c86bd68f32906c1b2f731897b (diff)
parentb09138a7f97559f2c59d240f882f16ec08d4934c (diff)
downloadFlightCore-43d61ce21507d63c82c2252a164d314a18968359.tar.gz
FlightCore-43d61ce21507d63c82c2252a164d314a18968359.zip
Merge pull request #5 from GeckoEidechse/null-out-gamepath
Start with empty gamepath and set button accordingly if no Titanfall2 install found
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/components/PlayButton.vue2
-rw-r--r--src-vue/src/plugins/store.ts7
-rw-r--r--src-vue/src/utils/NorthstarState.ts1
3 files changed, 8 insertions, 2 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 544d314a..5087221b 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -28,11 +28,11 @@ export const store = createStore({
return {
current_tab: Tabs.PLAY,
developer_mode: false,
- game_path: "this/is/the/game/path",
+ game_path: undefined,
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,