Don't render controller icon in game card

This commit is contained in:
redphx 2025-01-04 10:30:21 +07:00
parent e4dbdea9a5
commit 328fdf46ea
3 changed files with 9 additions and 9 deletions

View File

@ -194,14 +194,6 @@ div[class*=NotFocusedDialog] {
visibility: hidden; visibility: hidden;
} }
/* Hide Controller icon in Game tiles */
div[class*=SupportedInputsBadge] {
&:not(:has(:nth-child(2))), svg:first-of-type {
display: none;
}
}
.bx-game-tile-wait-time { .bx-game-tile-wait-time {
position: absolute; position: absolute;
top: 0; top: 0;

View File

@ -4,6 +4,9 @@ declare const $param$: { productId: string };
const supportedInputIcons = $supportedInputIcons$; const supportedInputIcons = $supportedInputIcons$;
const { productId } = $param$; const { productId } = $param$;
// Remove controller icon
supportedInputIcons.shift();
if (window.BX_EXPOSED.localCoOpManager.isSupported(productId)) { if (window.BX_EXPOSED.localCoOpManager.isSupported(productId)) {
supportedInputIcons.push(window.BX_EXPOSED.createReactLocalCoOpIcon); supportedInputIcons.push(window.BX_EXPOSED.createReactLocalCoOpIcon);
} }

View File

@ -1,5 +1,5 @@
import { CE } from "@utils/html"; import { CE } from "@utils/html";
import { compressCss, renderStylus } from "@macros/build" with { type: "macro" }; import { compressCss, isLiteVersion, renderStylus } from "@macros/build" with { type: "macro" };
import { BlockFeature, UiSection } from "@/enums/pref-values"; import { BlockFeature, UiSection } from "@/enums/pref-values";
import { PrefKey } from "@/enums/pref-keys"; import { PrefKey } from "@/enums/pref-keys";
import { getPref } from "./settings-storages/global-settings-storage"; import { getPref } from "./settings-storages/global-settings-storage";
@ -12,6 +12,11 @@ export function addCss() {
const PREF_HIDE_SECTIONS = getPref(PrefKey.UI_HIDE_SECTIONS); const PREF_HIDE_SECTIONS = getPref(PrefKey.UI_HIDE_SECTIONS);
const selectorToHide = []; const selectorToHide = [];
if (isLiteVersion()) {
// Hide Controller icon in Game tiles
selectorToHide.push('div[class*=SupportedInputsBadge] svg:first-of-type');
}
// Hide "News" section // Hide "News" section
if (PREF_HIDE_SECTIONS.includes(UiSection.NEWS)) { if (PREF_HIDE_SECTIONS.includes(UiSection.NEWS)) {
selectorToHide.push('#BodyContent > div[class*=CarouselRow-module]'); selectorToHide.push('#BodyContent > div[class*=CarouselRow-module]');