From 59ff6871f74d164a8d2d308094d5c8fd253d03e5 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Mon, 24 Jul 2023 00:41:38 +0200 Subject: refactor: Remove all of arg store again --- src-vue/src/i18n/lang/en.json | 1 - src-vue/src/plugins/store.ts | 10 +--------- src-vue/src/utils/GameInstall.ts | 1 - src-vue/src/views/SettingsView.vue | 19 ------------------- 4 files changed, 1 insertion(+), 30 deletions(-) (limited to 'src-vue') diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json index b1c69388..470e98be 100644 --- a/src-vue/src/i18n/lang/en.json +++ b/src-vue/src/i18n/lang/en.json @@ -92,7 +92,6 @@ "settings": { "manage_install": "Manage installation", - "launch_parameters": "Launch parameters", "choose_folder": "Choose installation folder", "open_game_folder": "Open Folder", "nb_ts_mods_per_page": "Number of Thunderstore mods per page", diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 57021c97..e7dc0763 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -26,7 +26,6 @@ const persistentStore = new Store('flight-core-settings.json'); export interface FlightCoreStore { developer_mode: boolean, game_path: string, - launch_parameters: string, install_type: InstallType, flightcore_version: string, @@ -63,7 +62,6 @@ export const store = createStore({ return { developer_mode: false, game_path: undefined as unknown as string, - launch_parameters: undefined as unknown as string, install_type: undefined as unknown as InstallType, flightcore_version: "", @@ -245,8 +243,7 @@ export const store = createStore({ async launchGameSteam(state: any, no_checks = false) { let game_install = { game_path: state.game_path, - install_type: state.install_type, - launch_parameters: state.launch_parameters + install_type: state.install_type } as GameInstall; await invoke("launch_northstar_steam", { gameInstall: game_install, bypassChecks: no_checks }) @@ -377,11 +374,6 @@ async function _initializeApp(state: any) { state.enableReleasesSwitch = valueFromStore.value; } - const paramsFromStore: { value: boolean } | null = await persistentStore.get('northstar-launch-parameters'); - if (paramsFromStore) { - state.launch_parameters = paramsFromStore.value; - } - // Grab "Thunderstore mods per page" setting from store if possible const perPageFromStore: { value: number } | null = await persistentStore.get('thunderstore-mods-per-page'); if (perPageFromStore && perPageFromStore.value) { diff --git a/src-vue/src/utils/GameInstall.ts b/src-vue/src/utils/GameInstall.ts index 22081afc..07358f6c 100644 --- a/src-vue/src/utils/GameInstall.ts +++ b/src-vue/src/utils/GameInstall.ts @@ -1,5 +1,4 @@ export interface GameInstall { game_path: string; - launch_parameters: string; install_type: string; } diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue index 5cc87213..c4e94c80 100644 --- a/src-vue/src/views/SettingsView.vue +++ b/src-vue/src/views/SettingsView.vue @@ -21,15 +21,6 @@ - -
-

{{ $t('settings.launch_parameters') }}

- - -
-

{{ $t('settings.nb_ts_mods_per_page') }}

@@ -144,16 +135,6 @@ export default defineComponent({ } } }, - launchParameters: { - get(): string { - return this.$store.state.launch_parameters - }, - async set(value: string) { - this.$store.state.launch_parameters = value; - persistentStore.set('northstar-launch-parameters', { value }); - await persistentStore.save(); // explicit save to disk - } - }, modsPerPage: { get(): number { return this.$store.state.mods_per_page; -- cgit v1.2.3