You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/state/features/features.selectors.ts

24 lines
765 B

import { ICustomizationSettings, IFeatureEnablement } from "../../interfaces";
import { FEATURES_STATE_TOKEN } from "./types";
import { Selector } from "@ngxs/store";
export class FeaturesSelectors {
@Selector([FEATURES_STATE_TOKEN])
public static features(features: IFeatureEnablement[]): IFeatureEnablement[] {
return features;
}
@Selector([FeaturesSelectors.features])
public static is4kEnabled(features: IFeatureEnablement[]): boolean {
return features.filter(x => x.name === "Movie4KRequests")[0].enabled;
}
@Selector([FeaturesSelectors.features])
public static isPlayedSyncEnabled(features: IFeatureEnablement[]): boolean {
return features.filter(x => x.name === "PlayedSync")[0].enabled;
}
}