mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Add FeatureGates
This commit is contained in:
20
src/utils/feature-gates.ts
Normal file
20
src/utils/feature-gates.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
import { getPref, PrefKey } from "./preferences";
|
||||
|
||||
export let FeatureGates: {[key: string]: boolean} = {
|
||||
'PwaPrompt': false,
|
||||
};
|
||||
|
||||
// Disable context menu in Home page
|
||||
if (getPref(PrefKey.UI_HOME_CONTEXT_MENU_DISABLED)) {
|
||||
FeatureGates['EnableHomeContextMenu'] = false;
|
||||
}
|
||||
|
||||
// Disable chat feature
|
||||
if (getPref(PrefKey.BLOCK_SOCIAL_FEATURES)) {
|
||||
FeatureGates['EnableGuideChatTab'] = false;
|
||||
}
|
||||
|
||||
if (BX_FLAGS.FeatureGates) {
|
||||
FeatureGates = Object.assign(BX_FLAGS.FeatureGates, FeatureGates);
|
||||
}
|
Reference in New Issue
Block a user