Commit 10186bf4 authored by Matija Obreza's avatar Matija Obreza

Merge branch 'better-thumbnails' into 'master'

Better thumbnails

See merge request genesys-pgr/genesys-ui!330
parents d7f44f80 8e792c24
......@@ -4482,11 +4482,6 @@
"estraverse": "^4.1.1"
}
},
"esprima": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
},
"esrecurse": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
......@@ -5710,9 +5705,9 @@
}
},
"fstream": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
......@@ -6494,23 +6489,14 @@
}
},
"i18next-sync-fs-backend": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/i18next-sync-fs-backend/-/i18next-sync-fs-backend-1.1.0.tgz",
"integrity": "sha512-Lj2QE06GB77hNtkG60vJ5mRQWDKTIaCnVkQYfp9j9NHbvICpKlidtrR6fewVSWHQLxxfjFzNniI7vVB7b5LpUw==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/i18next-sync-fs-backend/-/i18next-sync-fs-backend-1.1.1.tgz",
"integrity": "sha512-IoJCGid/NLqPFp+2qsumwOy1hG6jENKSIW9BozHL/3ZsjunH0P7iZLRMADljIuFntKlA63suPIPJWGR2SkxLIg==",
"requires": {
"js-yaml": "3.5.4",
"js-yaml": "3.13.1",
"json5": "0.5.0"
},
"dependencies": {
"js-yaml": {
"version": "3.5.4",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.4.tgz",
"integrity": "sha1-9k8W3NeL65zoNhBo5zPr5HsHkXk=",
"requires": {
"argparse": "^1.0.2",
"esprima": "^2.6.0"
}
},
"json5": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.0.tgz",
......@@ -7183,7 +7169,6 @@
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
......@@ -7192,8 +7177,7 @@
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
}
}
},
......@@ -16415,13 +16399,13 @@
"dev": true
},
"tar": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"dev": true,
"requires": {
"block-stream": "*",
"fstream": "^1.0.2",
"fstream": "^1.0.12",
"inherits": "2"
}
},
......
......@@ -53,8 +53,8 @@ export const repositoryThumbnailUrl = (image: RepositoryImage, width: number, he
}
if (image._permissions && image._permissions.isPublic) {
return getCDNServer(getState, first) + `/_thumbs${image.thumbnailPath}/${width}x${height}.png`;
return getCDNServer(getState, first) + `/_thumbs${image.thumbnailPath}/${width}x${height}.jpg`;
} else {
return `${getState().applicationConfig.apiUrl}/api/v1/repository/download/d/_thumbs${image.thumbnailPath}/${width}x${height}.png`;
return `${getState().applicationConfig.apiUrl}/api/v1/repository/download/d/_thumbs${image.thumbnailPath}/${width}x${height}.jpg`;
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment