1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-25 02:04:15 +02:00

Updating packages #255

This commit is contained in:
Patrik J. Braun 2021-04-10 10:51:33 +02:00
parent 40f83f49cd
commit 61777e4eaa
22 changed files with 9006 additions and 6076 deletions

14883
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -30,20 +30,20 @@
"url": "https://github.com/bpatrik/PiGallery2/issues"
},
"dependencies": {
"bcrypt": "5.0.0",
"bcrypt": "5.0.1",
"body-parser": "1.19.0",
"cookie-parser": "1.4.5",
"cookie-session": "2.0.0-rc.1",
"csurf": "1.11.0",
"ejs": "3.1.5",
"exifreader": "3.13.0",
"ejs": "3.1.6",
"exifreader": "3.14.1",
"express": "4.17.1",
"express-unless": "0.5.0",
"fluent-ffmpeg": "2.1.2",
"image-size": "0.9.3",
"image-size": "0.9.7",
"jimp": "0.16.1",
"locale": "0.1.0",
"node-geocoder": "^3.27.0",
"node-geocoder": "3.27.0",
"reflect-metadata": "0.1.13",
"sharp": "0.23.4",
"sqlite3": "5.0.0",
@ -54,60 +54,61 @@
"winston": "2.4.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.803.20",
"@angular-devkit/build-optimizer": "0.803.20",
"@angular/animations": "8.2.14",
"@angular/cli": "8.3.20",
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/compiler-cli": "8.2.14",
"@angular/core": "8.2.14",
"@angular/forms": "8.2.14",
"@angular-devkit/build-angular": "0.1102.8",
"@angular-devkit/build-optimizer": "0.1102.8",
"@angular/animations": "11.2.9",
"@angular/cli": "11.2.8",
"@angular/common": "11.2.9",
"@angular/compiler": "11.2.9",
"@angular/compiler-cli": "11.2.9",
"@angular/core": "11.2.9",
"@angular/forms": "11.2.9",
"@angular/http": "7.2.15",
"@angular/language-service": "8.2.14",
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "8.2.14",
"@angular/router": "8.2.14",
"@angular/language-service": "11.2.9",
"@angular/localize": "^11.2.9",
"@angular/platform-browser": "11.2.9",
"@angular/platform-browser-dynamic": "11.2.9",
"@angular/router": "11.2.9",
"@ngx-translate/i18n-polyfill": "1.0.0",
"@types/bcrypt": "3.0.0",
"@types/bcrypt": "3.0.1",
"@types/bcryptjs": "2.4.2",
"@types/chai": "4.2.14",
"@types/chai": "4.2.16",
"@types/cookie-parser": "1.4.2",
"@types/cookie-session": "2.0.42",
"@types/csurf": "1.11.0",
"@types/ejs": "3.0.5",
"@types/express": "4.17.9",
"@types/express-jwt": "6.0.0",
"@types/fluent-ffmpeg": "2.1.16",
"@types/gulp": "4.0.7",
"@types/csurf": "1.11.1",
"@types/ejs": "3.0.6",
"@types/express": "4.17.11",
"@types/express-jwt": "6.0.1",
"@types/fluent-ffmpeg": "2.1.17",
"@types/gulp": "4.0.8",
"@types/gulp-zip": "4.0.1",
"@types/image-size": "0.8.0",
"@types/jasmine": "3.6.2",
"@types/jsonwebtoken": "8.5.0",
"@types/node": "14.14.19",
"@types/jasmine": "3.6.9",
"@types/jsonwebtoken": "8.5.1",
"@types/node": "14.14.37",
"@types/node-geocoder": "^3.24.1",
"@types/sharp": "0.26.1",
"@types/sharp": "0.28.0",
"@types/winston": "2.4.4",
"@types/xml2js": "0.4.7",
"@types/xml2js": "0.4.8",
"@yaga/leaflet-ng2": "1.0.0",
"bootstrap": "4.5.3",
"chai": "4.2.0",
"bootstrap": "4.6.0",
"chai": "4.3.4",
"chai-http": "4.3.0",
"codelyzer": "6.0.1",
"core-js": "3.8.2",
"core-js": "3.10.1",
"coveralls": "3.1.0",
"deep-equal-in-any-order": "^1.0.28",
"deep-equal-in-any-order": "^1.1.4",
"ejs-loader": "0.5.0",
"gulp": "4.0.2",
"gulp-json-editor": "2.5.4",
"gulp-json-editor": "2.5.5",
"gulp-typescript": "5.0.1",
"gulp-zip": "5.0.2",
"gulp-zip": "5.1.0",
"hammerjs": "2.0.8",
"intl": "1.2.5",
"jasmine-core": "3.6.0",
"jasmine-core": "3.7.1",
"jasmine-spec-reporter": "6.0.0",
"jw-bootstrap-switch-ng2": "2.0.5",
"karma": "5.2.3",
"karma": "6.3.2",
"karma-chrome-launcher": "3.1.0",
"karma-cli": "2.0.0",
"karma-coverage-istanbul-reporter": "3.0.3",
@ -115,27 +116,27 @@
"karma-jasmine-html-reporter": "1.5.4",
"karma-remap-istanbul": "0.6.0",
"karma-systemjs": "0.16.0",
"mocha": "8.2.1",
"mocha": "8.3.2",
"natural-orderby": "2.0.3",
"ng2-cookies": "1.0.12",
"ng2-slim-loading-bar": "4.0.0",
"ngx-bootstrap": "5.2.0",
"ngx-clipboard": "12.3.0",
"ngx-toastr": "11.2.1",
"ngx-clipboard": "14.0.1",
"ngx-toastr": "13.2.1",
"nyc": "15.1.0",
"open-iconic": "1.1.1",
"protractor": "7.0.0",
"remap-istanbul": "0.13.0",
"rxjs": "6.5.3",
"rxjs-compat": "6.5.3",
"terser": "4.4.2",
"rxjs": "6.6.7",
"rxjs-compat": "6.6.7",
"terser": "5.6.1",
"ts-helpers": "1.1.2",
"ts-node": "9.1.1",
"tslint": "6.1.3",
"typescript": "3.5.3",
"typescript": "4.1.5",
"xlf-google-translate": "1.0.0-beta.19",
"xml2js": "0.4.23",
"zone.js": "0.11.3"
"zone.js": "0.11.4"
},
"//": [
"TODO: remove terser version lock once webpack is fixed",

View File

@ -24,14 +24,14 @@ export class Utils {
}
static removeNullOrEmptyObj<T extends any>(obj: T): T {
static removeNullOrEmptyObj<T extends { [key: string]: any }>(obj: T): T {
if (typeof obj !== 'object' || obj == null) {
return obj;
}
const keys = Object.keys(obj);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const key: string = keys[i];
if (obj[key] !== null && typeof obj[key] === 'object') {
if (Utils.removeNullOrEmptyObj(obj[key])) {
if (Object.keys(obj[key]).length === 0) {

View File

@ -73,7 +73,7 @@ const ROUTES: Routes = [
{path: '**', redirectTo: '/login', pathMatch: 'full'}
];
export const appRoutes: ModuleWithProviders = RouterModule.forRoot(ROUTES, {
export const appRoutes: ModuleWithProviders<RouterModule> = RouterModule.forRoot(ROUTES, {
anchorScrolling: 'enabled'
});

View File

@ -24,7 +24,7 @@ export class OverlayService {
const outer = document.createElement('div');
outer.style.visibility = 'hidden';
outer.style.width = '100px';
outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
(outer.style as any).msOverflowStyle = 'scrollbar'; // needed for WinJS apps
document.body.appendChild(outer);

View File

@ -20,7 +20,7 @@
title="At least this many"
i18n-title
[(ngModel)]="AsSomeOfQuery.min"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
name="someOfMinValue"
id="someOfMinValue"
required="required">
@ -38,7 +38,7 @@
</button>
<div class="container query-list">
<app-gallery-search-query-entry *ngFor="let sq of AsListQuery.list; index as i"
[(ngModel)]="sq"
[(ngModel)]="AsListQuery.list[i]"
(delete)="itemDeleted(i)">
</app-gallery-search-query-entry>
</div>
@ -65,8 +65,8 @@
placeholder="Search text"
class="form-control input-md"
[(ngModel)]="AsTextQuery.text"
(change)="onChange(queryEntry)"
(ngModelChange)="onChange(queryEntry)"
(change)="onChange()"
(ngModelChange)="onChange()"
type="text"/>
</div>
<ng-container [ngSwitch]="queryEntry.type">
@ -77,7 +77,7 @@
min="0"
step="0.1"
[(ngModel)]="AsDistanceQuery.distance"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
name="distance" required>
<div class="input-group-append">
<span class="input-group-text">km</span>
@ -92,7 +92,7 @@
i18n-title
class="form-control input-md"
[(ngModel)]="AsDistanceQuery.from.text"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
type="text">
</div>
</div>
@ -132,7 +132,7 @@
max="5"
class="form-control input-md"
[(ngModel)]="AsRangeQuery.value"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
type="number">
</div>
<div *ngSwitchCase="SearchQueryTypes.max_rating" class="col-md-8 input-group">
@ -146,7 +146,7 @@
max="5"
class="form-control input-md"
[(ngModel)]="AsRangeQuery.value"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
type="number">
</div>
<div *ngSwitchCase="SearchQueryTypes.min_resolution" class="col-md-8 input-group">
@ -160,7 +160,7 @@
min="0"
class="form-control input-md"
[(ngModel)]="AsRangeQuery.value"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
type="number">
<div class="input-group-append">
<span class="input-group-text">Mpx</span>
@ -177,7 +177,7 @@
[min]="0"
class="form-control input-md"
[(ngModel)]="AsRangeQuery.value"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
type="number">
<div class="input-group-append">
<span class="input-group-text">Mpx</span>
@ -199,7 +199,7 @@
i18n-switch-on-text
switch-handle-width="100"
switch-label-width="20"
(ngModelChange)="onChange(queryEntry)"
(ngModelChange)="onChange()"
[(ngModel)]="AsOrientationQuery.landscape">
</bSwitch>
</div>

View File

@ -58,7 +58,7 @@ export class GallerySearchQueryEntryComponent implements ControlValueAccessor, V
return <any>this.queryEntry;
}
get AsRangeQuery(): RangeSearch {
public get AsRangeQuery(): RangeSearch {
return <any>this.queryEntry;
}

View File

@ -1,4 +1,4 @@
import {Input, OnChanges, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';
import {Directive, Input, OnChanges, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {UserRoles} from '../../../../../common/entities/UserDTO';
import {Utils} from '../../../../../common/Utils';
@ -34,7 +34,9 @@ interface RecursiveState extends ConfigState {
[key: string]: RecursiveState;
}
export abstract class SettingsComponent<T extends { [key: string]: any }, S extends AbstractSettingsService<T> = AbstractSettingsService<T>>
@Directive()
export abstract class SettingsComponentDirective<T extends { [key: string]: any },
S extends AbstractSettingsService<T> = AbstractSettingsService<T>>
implements OnInit, OnDestroy, OnChanges, ISettingsComponent {
@Input()
@ -199,8 +201,8 @@ export abstract class SettingsComponent<T extends { [key: string]: any }, S exte
for (const key of Object.keys(obj)) {
to[key] = {};
if (obj[key].isConfigType || (typeof obj[key] === 'object' && typeof obj[key].value === 'undefined')) {
add(obj[key], to[key]);
continue;
add(obj[key], to[key]);
continue;
}
to[key] = obj[key].value;
}

View File

@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -14,7 +14,7 @@ import {I18n} from '@ngx-translate/i18n-polyfill';
'../_abstract/abstract.settings.component.css'],
providers: [BasicSettingsService],
})
export class BasicSettingsComponent extends SettingsComponent<BasicConfigDTO> {
export class BasicSettingsComponent extends SettingsComponentDirective<BasicConfigDTO> {
urlPlaceholder = location.origin;
urlBaseChanged = false;

View File

@ -3,7 +3,7 @@ import {AuthenticationService} from '../../../model/network/authentication.servi
import {Utils} from '../../../../../common/Utils';
import {NotificationService} from '../../../model/notification.service';
import {NavigationService} from '../../../model/navigation.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {DatabaseSettingsService} from './database.settings.service';
import {I18n} from '@ngx-translate/i18n-polyfill';
import {ServerConfig} from '../../../../../common/config/private/PrivateConfig';
@ -15,7 +15,7 @@ import {ServerConfig} from '../../../../../common/config/private/PrivateConfig';
'../_abstract/abstract.settings.component.css'],
providers: [DatabaseSettingsService],
})
export class DatabaseSettingsComponent extends SettingsComponent<ServerConfig.DataBaseConfig> implements OnInit {
export class DatabaseSettingsComponent extends SettingsComponentDirective<ServerConfig.DataBaseConfig> implements OnInit {
public types = Utils.enumToArray(ServerConfig.DatabaseType);
public DatabaseType = ServerConfig.DatabaseType;

View File

@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -16,7 +16,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [FacesSettingsService],
})
export class FacesSettingsComponent extends SettingsComponent<ClientConfig.FacesConfig> {
export class FacesSettingsComponent extends SettingsComponentDirective<ClientConfig.FacesConfig> {
public readonly userRoles = Utils
.enumToArray(UserRoles)

View File

@ -4,7 +4,7 @@ import {AuthenticationService} from '../../../model/network/authentication.servi
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
import {ErrorDTO} from '../../../../../common/entities/Error';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {Utils} from '../../../../../common/Utils';
import {I18n} from '@ngx-translate/i18n-polyfill';
import {ScheduledJobsService} from '../scheduled-jobs.service';
@ -19,7 +19,7 @@ import {ServerConfig} from '../../../../../common/config/private/PrivateConfig';
'../_abstract/abstract.settings.component.css'],
providers: [IndexingSettingsService],
})
export class IndexingSettingsComponent extends SettingsComponent<ServerConfig.IndexingConfig, IndexingSettingsService>
export class IndexingSettingsComponent extends SettingsComponentDirective<ServerConfig.IndexingConfig, IndexingSettingsService>
implements OnInit, OnDestroy {

View File

@ -3,7 +3,7 @@ import {JobsSettingsService} from './jobs.settings.service';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {I18n} from '@ngx-translate/i18n-polyfill';
import {ScheduledJobsService} from '../scheduled-jobs.service';
import {
@ -27,7 +27,7 @@ import {ServerConfig} from '../../../../../common/config/private/PrivateConfig';
'../_abstract/abstract.settings.component.css'],
providers: [JobsSettingsService]
})
export class JobsSettingsComponent extends SettingsComponent<ServerConfig.JobConfig, JobsSettingsService>
export class JobsSettingsComponent extends SettingsComponentDirective<ServerConfig.JobConfig, JobsSettingsService>
implements OnInit, OnDestroy, OnChanges {
@ViewChild('jobModal', {static: false}) public jobModal: ModalDirective;

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core';
import {MapSettingsService} from './map.settings.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -16,7 +16,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [MapSettingsService],
})
export class MapSettingsComponent extends SettingsComponent<ClientConfig.MapConfig> {
export class MapSettingsComponent extends SettingsComponentDirective<ClientConfig.MapConfig> {
public mapProviders: { key: number, value: string }[] = [];
public MapProviders = ClientConfig.MapProviders;

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core';
import {MetaFileSettingsService} from './metafile.settings.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -15,7 +15,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [MetaFileSettingsService],
})
export class MetaFileSettingsComponent extends SettingsComponent<ClientConfig.MetaFileConfig> {
export class MetaFileSettingsComponent extends SettingsComponentDirective<ClientConfig.MetaFileConfig> {
constructor(_authService: AuthenticationService,
_navigation: NavigationService,

View File

@ -1,5 +1,5 @@
import {Component, OnChanges} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -17,7 +17,7 @@ import {StringifySortingMethod} from '../../../pipes/StringifySortingMethod';
'../_abstract/abstract.settings.component.css'],
providers: [OtherSettingsService],
})
export class OtherSettingsComponent extends SettingsComponent<OtherConfigDTO> implements OnChanges {
export class OtherSettingsComponent extends SettingsComponentDirective<OtherConfigDTO> implements OnChanges {
types: { key: number; value: string }[] = [];

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core';
import {PhotoSettingsService} from './photo.settings.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -19,7 +19,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [PhotoSettingsService],
})
export class PhotoSettingsComponent extends SettingsComponent<{
export class PhotoSettingsComponent extends SettingsComponentDirective<{
server: ServerConfig.PhotoConfig,
client: ClientConfig.PhotoConfig
}> {

View File

@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -14,7 +14,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [RandomPhotoSettingsService],
})
export class RandomPhotoSettingsComponent extends SettingsComponent<ClientConfig.RandomPhotoConfig> {
export class RandomPhotoSettingsComponent extends SettingsComponentDirective<ClientConfig.RandomPhotoConfig> {
constructor(_authService: AuthenticationService,
_navigation: NavigationService,

View File

@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -14,7 +14,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [SearchSettingsService],
})
export class SearchSettingsComponent extends SettingsComponent<ClientConfig.SearchConfig> {
export class SearchSettingsComponent extends SettingsComponentDirective<ClientConfig.SearchConfig> {
constructor(_authService: AuthenticationService,
_navigation: NavigationService,

View File

@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -15,7 +15,7 @@ import {SharingDTO} from '../../../../../common/entities/SharingDTO';
'../_abstract/abstract.settings.component.css'],
providers: [ShareSettingsService],
})
export class ShareSettingsComponent extends SettingsComponent<ClientConfig.SharingConfig, ShareSettingsService> implements OnInit {
export class ShareSettingsComponent extends SettingsComponentDirective<ClientConfig.SharingConfig, ShareSettingsService> implements OnInit {
public shares: SharingDTO[] = [];

View File

@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -19,7 +19,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
providers: [ThumbnailSettingsService],
})
export class ThumbnailSettingsComponent
extends SettingsComponent<{ server: ServerConfig.ThumbnailConfig, client: ClientConfig.ThumbnailConfig }>
extends SettingsComponentDirective<{ server: ServerConfig.ThumbnailConfig, client: ClientConfig.ThumbnailConfig }>
implements OnInit {
JobProgressStates = JobProgressStates;
readonly jobName = DefaultsJobs[DefaultsJobs['Thumbnail Generation']];

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core';
import {VideoSettingsService} from './video.settings.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
@ -19,7 +19,7 @@ import {ClientConfig} from '../../../../../common/config/public/ClientConfig';
'../_abstract/abstract.settings.component.css'],
providers: [VideoSettingsService],
})
export class VideoSettingsComponent extends SettingsComponent<{ server: ServerConfig.VideoConfig, client: ClientConfig.VideoConfig }> {
export class VideoSettingsComponent extends SettingsComponentDirective<{ server: ServerConfig.VideoConfig, client: ClientConfig.VideoConfig }> {
readonly resolutionTypes: ServerConfig.resolutionType[] = [360, 480, 720, 1080, 1440, 2160, 4320];
@ -29,7 +29,7 @@ export class VideoSettingsComponent extends SettingsComponent<{ server: ServerCo
mp4: ['libx264', 'libx265'].map((e: ServerConfig.codecType) => ({key: e, value: e}))
};
formats: { key: ServerConfig.formatType, value: ServerConfig.formatType }[] = ['mp4', 'webm']
.map((e: ServerConfig.formatType) => ({key: e, value: e}));
.map((e: ServerConfig.formatType) => ({key: e, value: e}));
fps = [24, 25, 30, 48, 50, 60].map(e => ({key: e, value: e}));
JobProgressStates = JobProgressStates;
@ -78,7 +78,7 @@ export class VideoSettingsComponent extends SettingsComponent<{ server: ServerCo
bitRate = 8 * 1024 * 1024;
} else if (resolution <= 1440) {
bitRate = 16 * 1024 * 1024;
} else {
} else {
bitRate = 40 * 1024 * 1024;
}
@ -91,7 +91,7 @@ export class VideoSettingsComponent extends SettingsComponent<{ server: ServerCo
updateBitRate() {
this.states.server.transcoding.bitRate.value = this.getRecommendedBitRate(this.states.server.transcoding.resolution.value,
this.states.server.transcoding.fps.value);
this.states.server.transcoding.fps.value);
}
formatChanged(format: ServerConfig.formatType) {