mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
Fix linting issues.
This commit is contained in:
parent
b0a8dd2b27
commit
ec9515d692
@ -71,19 +71,19 @@ export class AppComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
this.hotKeysService.addShortcut({ keys: 'Space' }).subscribe(_ =>
|
this.hotKeysService.addShortcut({ keys: 'Space' }).subscribe(_ =>
|
||||||
{
|
{
|
||||||
if (this.state.displayMode != DisplayMode.Presentation) {
|
if (this.state.displayMode !== DisplayMode.Presentation) {
|
||||||
this.showDisplay();
|
this.showDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.hotKeysService.addShortcut({ keys: 't' }).subscribe(_ =>
|
this.hotKeysService.addShortcut({ keys: 't' }).subscribe(_ =>
|
||||||
this.state.displayMode == DisplayMode.Theme ? this.showDisplay() : this.themeDisplay()
|
this.state.displayMode === DisplayMode.Theme ? this.showDisplay() : this.themeDisplay()
|
||||||
);
|
);
|
||||||
this.hotKeysService.addShortcut({ keys: 'code.Period' }).subscribe(_ =>
|
this.hotKeysService.addShortcut({ keys: 'code.Period' }).subscribe(_ =>
|
||||||
this.state.displayMode == DisplayMode.Blank ? this.showDisplay() : this.blankDisplay()
|
this.state.displayMode === DisplayMode.Blank ? this.showDisplay() : this.blankDisplay()
|
||||||
);
|
);
|
||||||
this.hotKeysService.addShortcut({ keys: 'd' }).subscribe(_ =>
|
this.hotKeysService.addShortcut({ keys: 'd' }).subscribe(_ =>
|
||||||
this.state.displayMode == DisplayMode.Desktop ? this.showDisplay() : this.desktopDisplay()
|
this.state.displayMode === DisplayMode.Desktop ? this.showDisplay() : this.desktopDisplay()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { DOCUMENT } from "@angular/common";
|
import { DOCUMENT } from '@angular/common';
|
||||||
import { Inject, Injectable } from "@angular/core";
|
import { Inject, Injectable } from '@angular/core';
|
||||||
import { EventManager } from "@angular/platform-browser";
|
import { EventManager } from '@angular/platform-browser';
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
type Options = {
|
interface Options {
|
||||||
element: any;
|
element: any;
|
||||||
keys: string;
|
keys: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class HotKeysService {
|
export class HotKeysService {
|
||||||
defaults: Partial<Options> = {
|
defaults: Partial<Options> = {
|
||||||
element: this.document
|
element: this.document
|
||||||
}
|
};
|
||||||
|
|
||||||
constructor(private eventManager: EventManager, @Inject(DOCUMENT) private document: Document) {
|
constructor(private eventManager: EventManager, @Inject(DOCUMENT) private document: Document) {
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ export class HotKeysService {
|
|||||||
const handler = (e: KeyboardEvent) => {
|
const handler = (e: KeyboardEvent) => {
|
||||||
if (document.URL.endsWith('/slides'))
|
if (document.URL.endsWith('/slides'))
|
||||||
{
|
{
|
||||||
e.preventDefault()
|
e.preventDefault();
|
||||||
observer.next(e);
|
observer.next(e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -37,6 +37,6 @@ export class HotKeysService {
|
|||||||
return () => {
|
return () => {
|
||||||
dispose();
|
dispose();
|
||||||
};
|
};
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user