diff --git a/client/css/up1.css b/client/css/up1.css index 594d869..edf26f3 100644 --- a/client/css/up1.css +++ b/client/css/up1.css @@ -136,12 +136,12 @@ max-width: 100%; } -#previewimg img { +#previewimg img, .preview video, .preview audio { display: block; margin: 0 auto; } -#previewimg img:not(.dragged) { +#previewimg img:not(.dragged), .preview audio, .preview video { max-height: 100vh; max-width: 100vw; } @@ -324,11 +324,14 @@ white-space: nowrap; } -audio.preview,video.preview,.downloadexplain,#downloadprogress,#previewimg { +.centertext { + text-align: center; +} + +.centerable { -webkit-transform: translateY(-50%); margin: 0 auto; position: relative; - text-align: center; top: 50%; transform: translateY(-50%); } diff --git a/client/js/download.js b/client/js/download.js index 09a37e8..d8936e6 100644 --- a/client/js/download.js +++ b/client/js/download.js @@ -79,7 +79,7 @@ upload.modules.addmodule({ this._.editpaste.hide() this._.newupload.hide() this._.content = {} - this._.content.main = this._.content.loading = $('

').prop('id', 'downloadprogress').text('Downloading') + this._.content.main = this._.content.loading = $('

').prop('id', 'downloadprogress').addClass('centertext centerable').text('Downloading') this._.detailsarea.empty().append(this._.content.main) this._.deletebtn.hide() upload.updown.download(content, this.progress.bind(this), this.downloaded.bind(this)) @@ -192,7 +192,7 @@ upload.modules.addmodule({ } if (association == 'image' || association == 'svg') { - var imgcontent = $('
').prop('id', 'previewimg').addClass('preview').appendTo(this._.detailsarea) + var imgcontent = $('
').prop('id', 'previewimg').addClass('preview centerable').appendTo(this._.detailsarea) var previewimg = $('').addClass('dragresize').appendTo(imgcontent).prop('src', url) } else if (association == 'text') { @@ -225,11 +225,11 @@ upload.modules.addmodule({ this._.editpaste.show() } else if (association == 'video') { - $('