Hide cursor on fullscreen pages

This commit is contained in:
Daniel Schädler 2025-03-14 17:33:20 +01:00
parent cd06ab4747
commit af664aa315
3 changed files with 16 additions and 2 deletions

View File

@ -70,6 +70,7 @@ class Main extends React.Component {
} }
componentDidMount() { componentDidMount() {
document.body.classList.add('hide-cursor');
this.updateTournament(); this.updateTournament();
const intervalIdPage = setInterval(this.increasePage, 15000); const intervalIdPage = setInterval(this.increasePage, 15000);
this.setState({intervalIdPage: intervalIdPage}); this.setState({intervalIdPage: intervalIdPage});

View File

@ -33,7 +33,7 @@ function Matches(props) {
)} )}
</Row>); </Row>);
} }
return (<div className='mx-4 h5'> return (<div className='mx-4 h5 disable-hover'>
{matches} {matches}
</div>); </div>);
} }
@ -55,7 +55,7 @@ function FilterDropdown(props) {
function FullscreenPageHeader(props) { function FullscreenPageHeader(props) {
return (<Navbar color='light' className='mb-4 border-bottom py-0'> return (<Navbar color='light' className='mb-4 border-bottom py-0 show-cursor'>
<FilterDropdown {...props.filter}/> <FilterDropdown {...props.filter}/>
<NavbarBrand>{props.title}</NavbarBrand> <NavbarBrand>{props.title}</NavbarBrand>
</Navbar>); </Navbar>);
@ -96,6 +96,7 @@ class Main extends React.Component {
} }
componentDidMount() { componentDidMount() {
document.body.classList.add('hide-cursor');
const tournamentId = this.props.query.code; const tournamentId = this.props.query.code;
getTournamentMeta(tournamentId, this.onTournamentRequestSuccess, this.onTournamentRequestError); getTournamentMeta(tournamentId, this.onTournamentRequestSuccess, this.onTournamentRequestError);
this.updateMatches(); this.updateMatches();

View File

@ -26,3 +26,15 @@
.scoreInput { .scoreInput {
width: 11rem; width: 11rem;
} }
.hide-cursor {
cursor: none;
}
.show-cursor {
cursor: pointer;
}
.disable-hover {
pointer-events: none;
}