diff options
author | silverwind <me@silverwind.io> | 2021-04-09 18:51:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 00:51:27 +0800 |
commit | afa781bf20e365dc3f524b2555767ca34fe37f7e (patch) | |
tree | fd6e250f5750368733a932acaabbf059998c121d /web_src/js/index.js | |
parent | 3dc099773d6d9ebb747db18f0b69fdd09e8b018d (diff) | |
download | gitea-afa781bf20e365dc3f524b2555767ca34fe37f7e.tar.gz gitea-afa781bf20e365dc3f524b2555767ca34fe37f7e.zip |
Dropzone styling improvements (#15291)
* Dropzone styling improvements
- Move all dropzone styles to separate file
- Fix white background in arc-green
- Fix rendering of non-square images and previews
* increase thumbnail quality, set contain in js, replace blur effect with opacity
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r-- | web_src/js/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index d5fe53eef3..a191af6df1 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -999,6 +999,9 @@ async function initRepository() { dictFileTooBig: $dropzone.data('file-too-big'), dictRemoveFile: $dropzone.data('remove-file'), timeout: 0, + thumbnailMethod: 'contain', + thumbnailWidth: 480, + thumbnailHeight: 480, init() { this.on('success', (file, data) => { filenameDict[file.name] = { @@ -2624,6 +2627,9 @@ $(document).ready(async () => { dictFileTooBig: $dropzone.data('file-too-big'), dictRemoveFile: $dropzone.data('remove-file'), timeout: 0, + thumbnailMethod: 'contain', + thumbnailWidth: 480, + thumbnailHeight: 480, init() { this.on('success', (file, data) => { filenameDict[file.name] = data.uuid; |