feat: amnet integration

This commit is contained in:
2025-03-17 01:58:09 +00:00
parent 8d55e92fc9
commit af4929a5b3
10 changed files with 184 additions and 41 deletions

View File

@ -3,8 +3,8 @@ import { defineStore } from 'pinia';
import { listen } from '@tauri-apps/api/event';
import * as path from '@tauri-apps/api/path';
import { invoke, invoke_nopopup } from './invoke';
import { Dirs, Game, Package, Profile, ProfileMeta } from './types';
import { changePrimaryColor, pkgKey } from './util';
import { Dirs, Feature, Game, Package, Profile, ProfileMeta } from './types';
import { changePrimaryColor, hasFeature, pkgKey } from './util';
type InstallStatus = {
pkg: string;
@ -101,9 +101,13 @@ export const usePkgStore = defineStore('pkg', {
))
),
hooks: (state) =>
Object.values(state.pkg).filter((p) => p.loc?.kind === 'Hook'),
ios: (state) =>
Object.values(state.pkg).filter((p) => p.loc?.kind === 'IO'),
Object.values(state.pkg).filter((p) => hasFeature(p, Feature.Hook)),
gameIOs: (state) =>
Object.values(state.pkg).filter((p) =>
hasFeature(p, Feature.GameIO)
),
aimes: (state) =>
Object.values(state.pkg).filter((p) => hasFeature(p, Feature.Aime)),
},
actions: {
setupListeners() {