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

@ -1,5 +1,5 @@
import { updatePrimaryPalette } from '@primevue/themes';
import { Game, Package } from './types';
import { Feature, Game, Package } from './types';
export const changePrimaryColor = (game: Game | null) => {
const color =
@ -45,3 +45,11 @@ export const needsUpdate = (pkg: Package | undefined) => {
}
return l1 < r1;
};
export const hasFeature = (pkg: Package, feature: Feature) => {
return (
pkg.loc !== null &&
typeof pkg.loc?.status !== 'string' &&
pkg.loc.status.OK & feature
);
};