feat: the other profile buttons

This commit is contained in:
2025-03-14 00:23:47 +00:00
parent fd27000c05
commit 90ba27c967
11 changed files with 112 additions and 33 deletions

View File

@ -114,12 +114,16 @@ export const usePrfStore = defineStore('prf', () => {
);
const reload = async () => {
const p: any = await invoke('get_current_profile');
if (p['OngekiProfile'] !== undefined) {
const p = (await invoke('get_current_profile')) as any;
if (p != null && 'OngekiProfile' in p) {
current.value = { ...p.OngekiProfile, game: 'ongeki' };
} else {
current.value = null;
}
if (current.value !== null) {
changePrimaryColor(current.value.game);
} else {
changePrimaryColor(null);
}
};
@ -167,9 +171,7 @@ export const usePrfStore = defineStore('prf', () => {
};
const reloadList = async () => {
// list.value.splice(0, list.value.length);
list.value = (await invoke('list_profiles')) as ProfileMeta[];
console.log(list.value);
};
const togglePkg = async (pkg: Package | undefined, enable: boolean) => {