GameActivityToggle: fix background colour when using nameplate
This commit is contained in:
parent
7c839be64f
commit
c5a1bbd7db
1 changed files with 3 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ function makeIcon(showCurrentGame?: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function GameActivityToggleButton() {
|
function GameActivityToggleButton(props: { nameplate?: any; }) {
|
||||||
const showCurrentGame = ShowCurrentGame.useSetting();
|
const showCurrentGame = ShowCurrentGame.useSetting();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -70,6 +70,7 @@ function GameActivityToggleButton() {
|
||||||
role="switch"
|
role="switch"
|
||||||
aria-checked={!showCurrentGame}
|
aria-checked={!showCurrentGame}
|
||||||
redGlow={!showCurrentGame}
|
redGlow={!showCurrentGame}
|
||||||
|
plated={props?.nameplate != null}
|
||||||
onClick={() => ShowCurrentGame.updateSetting(old => !old)}
|
onClick={() => ShowCurrentGame.updateSetting(old => !old)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
@ -97,7 +98,7 @@ export default definePlugin({
|
||||||
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /className:\i\.buttons,.{0,50}children:\[/,
|
match: /className:\i\.buttons,.{0,50}children:\[/,
|
||||||
replace: "$&$self.GameActivityToggleButton(),"
|
replace: "$&$self.GameActivityToggleButton(arguments[0]),"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue