From a0cb231ddbdd7fdced9e7cda771dff7d0833c826 Mon Sep 17 00:00:00 2001 From: Remy Raes Date: Thu, 20 Oct 2022 02:19:26 +0200 Subject: fix: restore updateCurrentTab method with router --- src-vue/src/plugins/store.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src-vue/src/plugins') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 647ee4e9..a977b38b 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -8,6 +8,7 @@ import { ReleaseCanal } from "../utils/ReleaseCanal"; import { ElNotification } from 'element-plus'; import { NorthstarState } from '../utils/NorthstarState'; import { Store } from 'tauri-plugin-store-api'; +import {router} from "../main"; const persistentStore = new Store('flight-core-settings.json'); @@ -65,6 +66,7 @@ export const store = createStore({ }, updateCurrentTab(state: any, newTab: Tabs) { state.current_tab = newTab; + router.push({path: newTab}); }, async launchGame(state: any) { // TODO update installation if release track was switched -- cgit v1.2.3 From b2d5e2c7df469b0d198e8dffceb003cfa0c4aabf Mon Sep 17 00:00:00 2001 From: Remy Raes Date: Thu, 20 Oct 2022 02:29:44 +0200 Subject: refactor: remove unused current_tab variable from store --- src-vue/src/plugins/store.ts | 3 --- 1 file changed, 3 deletions(-) (limited to 'src-vue/src/plugins') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index a977b38b..4fa7328b 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -14,7 +14,6 @@ const persistentStore = new Store('flight-core-settings.json'); export interface FlightCoreStore { - current_tab: Tabs, developer_mode: boolean, game_path: string, install_type: InstallType, @@ -32,7 +31,6 @@ export interface FlightCoreStore { export const store = createStore({ state (): FlightCoreStore { return { - current_tab: Tabs.PLAY, developer_mode: false, game_path: undefined as unknown as string, install_type: undefined as unknown as InstallType, @@ -65,7 +63,6 @@ export const store = createStore({ _initializeListeners(state); }, updateCurrentTab(state: any, newTab: Tabs) { - state.current_tab = newTab; router.push({path: newTab}); }, async launchGame(state: any) { -- cgit v1.2.3