feat: new grouping options

This commit is contained in:
2025-04-28 22:00:33 +00:00
parent ee49da3665
commit 0add9200a6
8 changed files with 219 additions and 47 deletions

View File

@ -375,6 +375,9 @@ export const useClientStore = defineStore('client', () => {
const onboarded: Ref<Game[]> = ref([]);
const locale: Ref<Locale> = ref('en');
const currentTab: Ref<string> = ref('users');
const pkgListMode: Ref<'namespace' | 'type' | 'category'> =
ref('namespace');
const hiddenCategories: Ref<string[]> = ref([]);
const _scaleValue = (value: ScaleType) =>
value === 's' ? 1 : value === 'm' ? 1.25 : value === 'l' ? 1.5 : 2;
@ -445,6 +448,14 @@ export const useClientStore = defineStore('client', () => {
if (input.currentTab) {
currentTab.value = input.currentTab;
}
if (input.pkgListMode) {
pkgListMode.value = input.pkgListMode;
}
if (input.hiddenCategories) {
hiddenCategories.value = input.hiddenCategories;
}
await setLocale(locale.value);
await setTheme(theme.value);
} catch (e) {
@ -484,6 +495,8 @@ export const useClientStore = defineStore('client', () => {
onboarded: onboarded.value,
locale: locale.value,
currentTab: currentTab.value,
pkgListMode: pkgListMode.value,
hiddenCategories: hiddenCategories.value,
})
);
};
@ -560,6 +573,8 @@ export const useClientStore = defineStore('client', () => {
timeout,
scaleModel,
currentTab,
pkgListMode,
hiddenCategories,
_scaleValue,
scaleValue,
load,