making map icon thumbnails switchable
This commit is contained in:
parent
503f96a9b3
commit
8e5be78464
@ -38,6 +38,7 @@ export module ClientConfig {
|
|||||||
|
|
||||||
export interface MapConfig {
|
export interface MapConfig {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
useImageMarkers: boolean;
|
||||||
mapProvider: MapProviders;
|
mapProvider: MapProviders;
|
||||||
mapboxAccessToken: string;
|
mapboxAccessToken: string;
|
||||||
customLayers: MapLayers[];
|
customLayers: MapLayers[];
|
||||||
@ -128,6 +129,7 @@ export class PublicConfigClass {
|
|||||||
},
|
},
|
||||||
Map: {
|
Map: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
useImageMarkers: true,
|
||||||
mapProvider: ClientConfig.MapProviders.OpenStreetMap,
|
mapProvider: ClientConfig.MapProviders.OpenStreetMap,
|
||||||
mapboxAccessToken: '',
|
mapboxAccessToken: '',
|
||||||
customLayers: [{name: 'street', url: ''}]
|
customLayers: [{name: 'street', url: ''}]
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import {AfterViewInit, Component, ElementRef, HostListener, Input, OnChanges, OnInit, ViewChild} from '@angular/core';
|
import {AfterViewInit, Component, ElementRef, HostListener, Input, OnChanges, ViewChild} from '@angular/core';
|
||||||
import {PhotoDTO} from '../../../../../../common/entities/PhotoDTO';
|
import {PhotoDTO} from '../../../../../../common/entities/PhotoDTO';
|
||||||
import {Dimension} from '../../../../model/IRenderable';
|
import {Dimension} from '../../../../model/IRenderable';
|
||||||
import {FullScreenService} from '../../fullscreen.service';
|
import {FullScreenService} from '../../fullscreen.service';
|
||||||
@ -163,6 +163,7 @@ export class GalleryMapLightboxComponent implements OnChanges, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
if (Config.Client.Map.useImageMarkers === true) {
|
||||||
if (iconTh.Available === true) {
|
if (iconTh.Available === true) {
|
||||||
FixOrientationPipe.transform(iconTh.Src, p.metadata.orientation).then((icon) => {
|
FixOrientationPipe.transform(iconTh.Src, p.metadata.orientation).then((icon) => {
|
||||||
obj.iconUrl = icon;
|
obj.iconUrl = icon;
|
||||||
@ -174,6 +175,7 @@ export class GalleryMapLightboxComponent implements OnChanges, AfterViewInit {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return obj;
|
return obj;
|
||||||
});
|
});
|
||||||
if (this.gpxFiles) {
|
if (this.gpxFiles) {
|
||||||
|
|||||||
@ -19,6 +19,28 @@
|
|||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
||||||
|
<ng-container *ngIf="settings.enabled">
|
||||||
|
|
||||||
|
<div class="form-group row" [hidden]="simplifiedMode">
|
||||||
|
<label class="col-md-2 control-label" for="enableOnScrollRendering" i18n>Use image markers</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<bSwitch
|
||||||
|
id="enableOnScrollRendering"
|
||||||
|
class="switch"
|
||||||
|
name="enableOnScrollRendering"
|
||||||
|
[switch-on-color]="'primary'"
|
||||||
|
[switch-inverse]="true"
|
||||||
|
[switch-off-text]="text.Disabled"
|
||||||
|
[switch-on-text]="text.Enabled"
|
||||||
|
[switch-handle-width]="100"
|
||||||
|
[switch-label-width]="20"
|
||||||
|
[(ngModel)]="settings.useImageMarkers">
|
||||||
|
</bSwitch>
|
||||||
|
<small class="form-text text-muted" i18n>Map will use thumbnail images as markers instead of the default
|
||||||
|
pin.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -86,7 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
<button class="btn btn-success float-right"
|
<button class="btn btn-success float-right"
|
||||||
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
||||||
(click)="save()" i18n>Save
|
(click)="save()" i18n>Save
|
||||||
|
|||||||
@ -7,12 +7,12 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'success'"
|
[switch-on-color]="'success'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-disabled]="inProgress"
|
[switch-disabled]="inProgress"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.enabled">
|
[(ngModel)]="settings.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,11 +16,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enable"
|
name="enable"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Server.enable">
|
[(ngModel)]="settings.Server.enable">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Runs directory scanning and thumbnail generation (only for Jimp) in a
|
<small class="form-text text-muted" i18n>Runs directory scanning and thumbnail generation (only for Jimp) in a
|
||||||
@ -52,11 +52,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enableOnScrollThumbnailPrioritising"
|
name="enableOnScrollThumbnailPrioritising"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Client.enableOnScrollThumbnailPrioritising">
|
[(ngModel)]="settings.Client.enableOnScrollThumbnailPrioritising">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Those thumbnails get higher priority that are visible on the screen
|
<small class="form-text text-muted" i18n>Those thumbnails get higher priority that are visible on the screen
|
||||||
@ -72,11 +72,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enableOnScrollRendering"
|
name="enableOnScrollRendering"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Client.enableOnScrollRendering">
|
[(ngModel)]="settings.Client.enableOnScrollRendering">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Shows only the required amount of photos at once. Renders more if
|
<small class="form-text text-muted" i18n>Shows only the required amount of photos at once. Renders more if
|
||||||
@ -94,11 +94,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enableCache"
|
name="enableCache"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Client.enableCache">
|
[(ngModel)]="settings.Client.enableCache">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Caches directory contents and search results for better performance
|
<small class="form-text text-muted" i18n>Caches directory contents and search results for better performance
|
||||||
@ -115,11 +115,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="captionFirstNaming"
|
name="captionFirstNaming"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Client.captionFirstNaming">
|
[(ngModel)]="settings.Client.captionFirstNaming">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Show the caption (IPTC 120) tags from the EXIF data instead of the filenames.
|
<small class="form-text text-muted" i18n>Show the caption (IPTC 120) tags from the EXIF data instead of the filenames.
|
||||||
@ -137,11 +137,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="showItemCount"
|
name="showItemCount"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.Client.NavBar.showItemCount">
|
[(ngModel)]="settings.Client.NavBar.showItemCount">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Show the number of items (photos) in the folder
|
<small class="form-text text-muted" i18n>Show the number of items (photos) in the folder
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'success'"
|
[switch-on-color]="'success'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.enabled">
|
[(ngModel)]="settings.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'success'"
|
[switch-on-color]="'success'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.enabled">
|
[(ngModel)]="settings.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
@ -32,11 +32,11 @@
|
|||||||
name="autocompleteEnabled"
|
name="autocompleteEnabled"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-disabled]="!settings.enabled"
|
[switch-disabled]="!settings.enabled"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.AutoComplete.enabled">
|
[(ngModel)]="settings.AutoComplete.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Show hints while typing search query</small>
|
<small class="form-text text-muted" i18n>Show hints while typing search query</small>
|
||||||
@ -53,11 +53,11 @@
|
|||||||
name="instantSearchEnabled"
|
name="instantSearchEnabled"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-disabled]="!settings.enabled"
|
[switch-disabled]="!settings.enabled"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.instantSearchEnabled">
|
[(ngModel)]="settings.instantSearchEnabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Enables showing search results, while typing search query</small>
|
<small class="form-text text-muted" i18n>Enables showing search results, while typing search query</small>
|
||||||
|
|||||||
@ -44,6 +44,7 @@ export class SettingsService {
|
|||||||
},
|
},
|
||||||
Map: {
|
Map: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
useImageMarkers: true,
|
||||||
mapProvider: ClientConfig.MapProviders.OpenStreetMap,
|
mapProvider: ClientConfig.MapProviders.OpenStreetMap,
|
||||||
mapboxAccessToken: '',
|
mapboxAccessToken: '',
|
||||||
customLayers: [{name: 'street', url: ''}]
|
customLayers: [{name: 'street', url: ''}]
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'success'"
|
[switch-on-color]="'success'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.enabled">
|
[(ngModel)]="settings.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
@ -31,11 +31,11 @@
|
|||||||
name="passwordProtected"
|
name="passwordProtected"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-disabled]="!settings.enabled"
|
[switch-disabled]="!settings.enabled"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.passwordProtected">
|
[(ngModel)]="settings.passwordProtected">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>Enables password protected sharing links</small>
|
<small class="form-text text-muted" i18n>Enables password protected sharing links</small>
|
||||||
|
|||||||
@ -54,11 +54,11 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Low"
|
[switch-off-text]="text.Low"
|
||||||
[switch-on-text]="text.High"
|
[switch-on-text]="text.High"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.server.qualityPriority">
|
[(ngModel)]="settings.server.qualityPriority">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
<small class="form-text text-muted" i18n>High quality may be slow. Especially with Jimp.</small>
|
<small class="form-text text-muted" i18n>High quality may be slow. Especially with Jimp.</small>
|
||||||
|
|||||||
@ -7,12 +7,12 @@
|
|||||||
class="switch"
|
class="switch"
|
||||||
name="enabled"
|
name="enabled"
|
||||||
[switch-on-color]="'success'"
|
[switch-on-color]="'success'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Disabled"
|
[switch-off-text]="text.Disabled"
|
||||||
[switch-on-text]="text.Enabled"
|
[switch-on-text]="text.Enabled"
|
||||||
[switch-disabled]="inProgress"
|
[switch-disabled]="inProgress"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="settings.enabled">
|
[(ngModel)]="settings.enabled">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user