1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
silverwind 2021-04-09 18:51:27 +02:00 committed by GitHub
parent 3dc099773d
commit afa781bf20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 37 deletions

View file

@ -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;