mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 03:22:48 +00:00
Merge branch 'move-services-to-folder' into 'master'
Move services to folder. See merge request openlp/web-remote!138
This commit is contained in:
commit
9a8db9619a
@ -4,15 +4,15 @@ import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { State, Display, DisplayMode } from './responses';
|
||||
import { OpenLPService, WebSocketStatus } from './openlp.service';
|
||||
import { WindowRef } from './window-ref.service';
|
||||
import { PageTitleService } from './page-title.service';
|
||||
import { OpenLPService, WebSocketStatus } from './services/openlp.service';
|
||||
import { WindowRef } from './services/window-ref.service';
|
||||
import { PageTitleService } from './services/page-title.service';
|
||||
import { fromEvent } from 'rxjs';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component';
|
||||
import { Shortcuts, ShortcutsService } from './shortcuts.service';
|
||||
import { Shortcuts, ShortcutsService } from './services/shortcuts.service';
|
||||
import { ShortcutPipe } from './components/pipes/shortcut.pipe';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { SettingsService } from './services/settings.service';
|
||||
import * as supportedBrowsers from '../assets/supportedBrowsers';
|
||||
|
||||
@Component({
|
||||
|
@ -27,10 +27,11 @@ import { MatSliderModule } from '@angular/material/slider';
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageTitleService } from './page-title.service';
|
||||
import { OpenLPService } from './openlp.service';
|
||||
import { TranslationService } from './translation.service';
|
||||
import { WindowRef } from './window-ref.service';
|
||||
import { OpenLPService } from './services/openlp.service';
|
||||
import { PageTitleService } from './services/page-title.service';
|
||||
import { SettingsService } from './services/settings.service';
|
||||
import { ShortcutsService } from './services/shortcuts.service';
|
||||
import { TranslationService } from './services/translation.service';
|
||||
import { AppRoutingModule } from './app.routing';
|
||||
import { ServiceComponent } from './components/service/service.component';
|
||||
import { AlertComponent } from './components/alert/alert.component';
|
||||
@ -114,13 +115,14 @@ import { StageChordPreviewComponent } from './components/settings/stage-chord-pr
|
||||
})
|
||||
],
|
||||
providers: [
|
||||
PageTitleService,
|
||||
OpenLPService,
|
||||
TranslationService,
|
||||
PageTitleService,
|
||||
SentenceCasePipe,
|
||||
SettingsService,
|
||||
ShortcutsService,
|
||||
Title,
|
||||
TitleCasePipe,
|
||||
WindowRef,
|
||||
TranslationService,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
|
@ -3,8 +3,8 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
|
||||
@Component({
|
||||
selector: 'openlp-alert',
|
||||
|
@ -4,7 +4,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { SettingsService } from 'src/app/settings.service';
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { SettingsService } from '../../services/settings.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { ServiceItem, Slide } from '../../responses';
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-view',
|
||||
|
@ -2,7 +2,7 @@ import { Component } from '@angular/core';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../../openlp.service';
|
||||
import { OpenLPService } from '../../../services/openlp.service';
|
||||
|
||||
@Component({
|
||||
selector: 'openlp-search-options',
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { PluginDescription } from '../../responses';
|
||||
import { SearchOptionsComponent } from './search-options/search-options.component';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
import { DeleteConfirmationComponent } from './delete-confirmation/delete-confirmation.component';
|
||||
import { OpenLPService } from '../../../openlp.service';
|
||||
import { OpenLPService } from '../../../services/openlp.service';
|
||||
import { ServiceItem } from '../../../responses';
|
||||
|
||||
@Component({
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { OpenLPService } from '../../../openlp.service';
|
||||
import { OpenLPService } from '../../../services/openlp.service';
|
||||
import { ServiceItem } from '../../../responses';
|
||||
|
||||
@Component({
|
||||
|
@ -2,8 +2,8 @@ import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { ServiceItem } from '../../responses';
|
||||
|
||||
@Component({
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { SettingsProperties, SettingsPropertiesItem, SettingsService } from '../../settings.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { SettingsProperties, SettingsPropertiesItem, SettingsService } from '../../services/settings.service';
|
||||
|
||||
@Component({
|
||||
selector: 'openlp-settings',
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { fromEvent, Subscription } from 'rxjs';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { SettingsProperties, SettingsService } from 'src/app/settings.service';
|
||||
import { SettingsProperties, SettingsService } from '../../../services/settings.service';
|
||||
|
||||
@Component({
|
||||
selector: 'openlp-stage-chord-preview',
|
||||
|
@ -2,7 +2,7 @@ import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/cor
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { Slide } from '../../../responses';
|
||||
import { OpenLPService } from '../../../openlp.service';
|
||||
import { OpenLPService } from '../../../services/openlp.service';
|
||||
|
||||
@Component({
|
||||
selector: 'openlp-slide-list',
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { SlideListItem } from './slide-list/slide-list.component';
|
||||
|
||||
@Component({
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { SettingsProperties, SettingsService } from 'src/app/settings.service';
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { SettingsProperties, SettingsService } from '../../services/settings.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { ServiceItem, Slide } from '../../responses';
|
||||
|
||||
interface Tag {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { OpenLPService } from '../../openlp.service';
|
||||
import { PageTitleService } from '../../page-title.service';
|
||||
import { OpenLPService } from '../../services/openlp.service';
|
||||
import { PageTitleService } from '../../services/page-title.service';
|
||||
import { Theme } from '../../responses';
|
||||
|
||||
@Component({
|
||||
|
@ -6,8 +6,8 @@ import { TitleCasePipe } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Observable, of, Subscription } from 'rxjs';
|
||||
import { catchError, finalize, shareReplay, tap } from 'rxjs/operators';
|
||||
import { SentenceCasePipe } from './components/pipes/sentence-case.pipe';
|
||||
import { LoginComponent } from './components/login/login.component';
|
||||
import { SentenceCasePipe } from '../components/pipes/sentence-case.pipe';
|
||||
import { LoginComponent } from '../components/login/login.component';
|
||||
|
||||
import {
|
||||
PluginDescription,
|
||||
@ -23,10 +23,10 @@ import {
|
||||
AuthToken,
|
||||
Message,
|
||||
MessageType
|
||||
} from './responses';
|
||||
import { environment } from '../environments/environment';
|
||||
import { createWebSocket } from './openlp-websocket';
|
||||
import { deserialize } from './utils';
|
||||
} from '../responses';
|
||||
import { environment } from '../../environments/environment';
|
||||
import { createWebSocket } from '../openlp-websocket';
|
||||
import { deserialize } from '../utils';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({
|
@ -16,7 +16,7 @@ export interface SettingsPropertiesItem<SP extends keyof SettingsProperties, SV
|
||||
|
||||
const LOCAL_STORAGE_PREFIX = 'OpenLP-';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
@Injectable()
|
||||
export class SettingsService {
|
||||
constructor() {
|
||||
window.addEventListener('storage', this._handleStorageEvent);
|
@ -20,7 +20,7 @@ interface Options {
|
||||
keys: string;
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
@Injectable()
|
||||
export class ShortcutsService {
|
||||
defaults: Partial<Options> = {
|
||||
element: this.document
|
@ -3,9 +3,7 @@ import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class TranslationService implements TranslateLoader {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
@ -4,10 +4,8 @@ function _window(): any {
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class WindowRef {
|
||||
|
||||
get nativeWindow(): any {
|
||||
return _window();
|
||||
}
|
Loading…
Reference in New Issue
Block a user