From a17edbf0cc2da4997048dd4196e7bfb3d8d2b21f Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sun, 2 Oct 2022 13:17:34 +0200 Subject: refactor: Use enum for install type Same way like in backend code --- src-vue/src/utils/InstallType.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src-vue/src/utils/InstallType.ts (limited to 'src-vue/src/utils/InstallType.ts') 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 +} -- cgit v1.2.3 From 52394a3e86373801f5285843d6931a692a619be1 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sun, 2 Oct 2022 14:18:06 +0200 Subject: chore: Reference enum in backend code in comment --- src-vue/src/utils/InstallType.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src-vue/src/utils/InstallType.ts') diff --git a/src-vue/src/utils/InstallType.ts b/src-vue/src/utils/InstallType.ts index 4e992ab2..797f4077 100644 --- a/src-vue/src/utils/InstallType.ts +++ b/src-vue/src/utils/InstallType.ts @@ -1,4 +1,5 @@ // 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', -- cgit v1.2.3