From b3e225cb3b94ee32c4a9856af3263bbb866c3d8c Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 12 Jul 2017 14:30:28 +0200 Subject: [PATCH] Replace spinner by text and fix mobile UI --- customize.dist/src/less/toolbar.less | 93 +++++++---- customize.dist/translations/messages.fr.js | 1 + customize.dist/translations/messages.js | 1 + www/common/toolbar2.js | 170 ++++----------------- www/drive/file.less | 6 + www/drive/main.js | 2 +- 6 files changed, 104 insertions(+), 169 deletions(-) diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 58fece5a2..85207d245 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -302,8 +302,8 @@ body .cryptpad-toolbar { z-index: 9001; .dropdown-bar { - height: 100%; - display: inline-block; + //height: 100%; + //display: inline-block; button { height: 100%; border-radius: 0; @@ -620,6 +620,32 @@ body .cryptpad-toolbar { } } +.app-slide { + @media screen and (max-width: @media-medium-screen) { + .cryptpad-toolbar-leftside { + flex-flow: row wrap; + width: 175px; + height: auto; + .cryptpad-spinner { order: 0; } + } + .cryptpad-toolbar-rightside { + height: 2*@toolbar-line-height; + } + } + @media screen and (max-width: 320px) { + .cryptpad-toolbar-leftside { + flex-flow: row wrap; + width: 175px; + height: auto; + padding-top: @toolbar-line-height; + .cryptpad-spinner { order: 0; } + } + .cryptpad-toolbar-rightside { + height: auto; + } + } +} + .cryptpad-toolbar-top { display: flex; flex-flow: row; @@ -727,7 +753,6 @@ body .cryptpad-toolbar { &:hover { background-color: rgba(0,0,0,0.3); } - order: 2; text-align: center; font-size: 32px; margin-left: 10px; @@ -785,10 +810,14 @@ body .cryptpad-toolbar { } .cryptpad-user { height: 100%; - display: inline-block; + display: inline-flex; order: 5; line-height: @toolbar-top-height; color: white; + .cryptpad-upgrade { order: 1; } + .cryptpad-new { order: 2; } + .cryptpad-user-dropdown { order: 3; } + .cryptpad-backup { order: 4; } &> * { display: inline-block; height: 100%; @@ -837,6 +866,14 @@ body .cryptpad-toolbar { } } } + p.accountData { + &> span { + font-weight: bold; + span { + font-weight: normal; + } + } + } .cryptpad-backup { margin: 0; border-radius: 0; @@ -848,12 +885,14 @@ body .cryptpad-toolbar { } } .cryptpad-toolbar-leftside { - height: @toolbar-line-height; + //height: @toolbar-line-height; &:empty { height: 0; } float: left; - margin-bottom: -1px; + display: inline-flex; + align-items: center; + //margin-bottom: -1px; .cryptpad-dropdown-users { pre { /* needed for ckeditor */ @@ -869,17 +908,22 @@ body .cryptpad-toolbar { .dropdown-bar-content { margin-top: -1px; } - .limit-container a { - height: 26px; - margin: 3px 0; - line-height: 26px; - padding: 0 5px; - box-sizing: border-box; - border: 1px solid transparent; - font-size: 14px; - &:hover { - text-decoration: none; - } + + & > span { + height: @toolbar-line-height; + } + + #userButtons { order: 1; } + .shareButton { order: 2; } + .cryptpad-spinner { order: 3; } + + #userButtons button { + width: 125px; + text-align: center; + } + .shareButton button { + width: 50px; + text-align: center; } } .cryptpad-toolbar-rightside { @@ -986,11 +1030,12 @@ body .cryptpad-toolbar { } } .cryptpad-spinner { - line-height: @toolbar-top-height; + line-height: @toolbar-line-height; + padding: 0 20px; &> span.fa { height: 20px; width: 20px; - margin: 8px; + //margin: 8px; line-height: 20px; font-size: 20px; text-align: center; @@ -1001,16 +1046,6 @@ body .cryptpad-toolbar { font-weight: bold; text-transform: uppercase; } -.cryptpad-user { - p.accountData { - &> span { - font-weight: bold; - span { - font-weight: normal; - } - } - } -} .cryptpad-dropdown-share { a { .fa { diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index e4f69ec45..112a0dc0b 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -37,6 +37,7 @@ define(function () { out.disconnected = 'Déconnecté'; out.synchronizing = 'Synchronisation'; out.reconnecting = 'Reconnexion...'; + out.typing = "Édition"; out.lag = 'Latence'; out.readonly = 'Lecture seule'; out.anonymous = "Anonyme"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 27495077f..bbb6f22e1 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -41,6 +41,7 @@ define(function () { out.disconnected = 'Disconnected'; out.synchronizing = 'Synchronizing'; out.reconnecting = 'Reconnecting...'; + out.typing = "Typing"; out.lag = 'Lag'; out.readonly = 'Read only'; out.anonymous = "Anonymous"; diff --git a/www/common/toolbar2.js b/www/common/toolbar2.js index 225f18fd2..d81a06624 100644 --- a/www/common/toolbar2.js +++ b/www/common/toolbar2.js @@ -29,12 +29,9 @@ define([ // Top parts var USER_CLS = Bar.constants.userAdmin = "cryptpad-user"; var SPINNER_CLS = Bar.constants.spinner = 'cryptpad-spinner'; - var STATE_CLS = Bar.constants.state = 'cryptpad-state'; - var LAG_CLS = Bar.constants.lag = 'cryptpad-lag'; var LIMIT_CLS = Bar.constants.lag = 'cryptpad-limit'; var TITLE_CLS = Bar.constants.title = "cryptpad-title"; var NEWPAD_CLS = Bar.constants.newpad = "cryptpad-new"; - var UPGRADE_CLS = Bar.constants.upgrade = "cryptpad-upgrade"; // User admin menu var USERADMIN_CLS = Bar.constants.user = 'cryptpad-user-dropdown'; @@ -66,10 +63,6 @@ define([ var $userContainer = $('', { 'class': USER_CLS }).appendTo($topContainer); - $('