forked from akanyan/STARTLINER
feat: amnet integration
This commit is contained in:
10
src/util.ts
10
src/util.ts
@ -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
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user