From 0c2f84058b1c857a593d159c951eb86fe42dfeef Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 22 May 2017 11:16:01 +0200 Subject: [PATCH] Improve css for the file app --- customize.dist/src/less/cryptpad.less | 9 +++++++++ rpc.js | 2 +- www/file/file.css | 17 ++++++++++------- www/file/file.less | 19 +++++++++++-------- www/file/inner.html | 4 +++- www/file/main.js | 9 ++++----- 6 files changed, 38 insertions(+), 22 deletions(-) diff --git a/customize.dist/src/less/cryptpad.less b/customize.dist/src/less/cryptpad.less index 883e62ce4..0ee8785e6 100644 --- a/customize.dist/src/less/cryptpad.less +++ b/customize.dist/src/less/cryptpad.less @@ -43,6 +43,15 @@ a.github-corner > svg { font-size: 1.02em; } +.unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + h1,h2,h3,h4,h5,h6 { color: @fore; diff --git a/rpc.js b/rpc.js index a155c8272..e7d3c1627 100644 --- a/rpc.js +++ b/rpc.js @@ -13,7 +13,7 @@ var RPC = module.exports; var Store = require("./storage/file"); -var DEFAULT_LIMIT = 150 * 1024 * 1024; +var DEFAULT_LIMIT = 50 * 1024 * 1024; var isValidId = function (chan) { return /^[a-fA-F0-9]/.test(chan) || diff --git a/www/file/file.css b/www/file/file.css index 375a356cc..f2fd8e6d5 100644 --- a/www/file/file.css +++ b/www/file/file.css @@ -9,10 +9,9 @@ body { } #file { display: block; - height: 300px; - width: 300px; + height: 100%; + width: 100%; border: 2px solid black; - margin: 50px; } .inputfile { width: 0.1px; @@ -29,18 +28,23 @@ body { width: 50vh; height: 50vh; display: block; - margin: auto; + margin: 50px auto; + max-width: 80vw; } #upload-form label { + line-height: 50vh; + text-align: center; position: relative; + padding: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .hovering { background-color: rgba(255, 0, 115, 0.5) !important; } .block { display: block; - height: 50vh; - width: 50vh; } .hidden { display: none; @@ -48,7 +52,6 @@ body { .inputfile + label { border: 2px solid black; background-color: rgba(50, 50, 50, 0.1); - margin: 50px; display: block; } .inputfile:focus + label, diff --git a/www/file/file.less b/www/file/file.less index b3074e33c..db6942596 100644 --- a/www/file/file.less +++ b/www/file/file.less @@ -11,10 +11,9 @@ html, body { } #file { display: block; - height: 300px; - width: 300px; + height: 100%; + width: 100%; border: 2px solid black; - margin: 50px; } .inputfile { @@ -34,10 +33,17 @@ html, body { width: 50vh; height: 50vh; display: block; - margin: auto; + margin: 50px auto; + max-width: 80vw; } -#upload-form label{ +#upload-form label { + line-height: 50vh; + text-align: center; position: relative; + padding: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .hovering { @@ -46,8 +52,6 @@ html, body { .block { display: block; - height: 50vh; - width: 50vh; } .hidden { display: none; @@ -55,7 +59,6 @@ html, body { .inputfile + label { border: 2px solid black; background-color: rgba(50, 50, 50, .10); - margin: 50px; display: block; } diff --git a/www/file/inner.html b/www/file/inner.html index c6fe5fb32..548ac6a47 100644 --- a/www/file/inner.html +++ b/www/file/inner.html @@ -6,12 +6,14 @@ +
diff --git a/www/file/main.js b/www/file/main.js index ada0b50d2..56b46b1dd 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -181,11 +181,10 @@ define([ $tr.find('.progressValue').text(Messages.upload_cancelled); }); - var $tr2 = $('', {id: id}).appendTo($table); - $('
').text(obj.metadata.name).appendTo($tr2); - $('').text(prettySize(estimate)).appendTo($tr2); - $('', {'class': 'upProgress'}).append($progressBar).append($progressValue).appendTo($tr2); - $('', {'class': 'upCancel'}).append($cancel).appendTo($tr2); + $('').text(obj.metadata.name).appendTo($tr); + $('').text(prettySize(estimate)).appendTo($tr); + $('', {'class': 'upProgress'}).append($progressBar).append($progressValue).appendTo($tr); + $('', {'class': 'upCancel'}).append($cancel).appendTo($tr); queue.next(); };