mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Adding switch to disable full resolution image load on zoom #259
This commit is contained in:
parent
4af6c16aef
commit
7e7af8d714
@ -123,6 +123,8 @@ export class PhotoConvertingConfig {
|
||||
export class ClientPhotoConfig {
|
||||
@ConfigProperty()
|
||||
Converting: PhotoConvertingConfig = new PhotoConvertingConfig();
|
||||
@ConfigProperty({description: 'Enables loading the full resolution image on zoom in the ligthbox (preview).'})
|
||||
loadFullImageOnZoom: boolean = true;
|
||||
}
|
||||
|
||||
@SubConfigClass()
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild} from '@angular/core';
|
||||
import {GridMedia} from '../../grid/GridMedia';
|
||||
import {MediaDTO, MediaDTOUtils} from '../../../../../../common/entities/MediaDTO';
|
||||
import {MediaDTOUtils} from '../../../../../../common/entities/MediaDTO';
|
||||
import {DomSanitizer, SafeStyle} from '@angular/platform-browser';
|
||||
import {SupportedFormats} from '../../../../../../common/SupportedFormats';
|
||||
import {Config} from '../../../../../../common/config/public/Config';
|
||||
@ -164,7 +164,8 @@ export class GalleryLightboxMediaComponent implements OnChanges {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.zoom === 1) {
|
||||
if (this.zoom === 1 ||
|
||||
Config.Client.Media.Photo.loadFullImageOnZoom === false) {
|
||||
if (this.photo.src == null) {
|
||||
if (Config.Client.Media.Photo.Converting.enabled === true) {
|
||||
this.photo.src = this.gridMedia.getBestFitMediaPath();
|
||||
|
@ -33,6 +33,15 @@
|
||||
required="true">
|
||||
</app-settings-entry>
|
||||
|
||||
<app-settings-entry
|
||||
name="Load full resolution image on zoom"
|
||||
description="Enables loading the full resolution image on zoom in the ligthbox (preview)."
|
||||
i18n-description i18n-name
|
||||
[ngModel]="states.client.loadFullImageOnZoom"
|
||||
[simplifiedMode]="simplifiedMode"
|
||||
[disabled]="!states.client.Converting.enabled.value">
|
||||
</app-settings-entry>
|
||||
|
||||
|
||||
<button class="btn btn-success float-right"
|
||||
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
||||
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Örökké</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -2736,6 +2736,14 @@
|
||||
<source>Forever</source>
|
||||
<target>Forever</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9104939499698249234" datatype="html">
|
||||
<source>Load full resolution image on zoom</source>
|
||||
<target>Load full resolution image on zoom</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6870206109332559881" datatype="html">
|
||||
<source>Enables loading the full resolution image on zoom in the ligthbox (preview).</source>
|
||||
<target>Enables loading the full resolution image on zoom in the ligthbox (preview).</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
Loading…
x
Reference in New Issue
Block a user