Skip to content

Commit ef7898c

Browse files
committed
increase thumbnail quality, set contain in js, replace blur effect with opacity
1 parent ef60455 commit ef7898c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

web_src/js/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,9 @@ async function initRepository() {
999999
dictFileTooBig: $dropzone.data('file-too-big'),
10001000
dictRemoveFile: $dropzone.data('remove-file'),
10011001
timeout: 0,
1002+
thumbnailMethod: 'contain',
1003+
thumbnailWidth: 480,
1004+
thumbnailHeight: 480,
10021005
init() {
10031006
this.on('success', (file, data) => {
10041007
filenameDict[file.name] = {
@@ -2624,6 +2627,9 @@ $(document).ready(async () => {
26242627
dictFileTooBig: $dropzone.data('file-too-big'),
26252628
dictRemoveFile: $dropzone.data('remove-file'),
26262629
timeout: 0,
2630+
thumbnailMethod: 'contain',
2631+
thumbnailWidth: 480,
2632+
thumbnailHeight: 480,
26272633
init() {
26282634
this.on('success', (file, data) => {
26292635
filenameDict[file.name] = data.uuid;

web_src/less/features/dropzone.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@
4343
object-fit: contain !important;
4444
margin-bottom: 0 !important;
4545
}
46+
47+
.dropzone .dz-preview:hover .dz-image img {
48+
filter: opacity(.5) !important;
49+
}

0 commit comments

Comments
 (0)