diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-02 13:17:34 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-02 13:17:34 +0200 |
commit | a17edbf0cc2da4997048dd4196e7bfb3d8d2b21f (patch) | |
tree | 55e3eb81a92865dc620c1ea423c9972ab6c03113 /src-vue/src | |
parent | e545724c89c9299d9dbfa5342ec84e35967ed66b (diff) | |
download | FlightCore-a17edbf0cc2da4997048dd4196e7bfb3d8d2b21f.tar.gz FlightCore-a17edbf0cc2da4997048dd4196e7bfb3d8d2b21f.zip |
refactor: Use enum for install type
Same way like in backend code
Diffstat (limited to 'src-vue/src')
-rw-r--r-- | src-vue/src/plugins/store.ts | 3 | ||||
-rw-r--r-- | src-vue/src/utils/InstallType.ts | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 6914150c..87c8921f 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -1,6 +1,7 @@ import { createStore } from 'vuex'; import { listen, Event as TauriEvent } from "@tauri-apps/api/event"; import {Tabs} from "../utils/Tabs"; +import {InstallType} from "../utils/InstallType"; import {invoke} from "@tauri-apps/api"; import {GameInstall} from "../utils/GameInstall"; import {ReleaseCanal} from "../utils/ReleaseCanal"; @@ -124,7 +125,7 @@ async function _initializeApp(state: any) { alert(err); }); state.game_path = result.game_path; - state.install_type = result.install_type; + state.install_type = result.install_type as InstallType; // Check installed Northstar version if found await _get_northstar_version_number(state); diff --git a/src-vue/src/utils/InstallType.ts b/src-vue/src/utils/InstallType.ts new file mode 100644 index 00000000..4e992ab2 --- /dev/null +++ b/src-vue/src/utils/InstallType.ts @@ -0,0 +1,7 @@ +// Enumerates the way Titanfall2 could be installed (Steam/Origin/EA-Desktop) +export enum InstallType { + STEAM = 'STEAM', + ORIGIN = 'ORIGIN', + EAPLAY = 'EAPLAY', + UNKNOWN = 'UNKNOWN', // used when the install location was manually selected +} |