Merge branch 'fix-login' into 'master'

Reinserting the login button

Closes #34

See merge request openlp/web-remote!59
This commit is contained in:
Raoul Snyman 2023-02-16 16:25:30 +00:00
commit d29eddb781
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,7 @@
<button mat-icon-button (click)="menu.toggle()"><mat-icon>menu</mat-icon></button> <button mat-icon-button (click)="menu.toggle()"><mat-icon>menu</mat-icon></button>
<span class="page-title">{{pageTitle}}</span> <span class="page-title">{{pageTitle}}</span>
<span class="spacer"></span> <span class="spacer"></span>
<button *ngIf="showLogin" mat-button (click)="login()">Login</button>
<button <button
mat-icon-button mat-icon-button
(click)="forceWebSocketReconnection()" (click)="forceWebSocketReconnection()"

View File

@ -23,10 +23,13 @@ export class HotKeysService {
return new Observable(observer => { return new Observable(observer => {
const handler = (e: KeyboardEvent) => { const handler = (e: KeyboardEvent) => {
if (document.URL.endsWith('/slides')) const activeElement = this.document.activeElement;
{ const notOnInput = activeElement?.tagName !== 'INPUT' && activeElement?.tagName !== 'TEXTAREA';
e.preventDefault(); if (notOnInput) {
observer.next(e); if (document.URL.endsWith('/slides')) {
e.preventDefault();
observer.next(e);
}
} }
}; };