diff options
Diffstat (limited to 'src-vue/src/plugins')
-rw-r--r-- | src-vue/src/plugins/store.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 3db85e64..18191555 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -36,7 +36,10 @@ export interface FlightCoreStore { installed_mods: NorthstarMod[], northstar_is_running: boolean, - origin_is_running: boolean + origin_is_running: boolean, + + // user custom settings + mods_per_page: number, } let notification_handle: NotificationHandle; @@ -60,7 +63,9 @@ export const store = createStore<FlightCoreStore>({ installed_mods: [], northstar_is_running: false, - origin_is_running: false + origin_is_running: false, + + mods_per_page: 20, } }, mutations: { @@ -320,6 +325,12 @@ async function _initializeApp(state: any) { state.enableReleasesSwitch = valueFromStore.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) { + state.mods_per_page = perPageFromStore.value; + } + // Get FlightCore version number state.flightcore_version = await invoke("get_flightcore_version_number"); |