mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +02:00
Lite: hide unsupported features
This commit is contained in:
parent
48da8bc527
commit
785df72972
@ -236,8 +236,10 @@ BxEventBus.Stream.on('state.starting', () => {
|
||||
});
|
||||
|
||||
BxEventBus.Stream.on('state.playing', payload => {
|
||||
window.BX_STREAM_SETTINGS = StreamSettings.settings;
|
||||
StreamSettings.refreshAllSettings();
|
||||
if (isFullVersion()) {
|
||||
window.BX_STREAM_SETTINGS = StreamSettings.settings;
|
||||
StreamSettings.refreshAllSettings();
|
||||
}
|
||||
|
||||
STATES.isPlaying = true;
|
||||
StreamUiHandler.observe();
|
||||
|
@ -313,7 +313,7 @@ export class SettingsDialog extends NavigationDialog {
|
||||
items: [
|
||||
PrefKey.BLOCK_TRACKING,
|
||||
],
|
||||
}, {
|
||||
}, isFullVersion() && {
|
||||
group: 'advanced',
|
||||
label: t('advanced'),
|
||||
items: [
|
||||
@ -495,24 +495,23 @@ export class SettingsDialog extends NavigationDialog {
|
||||
}],
|
||||
}];
|
||||
|
||||
private readonly TAB_CONTROLLER_ITEMS: Array<SettingTabSection | HTMLElement | false> = [{
|
||||
private readonly TAB_CONTROLLER_ITEMS: Array<SettingTabSection | HTMLElement | false> = isFullVersion() ? [{
|
||||
group: 'controller',
|
||||
label: t('controller'),
|
||||
helpUrl: 'https://better-xcloud.github.io/ingame-features/#controller',
|
||||
items: [
|
||||
isFullVersion() && {
|
||||
{
|
||||
pref: PrefKey.LOCAL_CO_OP_ENABLED,
|
||||
onChange: () => { BxExposed.toggleLocalCoOp(getPref(PrefKey.LOCAL_CO_OP_ENABLED)); },
|
||||
},
|
||||
isFullVersion() && {
|
||||
}, {
|
||||
pref: PrefKey.CONTROLLER_POLLING_RATE,
|
||||
onChange: () => StreamSettings.refreshControllerSettings(),
|
||||
}, isFullVersion() && ($parent => {
|
||||
}, ($parent => {
|
||||
$parent.appendChild(ControllerExtraSettings.renderSettings.apply(this));
|
||||
})],
|
||||
},
|
||||
|
||||
isFullVersion() && STATES.userAgent.capabilities.touch && {
|
||||
STATES.userAgent.capabilities.touch && {
|
||||
group: 'touch-control',
|
||||
label: t('touch-controller'),
|
||||
items: [{
|
||||
@ -564,7 +563,9 @@ export class SettingsDialog extends NavigationDialog {
|
||||
});
|
||||
},
|
||||
}],
|
||||
}, isFullVersion() && STATES.browser.capabilities.deviceVibration && {
|
||||
},
|
||||
|
||||
STATES.browser.capabilities.deviceVibration && {
|
||||
group: 'device',
|
||||
label: t('device'),
|
||||
items: [{
|
||||
@ -577,7 +578,7 @@ export class SettingsDialog extends NavigationDialog {
|
||||
unsupported: !STATES.browser.capabilities.deviceVibration,
|
||||
onChange: () => StreamSettings.refreshControllerSettings(),
|
||||
}],
|
||||
}];
|
||||
}] : [];
|
||||
|
||||
private readonly TAB_MKB_ITEMS: (() => Array<SettingTabSection | false>) = isFullVersion() ? () => [
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ export function addCss() {
|
||||
if (isLiteVersion()) {
|
||||
// Hide Controller icon in Game tiles
|
||||
selectorToHide.push('div[class*=SupportedInputsBadge] svg:first-of-type');
|
||||
selectorToHide.push('div[class*=SupportedInputsBadge]:not(:has(:nth-child(2)))');
|
||||
}
|
||||
|
||||
// Hide "News" section
|
||||
|
@ -194,6 +194,7 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
|
||||
default: false,
|
||||
},
|
||||
[PrefKey.UI_IMAGE_QUALITY]: {
|
||||
requiredVariants: 'full',
|
||||
label: t('image-quality'),
|
||||
default: 90,
|
||||
min: 10,
|
||||
@ -617,6 +618,7 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
|
||||
default: false,
|
||||
},
|
||||
[PrefKey.BLOCK_FEATURES]: {
|
||||
requiredVariants: 'full',
|
||||
label: t('disable-features'),
|
||||
default: [],
|
||||
multipleOptions: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user