feat: groundwork for multi-profile support

This commit is contained in:
2025-03-03 02:07:15 +01:00
parent d25841853c
commit 6410ca2721
16 changed files with 744 additions and 184 deletions

View File

@ -1,20 +1,16 @@
<script setup lang="ts">
import Fieldset from 'primevue/fieldset';
import ModListEntry from './ModListEntry.vue';
import { usePkgStore } from '../stores';
import { Profile } from '../types';
import { usePkgStore, usePrfStore } from '../stores';
defineProps({
profile: Object as () => Profile,
});
const pkgs = usePkgStore();
const pkg = usePkgStore();
const prf = usePrfStore();
const group = () => {
const a = Object.assign(
{},
Object.groupBy(
pkgs.allLocal
pkg.allLocal
.sort((p1, p2) => p1.namespace.localeCompare(p2.namespace))
.sort((p1, p2) => p1.name.localeCompare(p2.name)),
({ namespace }) => namespace
@ -23,7 +19,7 @@ const group = () => {
return a;
};
pkgs.reloadProfile();
prf.reload();
</script>
<template>