diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-06 15:38:46 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-06 15:38:46 +0200 |
commit | 2487ac5f66bd76c2148ac6adb114782e3fd87ac1 (patch) | |
tree | 9b410c0557917328d6c200de9d9ea87d5fd33881 /src-vue/src/plugins/store.ts | |
parent | a026b88a94f4dec5f0568b8371a93fbb7714c3c2 (diff) | |
download | FlightCore-2487ac5f66bd76c2148ac6adb114782e3fd87ac1.tar.gz FlightCore-2487ac5f66bd76c2148ac6adb114782e3fd87ac1.zip |
feat: Enable dev mode directly if in debug mode
Allows skipping clicking version number 5 times when working on
FlightCore.
Release builds are not in debug mode, so dev mode is still disabled by
default for end-users.
Diffstat (limited to 'src-vue/src/plugins/store.ts')
-rw-r--r-- | src-vue/src/plugins/store.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index fdf0ce66..32fe0195 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -134,6 +134,11 @@ export const store = createStore<FlightCoreStore>({ * It invokes all Rust methods that are needed to initialize UI. */ async function _initializeApp(state: any) { + // Enable dev mode directly if application is in debug mode + if (await invoke("is_debug_mode")) { + state.developer_mode = true; + } + const result = await invoke("find_game_install_location_caller") .catch((err) => { // Gamepath not found or other error |