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

Add urlBase to download link

This commit is contained in:
mcdamo 2021-05-03 22:19:07 +10:00
parent 6af288e77a
commit 03fe522b17
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@
</ol>
<div class="right-side">
<a *ngIf="config.Client.Other.enableDownloadZip && directory && ItemCount > 0" [href]="'/api/gallery/zip/' + getDirectoryPath()"
<a *ngIf="config.Client.Other.enableDownloadZip && directory && ItemCount > 0" [href]="getDownloadZipLink()"
[queryParams]="queryService.getParams()">Download</a>
<div class="divider" *ngIf="directory && ItemCount > 0">&nbsp;</div>
<div class="photos-count" *ngIf="ItemCount > 0 && config.Client.Other.NavBar.showItemCount">

View File

@ -93,6 +93,10 @@ export class GalleryNavigatorComponent implements OnChanges {
this.galleryService.setSorting(sorting);
}
getDownloadZipLink(): string {
return Config.Client.urlBase + '/api/gallery/zip/' + this.getDirectoryPath();
}
getDirectoryPath(): string {
return Utils.concatUrls(this.directory.path, this.directory.name);
}