aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-08-03 23:05:34 +0200
committerGitHub <noreply@github.com>2023-08-03 23:05:34 +0200
commit097ecc3d4896c224a73e76cb80be1dd6a63d82f3 (patch)
tree1718e64a427c340bf5be8865fbb3fb7c7a656b74 /src-vue/src
parent62016e569f191e2ddbb59a3a5cda5053f1c6f1e4 (diff)
downloadFlightCore-097ecc3d4896c224a73e76cb80be1dd6a63d82f3.tar.gz
FlightCore-097ecc3d4896c224a73e76cb80be1dd6a63d82f3.zip
fix: Move leftover type definition to auto-generated from Rust (#450)
* chore: Delete leftover type definition file * feat: Generate InstallType from Rust enum * fix: Use new generated struct
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/plugins/store.ts4
-rw-r--r--src-vue/src/utils/InstallType.ts8
2 files changed, 2 insertions, 10 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 9865b992..e18498a6 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -1,7 +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 { InstallType } from "../../../src-tauri/bindings/InstallType";
import { invoke } from "@tauri-apps/api";
import { GameInstall } from "../utils/GameInstall";
import { ReleaseCanal } from "../utils/ReleaseCanal";
@@ -142,7 +142,7 @@ export const store = createStore<FlightCoreStore>({
catch {
console.warn("Nothing to close");
}
- state.game_install.install_type = InstallType.UNKNOWN;
+ state.game_install.install_type = "UNKNOWN";
// Save change in persistent store
await persistentStore.set('game-install', { value: state.game_install });
diff --git a/src-vue/src/utils/InstallType.ts b/src-vue/src/utils/InstallType.ts
deleted file mode 100644
index 797f4077..00000000
--- a/src-vue/src/utils/InstallType.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// Enumerates the way Titanfall2 could be installed (Steam/Origin/EA-Desktop)
-// Needs to be synced with `pub enum InstallType` in /src-tauri/src/lib.rs
-export enum InstallType {
- STEAM = 'STEAM',
- ORIGIN = 'ORIGIN',
- EAPLAY = 'EAPLAY',
- UNKNOWN = 'UNKNOWN', // used when the install location was manually selected
-}