Removed textColor param
This commit is contained in:
parent
184a2c54da
commit
23953b38dc
@ -84,11 +84,11 @@ export default class Home extends Component {
|
|||||||
loadPreview() {
|
loadPreview() {
|
||||||
this.setState({
|
this.setState({
|
||||||
isPreviewVisible: true,
|
isPreviewVisible: true,
|
||||||
previewUrl: this.generateUrl(true),
|
previewUrl: this.generateUrl(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
generateUrl(withTc = false) {
|
generateUrl() {
|
||||||
let values = "";
|
let values = "";
|
||||||
Object.entries(this.state.values).forEach((value) => {
|
Object.entries(this.state.values).forEach((value) => {
|
||||||
if (value[1] === undefined) {
|
if (value[1] === undefined) {
|
||||||
@ -102,11 +102,7 @@ export default class Home extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
window.location.origin +
|
window.location.origin + "/overlay?id=" + this.state.steamId + values
|
||||||
"/overlay?id=" +
|
|
||||||
this.state.steamId +
|
|
||||||
values +
|
|
||||||
(withTc ? "&textColor=black" : "")
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ export default class Overlay extends Component {
|
|||||||
showPlayerStats: true,
|
showPlayerStats: true,
|
||||||
showScore: false,
|
showScore: false,
|
||||||
showSongInfo: false,
|
showSongInfo: false,
|
||||||
textColor: undefined,
|
|
||||||
|
|
||||||
socket: undefined,
|
socket: undefined,
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
@ -115,11 +114,6 @@ export default class Overlay extends Component {
|
|||||||
shouldConnectSocket = true;
|
shouldConnectSocket = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mainly used for the preview
|
|
||||||
if (params.textColor) {
|
|
||||||
this.setState({ textColor: params.textColor });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldConnectSocket) {
|
if (shouldConnectSocket) {
|
||||||
if (this.state.isConnectedToSocket) return;
|
if (this.state.isConnectedToSocket) return;
|
||||||
this.connectSocket(params.socketaddress);
|
this.connectSocket(params.socketaddress);
|
||||||
@ -412,11 +406,6 @@ export default class Overlay extends Component {
|
|||||||
id,
|
id,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
if (this.state.textColor !== undefined) {
|
|
||||||
const element = document.querySelector("." + styles.main);
|
|
||||||
element.style.color = this.state.textColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (loadingPlayerData) {
|
if (loadingPlayerData) {
|
||||||
return <Spinner size="xl" color="white"></Spinner>;
|
return <Spinner size="xl" color="white"></Spinner>;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user