mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 13:18:27 +02:00
6.0
This commit is contained in:
23
src/utils/feature-gates.ts
Normal file → Executable file
23
src/utils/feature-gates.ts
Normal file → Executable file
@@ -1,17 +1,30 @@
|
||||
import { PrefKey } from "@/enums/pref-keys";
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
import { getPref } from "./settings-storages/global-settings-storage";
|
||||
import { NativeMkbMode } from "@/enums/pref-values";
|
||||
|
||||
export let FeatureGates: {[key: string]: boolean} = {
|
||||
'PwaPrompt': false,
|
||||
'EnableWifiWarnings': false,
|
||||
'EnableUpdateRequiredPage': false,
|
||||
'ShowForcedUpdateScreen': false,
|
||||
PwaPrompt: false,
|
||||
EnableWifiWarnings: false,
|
||||
EnableUpdateRequiredPage: false,
|
||||
ShowForcedUpdateScreen: false,
|
||||
};
|
||||
|
||||
// Enable Native Mouse & Keyboard
|
||||
const nativeMkbMode = getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE);
|
||||
if (nativeMkbMode !== NativeMkbMode.DEFAULT) {
|
||||
FeatureGates.EnableMouseAndKeyboard = nativeMkbMode === NativeMkbMode.ON;
|
||||
}
|
||||
|
||||
// Disable chat feature
|
||||
if (getPref(PrefKey.BLOCK_SOCIAL_FEATURES)) {
|
||||
FeatureGates['EnableGuideChatTab'] = false;
|
||||
FeatureGates.EnableGuideChatTab = false;
|
||||
}
|
||||
|
||||
// Disable BYOG feature
|
||||
if (getPref(PrefKey.BYOG_DISABLED)) {
|
||||
FeatureGates.EnableBYOG = false;
|
||||
FeatureGates.EnableBYOGPurchase = false;
|
||||
}
|
||||
|
||||
if (BX_FLAGS.FeatureGates) {
|
||||
|
Reference in New Issue
Block a user