From d46bd1af5c130577a77504d9fc7efe08b204d6cd Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Sep 2016 17:56:47 +0200 Subject: [PATCH] Improve the toolbar UI with the username displayed --- customize.dist/toolbar.css | 13 ++++--------- www/common/toolbar.js | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index b03039473..587d45eaf 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -60,14 +60,6 @@ margin-right: 5px; padding-left: 5px; } -.cryptpad-changeName { - float: left; - cursor: pointer; -} -.cryptpad-changeName button { - padding: 0; - margin-right: 5px; -} .cryptpad-toolbar-leftside { float: left; } @@ -87,4 +79,7 @@ margin-right: 20px; font-weight: bold; text-transform: uppercase; -} \ No newline at end of file +} +.cryptpad-toolbar-username { + font-style: italic; +}; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 865529d78..b2be2f5ca 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -27,6 +27,9 @@ define([ var SPINNER_CLS = Bar.constants.spinner = 'cryptpad-spinner'; + var USERNAME_CLS = Bar.constants.username = 'cryptpad-toolbar-username'; + + var READONLY_CLS = Bar.constants.readonly = 'cryptpad-readonly'; /** Key in the localStore which indicates realtime activity should be disallowed. */ // TODO remove? will never be used in cryptpad var LOCALSTORAGE_DISALLOW = Bar.constants.localstorageDisallow = 'cryptpad-disallow'; @@ -121,16 +124,16 @@ define([ return (i > 0) ? list.slice(0, -2) : list; }; - var createChangeName = function($container, userList, buttonID) { + var createChangeName = function($container, buttonID) { var $span = $('', { id: uid(), }); var $button = $('