From 95b06ffc63e7368e021b43a05c33510d5bee9429 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sun, 15 Dec 2019 10:52:56 +0100 Subject: [PATCH] improving setting ui --- src/backend/middlewares/GalleryMWs.ts | 2 +- .../thumbnail/PhotoConverterMWs.ts | 14 ++- .../model/fileprocessing/PhotoProcessing.ts | 2 +- .../model/tasks/tasks/PhotoConvertingTask.ts | 4 +- src/common/config/private/IPrivateConfig.ts | 5 +- .../private/PrivateConfigDefaultsClass.ts | 3 +- src/common/config/public/ConfigClass.ts | 12 ++ .../entities/settings/BasicConfigDTO.ts | 1 + src/frontend/app/app.routing.ts | 4 +- src/frontend/app/ui/admin/admin.component.css | 8 +- .../app/ui/admin/admin.component.html | 90 ++++++++++---- src/frontend/app/ui/admin/admin.component.ts | 20 ++- .../media.lightbox.gallery.component.html | 4 +- .../media/media.lightbox.gallery.component.ts | 51 ++++---- .../settings/_abstract/ISettingsComponent.ts | 5 + .../_abstract/abstract.settings.component.ts | 10 +- .../basic/basic.settings.component.html | 13 +- .../basic/basic.settings.component.ts | 1 + .../database/database.settings.component.html | 115 ++++++++++++------ .../database/database.settings.component.ts | 6 +- .../faces/faces.settings.component.html | 2 +- .../indexing/indexing.settings.component.html | 3 +- .../indexing/indexing.settings.component.ts | 2 +- .../settings/map/map.settings.component.html | 3 +- .../metafile.settings.component.html | 2 +- .../other/other.settings.component.html | 2 +- .../random-photo.settings.component.html | 4 +- .../random-photo.settings.component.ts | 2 +- .../search/search.settings.component.html | 2 +- .../share/share.settings.component.html | 2 +- .../tasks/tasks.settings.component.html | 3 +- .../thumbnail.settings.component.html | 21 +--- .../thumbnail/thumbnail.settings.component.ts | 5 +- .../usermanager.settings.component.html | 2 +- .../usermanager.settings.component.ts | 16 ++- .../video/video.settings.component.html | 3 +- 36 files changed, 286 insertions(+), 158 deletions(-) create mode 100644 src/frontend/app/ui/settings/_abstract/ISettingsComponent.ts diff --git a/src/backend/middlewares/GalleryMWs.ts b/src/backend/middlewares/GalleryMWs.ts index 427cf522..198876d4 100644 --- a/src/backend/middlewares/GalleryMWs.ts +++ b/src/backend/middlewares/GalleryMWs.ts @@ -183,7 +183,7 @@ export class GalleryMWs { if (!(req.resultPipe)) { return next(); } - const fullMediaPath = path.join(ProjectPath.ImageFolder, req.resultPipe); + const fullMediaPath: string = req.resultPipe; if (fs.statSync(fullMediaPath).isDirectory()) { return next(); diff --git a/src/backend/middlewares/thumbnail/PhotoConverterMWs.ts b/src/backend/middlewares/thumbnail/PhotoConverterMWs.ts index 892858fe..8dd54fba 100644 --- a/src/backend/middlewares/thumbnail/PhotoConverterMWs.ts +++ b/src/backend/middlewares/thumbnail/PhotoConverterMWs.ts @@ -6,9 +6,13 @@ import {Config} from '../../../common/config/private/Config'; export class PhotoConverterMWs { public static async convertPhoto(req: Request, res: Response, next: NextFunction) { - if (!(req.resultPipe || Config.Server.Media.Photo.converting.enabled === false)) { + if (!req.resultPipe) { return next(); } + // if conversion is not enabled redirect, so browser can cache the full + if (Config.Client.Media.Photo.Converting.enabled === false) { + return res.redirect(req.originalUrl.slice(0, -1 * '\\bestFit'.length)); + } const fullMediaPath = req.resultPipe; const convertedVideo = PhotoProcessing.generateConvertedFileName(fullMediaPath); @@ -19,12 +23,12 @@ export class PhotoConverterMWs { return next(); } - if (Config.Server.Media.Photo.converting.onTheFly) { + if (Config.Server.Media.Photo.Converting.onTheFly) { req.resultPipe = await PhotoProcessing.convertPhoto(fullMediaPath, - Config.Server.Media.Photo.converting.resolution); + Config.Server.Media.Photo.Converting.resolution); } - - return next(); + // not converted and won't be now + return res.redirect(req.originalUrl.slice(0, -1 * '\\bestFit'.length)); } } diff --git a/src/backend/model/fileprocessing/PhotoProcessing.ts b/src/backend/model/fileprocessing/PhotoProcessing.ts index 3cff51c0..11ec2aff 100644 --- a/src/backend/model/fileprocessing/PhotoProcessing.ts +++ b/src/backend/model/fileprocessing/PhotoProcessing.ts @@ -108,7 +108,7 @@ export class PhotoProcessing { public static generateConvertedFileName(photoPath: string): string { const extension = path.extname(photoPath); const file = path.basename(photoPath, extension); - const postfix = Config.Server.Media.Photo.converting.resolution; + const postfix = Config.Server.Media.Photo.Converting.resolution; return path.join(ProjectPath.TranscodedFolder, ProjectPath.getRelativePathToImages(path.dirname(photoPath)), file + '_' + postfix + '.jpg'); diff --git a/src/backend/model/tasks/tasks/PhotoConvertingTask.ts b/src/backend/model/tasks/tasks/PhotoConvertingTask.ts index abc81fd6..1c5afe63 100644 --- a/src/backend/model/tasks/tasks/PhotoConvertingTask.ts +++ b/src/backend/model/tasks/tasks/PhotoConvertingTask.ts @@ -21,7 +21,7 @@ export class PhotoConvertingTask extends FileTask { } public get Supported(): boolean { - return Config.Server.Media.Photo.converting.enabled === true; + return Config.Server.Media.Photo.Converting.enabled === true; } protected async processDirectory(directory: DirectoryDTO): Promise { @@ -40,7 +40,7 @@ export class PhotoConvertingTask extends FileTask { } protected async processFile(file: string): Promise { - await PhotoProcessing.generateThumbnail(file, Config.Server.Media.Photo.converting.resolution, ThumbnailSourceType.Photo, false); + await PhotoProcessing.generateThumbnail(file, Config.Server.Media.Photo.Converting.resolution, ThumbnailSourceType.Photo, false); } diff --git a/src/common/config/private/IPrivateConfig.ts b/src/common/config/private/IPrivateConfig.ts index d4da08d1..22a09618 100644 --- a/src/common/config/private/IPrivateConfig.ts +++ b/src/common/config/private/IPrivateConfig.ts @@ -15,9 +15,9 @@ export module ServerConfig { } export enum ThumbnailProcessingLib { + sharp = 3, Jimp = 1, gm = 2, - sharp = 3 } export interface MySQLConfig { @@ -98,8 +98,7 @@ export module ServerConfig { export interface PhotoConfig { - converting: { - enabled: boolean; + Converting: { onTheFly: boolean; resolution: resolutionType }; diff --git a/src/common/config/private/PrivateConfigDefaultsClass.ts b/src/common/config/private/PrivateConfigDefaultsClass.ts index 2b122f71..080888f2 100644 --- a/src/common/config/private/PrivateConfigDefaultsClass.ts +++ b/src/common/config/private/PrivateConfigDefaultsClass.ts @@ -20,8 +20,7 @@ export class PrivateConfigDefaultsClass extends PublicConfigClass implements IPr personFaceMargin: 0.6 }, Photo: { - converting: { - enabled: true, + Converting: { onTheFly: true, resolution: 1080 } diff --git a/src/common/config/public/ConfigClass.ts b/src/common/config/public/ConfigClass.ts index eee35187..02047374 100644 --- a/src/common/config/public/ConfigClass.ts +++ b/src/common/config/public/ConfigClass.ts @@ -68,9 +68,16 @@ export module ClientConfig { enabled: boolean; } + export interface PhotoConfig { + Converting: { + enabled: boolean; + }; + } + export interface MediaConfig { Thumbnail: ThumbnailConfig; Video: VideoConfig; + Photo: PhotoConfig; } export interface MetaFileConfig { @@ -115,6 +122,11 @@ export class PublicConfigClass { Video: { enabled: true }, + Photo: { + Converting: { + enabled: true + } + }, Thumbnail: { concurrentThumbnailGenerations: 1, thumbnailSizes: [160, 240, 480], diff --git a/src/common/entities/settings/BasicConfigDTO.ts b/src/common/entities/settings/BasicConfigDTO.ts index 395cda5e..47ed3da8 100644 --- a/src/common/entities/settings/BasicConfigDTO.ts +++ b/src/common/entities/settings/BasicConfigDTO.ts @@ -1,5 +1,6 @@ export interface BasicConfigDTO { imagesFolder: string; + tempFolder: string; publicUrl: string; urlBase: string; applicationTitle: string; diff --git a/src/frontend/app/app.routing.ts b/src/frontend/app/app.routing.ts index af600099..ea6d3b1a 100644 --- a/src/frontend/app/app.routing.ts +++ b/src/frontend/app/app.routing.ts @@ -68,5 +68,7 @@ const ROUTES: Routes = [ {path: '**', redirectTo: '/login', pathMatch: 'full'} ]; -export const appRoutes: ModuleWithProviders = RouterModule.forRoot(ROUTES); +export const appRoutes: ModuleWithProviders = RouterModule.forRoot(ROUTES, { + anchorScrolling: 'enabled' +}); diff --git a/src/frontend/app/ui/admin/admin.component.css b/src/frontend/app/ui/admin/admin.component.css index 5e46844c..6858d283 100644 --- a/src/frontend/app/ui/admin/admin.component.css +++ b/src/frontend/app/ui/admin/admin.component.css @@ -1,7 +1,11 @@ -.version{ +.version { color: #6c757d; } -.version:hover{ +.version:hover { text-decoration: underline; } + +*:focus { + outline: none; +} diff --git a/src/frontend/app/ui/admin/admin.component.html b/src/frontend/app/ui/admin/admin.component.html index 7adf03de..afb3aa75 100644 --- a/src/frontend/app/ui/admin/admin.component.html +++ b/src/frontend/app/ui/admin/admin.component.html @@ -1,5 +1,5 @@ -
+
@@ -23,8 +23,7 @@ - - - - - - - - - - - - - - + +
+
+ +
+
+ + + + + + + + + + + + + + +
+
diff --git a/src/frontend/app/ui/admin/admin.component.ts b/src/frontend/app/ui/admin/admin.component.ts index 8de25c5e..955952f7 100644 --- a/src/frontend/app/ui/admin/admin.component.ts +++ b/src/frontend/app/ui/admin/admin.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {AfterViewInit, Component, ElementRef, OnInit, QueryList, ViewChildren} from '@angular/core'; import {AuthenticationService} from '../../model/network/authentication.service'; import {UserRoles} from '../../../../common/entities/UserDTO'; import {NotificationService} from '../../model/notification.service'; @@ -6,20 +6,24 @@ import {NotificationType} from '../../../../common/entities/NotificationDTO'; import {NavigationService} from '../../model/navigation.service'; import {I18n} from '@ngx-translate/i18n-polyfill'; import {Config} from '../../../../common/config/public/Config'; +import {ISettingsComponent} from '../settings/_abstract/ISettingsComponent'; +import {PageHelper} from '../../model/page.helper'; @Component({ selector: 'app-admin', templateUrl: './admin.component.html', styleUrls: ['./admin.component.css'] }) -export class AdminComponent implements OnInit { - +export class AdminComponent implements OnInit, AfterViewInit { simplifiedMode = true; text = { Advanced: 'Advanced', Simplified: 'Simplified' }; appVersion = Config.Client.appVersion; + @ViewChildren('setting') settingsComponents: QueryList; + @ViewChildren('setting', {read: ElementRef}) settingsComponents2: QueryList; + contents: ISettingsComponent[] = []; constructor(private _authService: AuthenticationService, private _navigation: NavigationService, @@ -29,6 +33,15 @@ export class AdminComponent implements OnInit { this.text.Simplified = i18n('Simplified'); } + ngAfterViewInit(): void { + setTimeout(() => this.contents = this.settingsComponents.toArray(), 0); + } + + scrollTo(i: number) { + PageHelper.ScrollY = this.settingsComponents2.toArray()[i].nativeElement.getBoundingClientRect().top + + PageHelper.ScrollY; + } + ngOnInit() { if (!this._authService.isAuthenticated() || this._authService.user.value.role < UserRoles.Admin) { @@ -37,6 +50,7 @@ export class AdminComponent implements OnInit { } } + public getCss(type: NotificationType) { switch (type) { case NotificationType.error: diff --git a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.html b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.html index b7f7c790..7ef14428 100644 --- a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.html +++ b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.html @@ -5,11 +5,11 @@ [style.transform]="ImageTransform" [src]="thumbnailSrc"/> - diff --git a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts index 3920b6a2..f525ca63 100644 --- a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts +++ b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts @@ -4,6 +4,7 @@ import {FixOrientationPipe} from '../../../../pipes/FixOrientationPipe'; import {MediaDTO} from '../../../../../../common/entities/MediaDTO'; import {DomSanitizer, SafeStyle} from '@angular/platform-browser'; import {SupportedFormats} from '../../../../../../common/SupportedFormats'; +import {Config} from '../../../../../../common/config/public/Config'; @Component({ selector: 'app-gallery-lightbox-media', @@ -26,8 +27,10 @@ export class GalleryLightboxMediaComponent implements OnChanges { public imageSize = {width: 'auto', height: '100'}; public imageLoadFinished = false; thumbnailSrc: string = null; - photoSrc: string = null; - isPhotoSrcBestFit = true; + photo = { + src: null, + isBestFit: false + }; public transcodeNeedVideos = SupportedFormats.TranscodeNeed.Videos; private mediaLoaded = false; private videoProgress = 0; @@ -98,10 +101,11 @@ export class GalleryLightboxMediaComponent implements OnChanges { } ngOnChanges() { + // media changed if (this.prevGirdPhoto !== this.gridMedia) { this.prevGirdPhoto = this.gridMedia; this.thumbnailSrc = null; - this.photoSrc = null; + this.photo.src = null; this.mediaLoaded = false; this.imageLoadFinished = false; this.setImageSize(); @@ -111,24 +115,7 @@ export class GalleryLightboxMediaComponent implements OnChanges { .then((src) => this.thumbnailSrc = src); } - if (this.zoom === 1) { - if (this.photoSrc == null && this.gridMedia && this.loadMedia) { - FixOrientationPipe.transform(this.gridMedia.getBestFitMediaPath(), this.gridMedia.Orientation) - .then((src) => { - this.photoSrc = src; - this.isPhotoSrcBestFit = true; - }); - } - // on zoom load high res photo - } else if ((this.isPhotoSrcBestFit === true || - this.photoSrc == null) && this.gridMedia && this.loadMedia) { - FixOrientationPipe.transform(this.gridMedia.getMediaPath(), this.gridMedia.Orientation) - .then((src) => { - this.photoSrc = src; - this.isPhotoSrcBestFit = false; - }); - } - + this.loadPhoto().catch(console.error); } @@ -174,6 +161,28 @@ export class GalleryLightboxMediaComponent implements OnChanges { this.videoSourceError.emit(); } + private async loadPhoto() { + if (!this.gridMedia || !this.loadMedia || !this.gridMedia.isPhoto()) { + return; + } + + if (this.zoom === 1) { + if (this.photo.src == null) { + if (Config.Client.Media.Photo.Converting.enabled === true) { + this.photo.src = await FixOrientationPipe.transform(this.gridMedia.getBestFitMediaPath(), this.gridMedia.Orientation); + this.photo.isBestFit = true; + } else { + this.photo.src = await FixOrientationPipe.transform(this.gridMedia.getMediaPath(), this.gridMedia.Orientation); + this.photo.isBestFit = false; + } + } + // on zoom load high res photo + } else if ((this.photo.isBestFit === true || this.photo.src == null)) { + this.photo.src = await FixOrientationPipe.transform(this.gridMedia.getMediaPath(), this.gridMedia.Orientation); + this.photo.isBestFit = false; + } + } + /** Video **/ private onVideoProgress() { this.videoProgress = (100 / this.video.nativeElement.duration) * this.video.nativeElement.currentTime; diff --git a/src/frontend/app/ui/settings/_abstract/ISettingsComponent.ts b/src/frontend/app/ui/settings/_abstract/ISettingsComponent.ts new file mode 100644 index 00000000..fc9810f5 --- /dev/null +++ b/src/frontend/app/ui/settings/_abstract/ISettingsComponent.ts @@ -0,0 +1,5 @@ +export interface ISettingsComponent { + + hasAvailableSettings: boolean; + Name: string; +} diff --git a/src/frontend/app/ui/settings/_abstract/abstract.settings.component.ts b/src/frontend/app/ui/settings/_abstract/abstract.settings.component.ts index 36c36f7c..5aabe497 100644 --- a/src/frontend/app/ui/settings/_abstract/abstract.settings.component.ts +++ b/src/frontend/app/ui/settings/_abstract/abstract.settings.component.ts @@ -9,10 +9,11 @@ import {AbstractSettingsService} from './abstract.settings.service'; import {IPrivateConfig} from '../../../../../common/config/private/IPrivateConfig'; import {I18n} from '@ngx-translate/i18n-polyfill'; import {Subscription} from 'rxjs'; +import {ISettingsComponent} from './ISettingsComponent'; export abstract class SettingsComponent = AbstractSettingsService> - implements OnInit, OnDestroy, OnChanges { + implements OnInit, OnDestroy, OnChanges, ISettingsComponent { @Input() public simplifiedMode = true; @@ -54,6 +55,11 @@ export abstract class SettingsComponent { this.settings = Utils.clone(this.sliceFN(s)); this.original = Utils.clone(this.settings); @@ -137,7 +143,7 @@ export abstract class SettingsComponent
- Basic settings* + {{Name}}*
@@ -53,6 +53,17 @@
+
+ +
+ + Thumbnails, coverted photos, videos will be stored here (write permission required) +
+
+
diff --git a/src/frontend/app/ui/settings/basic/basic.settings.component.ts b/src/frontend/app/ui/settings/basic/basic.settings.component.ts index 4477f945..0cf2ad9b 100644 --- a/src/frontend/app/ui/settings/basic/basic.settings.component.ts +++ b/src/frontend/app/ui/settings/basic/basic.settings.component.ts @@ -29,6 +29,7 @@ export class BasicSettingsComponent extends SettingsComponent { port: s.Server.port, host: s.Server.host, imagesFolder: s.Server.Media.folder, + tempFolder: s.Server.Media.tempFolder, applicationTitle: s.Client.applicationTitle, publicUrl: s.Client.publicUrl, urlBase: s.Client.urlBase diff --git a/src/frontend/app/ui/settings/database/database.settings.component.html b/src/frontend/app/ui/settings/database/database.settings.component.html index c3fe65fc..95e68937 100644 --- a/src/frontend/app/ui/settings/database/database.settings.component.html +++ b/src/frontend/app/ui/settings/database/database.settings.component.html @@ -1,44 +1,85 @@ -
-
- Database settings* -
-
- -
-

Type:

- - Install manually mysql node module to use mysql (npm install mysql) - + +
+
+ {{Name}} + * +
+
+ + + +
+ +
+ + Install manually mysql node module to use mysql (npm install mysql) + +
+
-

MySQL settings:

- - - - + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
-

SQLite settings:

- +
+ +
+ +
+
+
+ +
+ +
+ +
+
- - - + + +
-
+ diff --git a/src/frontend/app/ui/settings/database/database.settings.component.ts b/src/frontend/app/ui/settings/database/database.settings.component.ts index 72568fdd..644ee9ed 100644 --- a/src/frontend/app/ui/settings/database/database.settings.component.ts +++ b/src/frontend/app/ui/settings/database/database.settings.component.ts @@ -17,8 +17,8 @@ import {ServerConfig} from '../../../../../common/config/private/IPrivateConfig' }) export class DatabaseSettingsComponent extends SettingsComponent implements OnInit { - public types: { key: number, value: string }[] = []; - public DatabaseType: any; + public types = Utils.enumToArray(ServerConfig.DatabaseType); + public DatabaseType = ServerConfig.DatabaseType; constructor(_authService: AuthenticationService, _navigation: NavigationService, @@ -30,8 +30,6 @@ export class DatabaseSettingsComponent extends SettingsComponent
- Faces settings* + {{Name}}*
- Folder indexing - * + {{Name}}*
diff --git a/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts b/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts index 03a249a5..c11ece5d 100644 --- a/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts +++ b/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts @@ -33,7 +33,7 @@ export class IndexingSettingsComponent extends SettingsComponent_settingsService, diff --git a/src/frontend/app/ui/settings/map/map.settings.component.html b/src/frontend/app/ui/settings/map/map.settings.component.html index 7aefefc7..23dfd7fa 100644 --- a/src/frontend/app/ui/settings/map/map.settings.component.html +++ b/src/frontend/app/ui/settings/map/map.settings.component.html @@ -1,7 +1,6 @@
-
- Map settings* +
{{Name}}*
- Meta file settings* + {{Name}}*
- Other settings* + {{Name}}*
diff --git a/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.html b/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.html index 272fb4c7..76aef246 100644 --- a/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.html +++ b/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.html @@ -2,7 +2,7 @@
- Random Photo settings* + {{Name}}*
This feature enables you to generate 'random photo' urls. That URL returns a photo random selected from your gallery. - You can use the url with 3rd party like random changing desktop background. + You can use the url with 3rd party application like random changing desktop background.
diff --git a/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.ts b/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.ts index e9a4cc89..72ad8c7e 100644 --- a/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.ts +++ b/src/frontend/app/ui/settings/random-photo/random-photo.settings.component.ts @@ -21,7 +21,7 @@ export class RandomPhotoSettingsComponent extends SettingsComponent s.Client.RandomPhoto); + super(i18n('Random Photo'), _authService, _navigation, _settingsService, notification, i18n, s => s.Client.RandomPhoto); } diff --git a/src/frontend/app/ui/settings/search/search.settings.component.html b/src/frontend/app/ui/settings/search/search.settings.component.html index 2a095064..8f4c9e73 100644 --- a/src/frontend/app/ui/settings/search/search.settings.component.html +++ b/src/frontend/app/ui/settings/search/search.settings.component.html @@ -2,7 +2,7 @@
- Search settings* + {{Name}}*
- Share settings* + {{Name}}*
- Tasks - * + {{Name}}*
diff --git a/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.html b/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.html index f512fb92..83e26aa6 100644 --- a/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.html +++ b/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.html @@ -1,7 +1,7 @@
- Thumbnail settings* + {{Name}}*
@@ -34,18 +34,6 @@
- - - - - - - - - - - -
@@ -84,15 +72,14 @@
- Size of the thumbnails.
- The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.)
- ';' separated integers. If size is 200, that thumbnail will have 200^2 pixels. + The best matching size will be generated. (More sizes give better quality, but use more storage and CPU to render.)
+ ';' separated integers. If size is 160, that shorter side of the thumbnail will have 160 pixels.
diff --git a/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.ts b/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.ts index e2a548fe..3e649b87 100644 --- a/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.ts +++ b/src/frontend/app/ui/settings/thumbnail/thumbnail.settings.component.ts @@ -51,9 +51,8 @@ export class ThumbnailSettingsComponent .enumToArray(ServerConfig.ThumbnailProcessingLib).map((v) => { if (v.value.toLowerCase() === 'sharp') { v.value += ' ' + this.i18n('(recommended)'); - } - if (v.value.toLowerCase() === 'gm') { - v.value += ' ' + this.i18n('(deprecated)'); + } else { + v.value += ' ' + this.i18n('(deprecated, will be removed)'); } return v; }); diff --git a/src/frontend/app/ui/settings/usermanager/usermanager.settings.component.html b/src/frontend/app/ui/settings/usermanager/usermanager.settings.component.html index ae444395..f7559ec6 100644 --- a/src/frontend/app/ui/settings/usermanager/usermanager.settings.component.html +++ b/src/frontend/app/ui/settings/usermanager/usermanager.settings.component.html @@ -1,6 +1,6 @@
- Password protection + {{Name}}
{}; public userRoles: Array = []; @@ -24,6 +25,8 @@ export class UserMangerSettingsComponent implements OnInit { public enabled = true; public error: string = null; public inProgress = false; + Name: string; + hasAvailableSettings = true; text = { @@ -39,6 +42,7 @@ export class UserMangerSettingsComponent implements OnInit { private _userSettings: UserManagerSettingsService, private notification: NotificationService, public i18n: I18n) { + this.Name = i18n('Password protection'); this.text.Enabled = i18n('Enabled'); this.text.Disabled = i18n('Disabled'); this.text.Low = i18n('Low'); @@ -48,15 +52,15 @@ export class UserMangerSettingsComponent implements OnInit { ngOnInit() { if (!this._authService.isAuthenticated() || - this._authService.user.value.role < UserRoles.Admin) { + this._authService.user.value.role < UserRoles.Admin) { this._navigation.toLogin(); return; } this.userRoles = Utils - .enumToArray(UserRoles) - .filter(r => r.key !== UserRoles.LimitedGuest) - .filter(r => r.key <= this._authService.user.value.role) - .sort((a, b) => a.key - b.key); + .enumToArray(UserRoles) + .filter(r => r.key !== UserRoles.LimitedGuest) + .filter(r => r.key <= this._authService.user.value.role) + .sort((a, b) => a.key - b.key); this.getSettings(); this.getUsersList(); diff --git a/src/frontend/app/ui/settings/video/video.settings.component.html b/src/frontend/app/ui/settings/video/video.settings.component.html index f5880376..af21f695 100644 --- a/src/frontend/app/ui/settings/video/video.settings.component.html +++ b/src/frontend/app/ui/settings/video/video.settings.component.html @@ -1,8 +1,7 @@
- Video settings - * + {{Name}}*