Skip to content

Commit

Permalink
fixing directory preview image
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatrik committed Dec 10, 2018
1 parent c98429a commit 25d145b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -20,3 +22,4 @@ users.db
sqlite.db
dist/
release/
out-tsc/
2 changes: 0 additions & 2 deletions backend/middlewares/user/AuthenticationMWs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ export class AuthenticationMWs {
return null;
}

console.log(sharing);

if (Config.Client.Sharing.passwordProtected === true && (sharing.password)) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
7 changes: 5 additions & 2 deletions frontend/app/gallery/directory/directory.gallery.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 25d145b

Please sign in to comment.