mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
Merge branch 'move-models-to-folder' into 'master'
Restructure entities See merge request openlp/web-remote!139
This commit is contained in:
commit
da90aa327b
@ -3,15 +3,19 @@ import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
|||||||
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { State, Display, DisplayMode } from './responses';
|
import { State } from './models/state';
|
||||||
import { OpenLPService, WebSocketStatus } from './services/openlp.service';
|
import { Display } from './models/display';
|
||||||
|
import { DisplayMode } from './enums/display-mode.enum';
|
||||||
|
import { OpenLPService } from './services/openlp.service';
|
||||||
|
import { WebSocketStatus } from './enums/web-socket-status.enum';
|
||||||
import { WindowRef } from './services/window-ref.service';
|
import { WindowRef } from './services/window-ref.service';
|
||||||
import { PageTitleService } from './services/page-title.service';
|
import { PageTitleService } from './services/page-title.service';
|
||||||
import { fromEvent } from 'rxjs';
|
import { fromEvent } from 'rxjs';
|
||||||
import { debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component';
|
import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component';
|
||||||
import { Shortcuts, ShortcutsService } from './services/shortcuts.service';
|
import { Shortcuts } from './models/shortcuts';
|
||||||
import { ShortcutPipe } from './components/pipes/shortcut.pipe';
|
import { ShortcutsService } from './services/shortcuts.service';
|
||||||
|
import { ShortcutPipe } from './pipes/shortcut.pipe';
|
||||||
import { SettingsService } from './services/settings.service';
|
import { SettingsService } from './services/settings.service';
|
||||||
import * as supportedBrowsers from '../assets/supportedBrowsers';
|
import * as supportedBrowsers from '../assets/supportedBrowsers';
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ import { SearchOptionsComponent } from './components/search/search-options/searc
|
|||||||
import { SlidesComponent } from './components/slides/slides.component';
|
import { SlidesComponent } from './components/slides/slides.component';
|
||||||
import { ChordViewComponent } from './components/chord-view/chord-view.component';
|
import { ChordViewComponent } from './components/chord-view/chord-view.component';
|
||||||
import { StageViewComponent } from './components/stage-view/stage-view.component';
|
import { StageViewComponent } from './components/stage-view/stage-view.component';
|
||||||
import { Nl2BrPipe } from './components/pipes/nl2br.pipe';
|
import { Nl2BrPipe } from './pipes/nl2br.pipe';
|
||||||
import { MainViewComponent } from './components/main-view/main-view.component';
|
import { MainViewComponent } from './components/main-view/main-view.component';
|
||||||
import { ChordProPipe } from './components/pipes/chordpro.pipe';
|
import { ChordProPipe } from './pipes/chordpro.pipe';
|
||||||
import { LoginComponent } from './components/login/login.component';
|
import { LoginComponent } from './components/login/login.component';
|
||||||
import { ThemesComponent } from './components/themes/themes.component';
|
import { ThemesComponent } from './components/themes/themes.component';
|
||||||
import { SlideListComponent } from './components/slides/slide-list/slide-list.component';
|
import { SlideListComponent } from './components/slides/slide-list/slide-list.component';
|
||||||
@ -53,7 +53,7 @@ import { ServiceListComponent } from './components/service/service-list/service-
|
|||||||
import { ChordViewItemComponent } from './components/chord-view/chord-view-item/chord-view-item.component';
|
import { ChordViewItemComponent } from './components/chord-view/chord-view-item/chord-view-item.component';
|
||||||
import { StageViewItemComponent } from './components/stage-view/stage-view-item/stage-view-item.component';
|
import { StageViewItemComponent } from './components/stage-view/stage-view-item/stage-view-item.component';
|
||||||
import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component';
|
import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component';
|
||||||
import { SentenceCasePipe } from './components/pipes/sentence-case.pipe';
|
import { SentenceCasePipe } from './pipes/sentence-case.pipe';
|
||||||
import { SettingsComponent } from './components/settings/settings.component';
|
import { SettingsComponent } from './components/settings/settings.component';
|
||||||
import { StageChordPreviewComponent } from './components/settings/stage-chord-preview/stage-chord-preview.component';
|
import { StageChordPreviewComponent } from './components/settings/stage-chord-preview/stage-chord-preview.component';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||||
import { Slide } from '../../../responses';
|
import { Slide } from '../../../interfaces/slide.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-chord-view-item',
|
selector: 'app-chord-view-item',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Component, ViewEncapsulation } from '@angular/core';
|
import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
import { Slide } from '../../responses';
|
import { Slide } from '../../interfaces/slide.interface';
|
||||||
import { StageViewComponent } from '../stage-view/stage-view.component';
|
import { StageViewComponent } from '../stage-view/stage-view.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
||||||
import { Display, DisplayMode } from 'src/app/responses';
|
import { Display } from '../../models/display';
|
||||||
|
import { DisplayMode } from '../../enums/display-mode.enum';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-display-mode-sheet',
|
selector: 'openlp-display-mode-sheet',
|
||||||
|
@ -3,7 +3,8 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { SettingsService } from '../../services/settings.service';
|
import { SettingsService } from '../../services/settings.service';
|
||||||
import { OpenLPService } from '../../services/openlp.service';
|
import { OpenLPService } from '../../services/openlp.service';
|
||||||
import { ServiceItem, Slide } from '../../responses';
|
import { ServiceItem } from '../../interfaces/service-item.interface';
|
||||||
|
import { Slide } from '../../interfaces/slide.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-lower-third',
|
selector: 'app-lower-third',
|
||||||
|
@ -3,7 +3,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { OpenLPService } from '../../services/openlp.service';
|
import { OpenLPService } from '../../services/openlp.service';
|
||||||
import { PageTitleService } from '../../services/page-title.service';
|
import { PageTitleService } from '../../services/page-title.service';
|
||||||
import { PluginDescription } from '../../responses';
|
import { PluginDescription } from '../../interfaces/plugin-description.interface';
|
||||||
import { SearchOptionsComponent } from './search-options/search-options.component';
|
import { SearchOptionsComponent } from './search-options/search-options.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -3,7 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|||||||
|
|
||||||
import { DeleteConfirmationComponent } from './delete-confirmation/delete-confirmation.component';
|
import { DeleteConfirmationComponent } from './delete-confirmation/delete-confirmation.component';
|
||||||
import { OpenLPService } from '../../../services/openlp.service';
|
import { OpenLPService } from '../../../services/openlp.service';
|
||||||
import { ServiceItem } from '../../../responses';
|
import { ServiceItem } from '../../../interfaces/service-item.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-service-item',
|
selector: 'openlp-service-item',
|
||||||
|
@ -2,7 +2,7 @@ import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/cor
|
|||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
import { OpenLPService } from '../../../services/openlp.service';
|
import { OpenLPService } from '../../../services/openlp.service';
|
||||||
import { ServiceItem } from '../../../responses';
|
import { ServiceItem } from '../../../interfaces/service-item.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-service-list',
|
selector: 'openlp-service-list',
|
||||||
|
@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { OpenLPService } from '../../services/openlp.service';
|
import { OpenLPService } from '../../services/openlp.service';
|
||||||
import { PageTitleService } from '../../services/page-title.service';
|
import { PageTitleService } from '../../services/page-title.service';
|
||||||
import { ServiceItem } from '../../responses';
|
import { ServiceItem } from '../../interfaces/service-item.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-service',
|
selector: 'openlp-service',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { Slide } from '../../../responses';
|
import { Slide } from '../../../interfaces/slide.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-slide-item',
|
selector: 'openlp-slide-item',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
import { Slide } from '../../../responses';
|
import { Slide } from '../../../interfaces/slide.interface';
|
||||||
import { OpenLPService } from '../../../services/openlp.service';
|
import { OpenLPService } from '../../../services/openlp.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||||
import { Slide } from '../../../responses';
|
import { Slide } from '../../../interfaces/slide.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-stage-view-item',
|
selector: 'app-stage-view-item',
|
||||||
|
@ -3,7 +3,8 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { SettingsProperties, SettingsService } from '../../services/settings.service';
|
import { SettingsProperties, SettingsService } from '../../services/settings.service';
|
||||||
import { OpenLPService } from '../../services/openlp.service';
|
import { OpenLPService } from '../../services/openlp.service';
|
||||||
import { ServiceItem, Slide } from '../../responses';
|
import { ServiceItem } from '../../interfaces/service-item.interface';
|
||||||
|
import { Slide } from '../../interfaces/slide.interface';
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
text: string;
|
text: string;
|
||||||
|
@ -3,7 +3,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { OpenLPService } from '../../services/openlp.service';
|
import { OpenLPService } from '../../services/openlp.service';
|
||||||
import { PageTitleService } from '../../services/page-title.service';
|
import { PageTitleService } from '../../services/page-title.service';
|
||||||
import { Theme } from '../../responses';
|
import { Theme } from '../../interfaces/theme.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openlp-themes',
|
selector: 'openlp-themes',
|
||||||
|
6
src/app/enums/display-mode.enum.ts
Normal file
6
src/app/enums/display-mode.enum.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export enum DisplayMode {
|
||||||
|
Blank,
|
||||||
|
Theme,
|
||||||
|
Desktop,
|
||||||
|
Presentation
|
||||||
|
}
|
4
src/app/enums/web-socket-status.enum.ts
Normal file
4
src/app/enums/web-socket-status.enum.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export enum WebSocketStatus {
|
||||||
|
Open,
|
||||||
|
Closed
|
||||||
|
}
|
3
src/app/interfaces/auth-token.interface.ts
Normal file
3
src/app/interfaces/auth-token.interface.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface AuthToken {
|
||||||
|
token: string;
|
||||||
|
}
|
4
src/app/interfaces/credentials.interface.ts
Normal file
4
src/app/interfaces/credentials.interface.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface Credentials {
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
}
|
3
src/app/interfaces/language.interface.ts
Normal file
3
src/app/interfaces/language.interface.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface Language {
|
||||||
|
language: string;
|
||||||
|
}
|
3
src/app/interfaces/main-view.interface.ts
Normal file
3
src/app/interfaces/main-view.interface.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface MainView {
|
||||||
|
binary_image: string;
|
||||||
|
}
|
5
src/app/interfaces/message-type.interface.ts
Normal file
5
src/app/interfaces/message-type.interface.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export interface MessageType {
|
||||||
|
plugin: string;
|
||||||
|
key: string;
|
||||||
|
value: any;
|
||||||
|
}
|
4
src/app/interfaces/plugin-description.interface.ts
Normal file
4
src/app/interfaces/plugin-description.interface.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface PluginDescription {
|
||||||
|
key: string;
|
||||||
|
name: string;
|
||||||
|
}
|
9
src/app/interfaces/service-item.interface.ts
Normal file
9
src/app/interfaces/service-item.interface.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export interface ServiceItem {
|
||||||
|
id: string;
|
||||||
|
notes: string;
|
||||||
|
plugin: string;
|
||||||
|
selected: boolean;
|
||||||
|
title: string;
|
||||||
|
is_valid: boolean;
|
||||||
|
slides: object[];
|
||||||
|
}
|
4
src/app/interfaces/shortcut.interface.ts
Normal file
4
src/app/interfaces/shortcut.interface.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface Shortcut {
|
||||||
|
action: string;
|
||||||
|
shortcut: string[];
|
||||||
|
}
|
10
src/app/interfaces/slide.interface.ts
Normal file
10
src/app/interfaces/slide.interface.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export interface Slide {
|
||||||
|
selected: boolean;
|
||||||
|
html: string;
|
||||||
|
tag: string;
|
||||||
|
text: string;
|
||||||
|
chords: string;
|
||||||
|
lines: string[];
|
||||||
|
first_slide_of_tag: boolean;
|
||||||
|
img: string;
|
||||||
|
}
|
6
src/app/interfaces/system-information.interface.ts
Normal file
6
src/app/interfaces/system-information.interface.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface SystemInformation {
|
||||||
|
websocket_port: number;
|
||||||
|
login_required: boolean;
|
||||||
|
api_version?: number;
|
||||||
|
api_revision?: number;
|
||||||
|
}
|
5
src/app/interfaces/theme.interface.ts
Normal file
5
src/app/interfaces/theme.interface.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export interface Theme {
|
||||||
|
name: string;
|
||||||
|
selected: boolean;
|
||||||
|
thumbnail: object;
|
||||||
|
}
|
7
src/app/models/display.ts
Normal file
7
src/app/models/display.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { DisplayMode } from '../enums/display-mode.enum';
|
||||||
|
|
||||||
|
export class Display {
|
||||||
|
bigDisplayButtons: boolean;
|
||||||
|
darkTheme: boolean;
|
||||||
|
displayMode: DisplayMode;
|
||||||
|
}
|
7
src/app/models/message.ts
Normal file
7
src/app/models/message.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { MessageType } from '../interfaces/message-type.interface';
|
||||||
|
|
||||||
|
export class Message<T extends MessageType> {
|
||||||
|
plugin: T['plugin'];
|
||||||
|
key: T['key'];
|
||||||
|
value: T['value'];
|
||||||
|
}
|
10
src/app/models/shortcuts.ts
Normal file
10
src/app/models/shortcuts.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export class Shortcuts {
|
||||||
|
previousSlide = ['Up', 'PgUp'];
|
||||||
|
nextSlide = ['Down', 'PgDown'];
|
||||||
|
previousItem = ['Left'];
|
||||||
|
nextItem = ['Right'];
|
||||||
|
showDisplay = ['Space'];
|
||||||
|
themeDisplay = ['t'];
|
||||||
|
blankDisplay = ['.'];
|
||||||
|
desktopDisplay = ['d'];
|
||||||
|
}
|
27
src/app/models/state.ts
Normal file
27
src/app/models/state.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { DisplayMode } from '../enums/display-mode.enum';
|
||||||
|
|
||||||
|
export class State {
|
||||||
|
isAuthorized: boolean;
|
||||||
|
version: number;
|
||||||
|
slide: number;
|
||||||
|
display: boolean;
|
||||||
|
isSecure: boolean;
|
||||||
|
blank: boolean;
|
||||||
|
twelve: boolean;
|
||||||
|
theme: boolean;
|
||||||
|
item: string;
|
||||||
|
|
||||||
|
live = () => !(this.blank || this.display || this.theme);
|
||||||
|
|
||||||
|
get displayMode() {
|
||||||
|
if (this.blank) {
|
||||||
|
return DisplayMode.Blank;
|
||||||
|
} else if (this.display) {
|
||||||
|
return DisplayMode.Desktop;
|
||||||
|
} else if (this.theme) {
|
||||||
|
return DisplayMode.Theme;
|
||||||
|
} else {
|
||||||
|
return DisplayMode.Presentation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,111 +0,0 @@
|
|||||||
export interface PluginDescription {
|
|
||||||
key: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class State {
|
|
||||||
isAuthorized: boolean;
|
|
||||||
version: number;
|
|
||||||
slide: number;
|
|
||||||
display: boolean;
|
|
||||||
isSecure: boolean;
|
|
||||||
blank: boolean;
|
|
||||||
twelve: boolean;
|
|
||||||
theme: boolean;
|
|
||||||
item: string;
|
|
||||||
|
|
||||||
live = () => !(this.blank || this.display || this.theme);
|
|
||||||
|
|
||||||
get displayMode() {
|
|
||||||
if (this.blank) {
|
|
||||||
return DisplayMode.Blank;
|
|
||||||
} else if (this.display) {
|
|
||||||
return DisplayMode.Desktop;
|
|
||||||
} else if (this.theme) {
|
|
||||||
return DisplayMode.Theme;
|
|
||||||
} else {
|
|
||||||
return DisplayMode.Presentation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Display {
|
|
||||||
bigDisplayButtons: boolean;
|
|
||||||
darkTheme: boolean;
|
|
||||||
displayMode: DisplayMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum DisplayMode {
|
|
||||||
Blank,
|
|
||||||
Theme,
|
|
||||||
Desktop,
|
|
||||||
Presentation
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Slide {
|
|
||||||
selected: boolean;
|
|
||||||
html: string;
|
|
||||||
tag: string;
|
|
||||||
text: string;
|
|
||||||
chords: string;
|
|
||||||
lines: string[];
|
|
||||||
first_slide_of_tag: boolean;
|
|
||||||
img: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServiceItem {
|
|
||||||
id: string;
|
|
||||||
notes: string;
|
|
||||||
plugin: string;
|
|
||||||
selected: boolean;
|
|
||||||
title: string;
|
|
||||||
is_valid: boolean;
|
|
||||||
slides: object[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Theme {
|
|
||||||
name: string;
|
|
||||||
selected: boolean;
|
|
||||||
thumbnail: object;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Language {
|
|
||||||
language: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MainView {
|
|
||||||
binary_image: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Shortcut {
|
|
||||||
action: string;
|
|
||||||
shortcut: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SystemInformation {
|
|
||||||
websocket_port: number;
|
|
||||||
login_required: boolean;
|
|
||||||
api_version?: number;
|
|
||||||
api_revision?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Credentials {
|
|
||||||
username: string;
|
|
||||||
password: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AuthToken {
|
|
||||||
token: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Message<T extends MessageType> {
|
|
||||||
plugin: T['plugin'];
|
|
||||||
key: T['key'];
|
|
||||||
value: T['value'];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MessageType {
|
|
||||||
plugin: string;
|
|
||||||
key: string;
|
|
||||||
value: any;
|
|
||||||
}
|
|
@ -6,24 +6,22 @@ import { TitleCasePipe } from '@angular/common';
|
|||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { Observable, of, Subscription } from 'rxjs';
|
import { Observable, of, Subscription } from 'rxjs';
|
||||||
import { catchError, finalize, shareReplay, tap } from 'rxjs/operators';
|
import { catchError, finalize, shareReplay, tap } from 'rxjs/operators';
|
||||||
import { SentenceCasePipe } from '../components/pipes/sentence-case.pipe';
|
import { SentenceCasePipe } from '../pipes/sentence-case.pipe';
|
||||||
import { LoginComponent } from '../components/login/login.component';
|
import { LoginComponent } from '../components/login/login.component';
|
||||||
|
import { PluginDescription } from '../interfaces/plugin-description.interface';
|
||||||
import {
|
import { State } from '../models/state';
|
||||||
PluginDescription,
|
import { Slide } from '../interfaces/slide.interface';
|
||||||
State,
|
import { ServiceItem } from '../interfaces/service-item.interface'
|
||||||
Slide,
|
import { Theme } from '../interfaces/theme.interface';
|
||||||
ServiceItem,
|
import { Language } from '../interfaces/language.interface';
|
||||||
Theme,
|
import { MainView } from '../interfaces/main-view.interface';
|
||||||
Language,
|
import { Shortcut } from '../interfaces/shortcut.interface';
|
||||||
MainView,
|
import { SystemInformation } from '../interfaces/system-information.interface';
|
||||||
Shortcut,
|
import { Credentials } from '../interfaces/credentials.interface';
|
||||||
SystemInformation,
|
import { AuthToken } from '../interfaces/auth-token.interface';
|
||||||
Credentials,
|
import { Message } from '../models/message';
|
||||||
AuthToken,
|
import { MessageType } from '../interfaces/message-type.interface';
|
||||||
Message,
|
import { WebSocketStatus } from '../enums/web-socket-status.enum';
|
||||||
MessageType
|
|
||||||
} from '../responses';
|
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import { createWebSocket } from '../openlp-websocket';
|
import { createWebSocket } from '../openlp-websocket';
|
||||||
import { deserialize } from '../utils';
|
import { deserialize } from '../utils';
|
||||||
@ -37,10 +35,6 @@ const httpOptions = {
|
|||||||
|
|
||||||
const WEBSOCKET_RECONNECT_TIMEOUT = 5 * 1000;
|
const WEBSOCKET_RECONNECT_TIMEOUT = 5 * 1000;
|
||||||
|
|
||||||
export enum WebSocketStatus {
|
|
||||||
Open, Closed
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class OpenLPService {
|
export class OpenLPService {
|
||||||
private apiURL: string;
|
private apiURL: string;
|
||||||
|
@ -3,17 +3,7 @@ import { EventEmitter, 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';
|
||||||
import { OpenLPService } from './openlp.service';
|
import { OpenLPService } from './openlp.service';
|
||||||
|
import { Shortcuts } from '../models/shortcuts';
|
||||||
export class Shortcuts {
|
|
||||||
previousSlide = ['Up', 'PgUp'];
|
|
||||||
nextSlide = ['Down', 'PgDown'];
|
|
||||||
previousItem = ['Left'];
|
|
||||||
nextItem = ['Right'];
|
|
||||||
showDisplay = ['Space'];
|
|
||||||
themeDisplay = ['t'];
|
|
||||||
blankDisplay = ['.'];
|
|
||||||
desktopDisplay = ['d'];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Options {
|
interface Options {
|
||||||
element: any;
|
element: any;
|
||||||
|
Loading…
Reference in New Issue
Block a user