1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing directory preview image

This commit is contained in:
Patrik J. Braun 2018-12-10 17:54:24 +01:00
parent c98429a133
commit 25d145b849
4 changed files with 9 additions and 5 deletions

3
.gitignore vendored
View File

@ -12,6 +12,8 @@ common/**/*.js.map
test/coverage
test/backend/**/*.js
test/backend/**/*.js.map
test/common/**/*.js
test/common/**/*.js.map
test/e2e/**/*.js
test/e2e/**/*.js.map
demo/TEMP/
@ -20,3 +22,4 @@ users.db
sqlite.db
dist/
release/
out-tsc/

View File

@ -162,8 +162,6 @@ export class AuthenticationMWs {
return null;
}
console.log(sharing);
if (Config.Client.Sharing.passwordProtected === true && (sharing.password)) {
return null;
}

View File

@ -7,7 +7,7 @@
<div class="photo-container"
[style.width.px]="calcSize()"
[style.height.px]="calcSize()">
<div [class]="'photo ' + (SamplePhoto ? 'photo-orientation-'+SamplePhoto.metadata.orientation : '')"
<div [ngClass]="'photo ' + (SamplePhoto ? 'photo-orientation-'+SamplePhoto.metadata.orientation : '')"
*ngIf="thumbnail && thumbnail.Available"
[style.background-image]="getSanitizedThUrl()"></div>

View File

@ -37,8 +37,11 @@ export class GalleryDirectoryComponent implements OnInit, OnDestroy {
}
getSanitizedThUrl() {
return this._sanitizer.bypassSecurityTrustStyle('url(' + encodeURI(this.thumbnail.Src).replace(/\(/g, '%28')
.replace(/\)/g, '%29') + ')');
return this._sanitizer.bypassSecurityTrustStyle('url(' +
encodeURI(this.thumbnail.Src)
.replace(/\(/g, '%28')
.replace(/'/g, '%27')
.replace(/\)/g, '%29') + ')');
}
// TODO: implement scroll