Skip to content

Commit

Permalink
Merge pull request #1045 from nextcloud/fix/unified-preview-size
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Apr 6, 2022
2 parents 1e19902 + ec05b4e commit 9e43f19
Show file tree
Hide file tree
Showing 14 changed files with 436 additions and 17 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

415 changes: 415 additions & 0 deletions js/photos-src_components_FolderTagPreview_vue.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/photos-src_components_FolderTagPreview_vue.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_patchedRequest_js-src_views_Tags_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_patchedRequest_js-src_views_Tags_vue.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Albums_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_Albums_vue.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/components/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ export default {
isImage() {
return this.item.injected.mime.startsWith('image')
},
decodedEtag() {
return this.item.injected.etag.replace('"', '').replace('"', '')
},
src() {
return generateUrl(`/core/preview?fileId=${this.item.injected.fileid}&x=${256}&y=${256}&a=${!this.croppedLayout}&v=${this.item.injected.etag}`)
return generateUrl(`/core/preview?fileId=${this.item.injected.fileid}&c=${this.decodedEtag}&x=${250}&y=${250}&forceIcon=0&a=${this.croppedLayout ? '0' : '1'}`)
},
},

Expand Down
2 changes: 1 addition & 1 deletion src/components/FolderTagPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
methods: {
generateImgSrc({ fileid, etag }) {
// use etag to force cache reload if file changed
return generateUrl(`/core/preview?fileId=${fileid}&x=${256}&y=${256}&a=true&v=${etag}`)
return generateUrl(`/core/preview?fileId=${fileid}&c=${etag}&x=${250}&y=${250}&forceIcon=0&a=0`)
},
onPreviewFail({ fileid }) {
this.failed.push(fileid)
Expand Down

0 comments on commit 9e43f19

Please sign in to comment.