From 2048e3e2014aceaee16336f3ceddbb00cf92993e Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sun, 26 Mar 2017 17:57:05 +0200 Subject: [PATCH] replace name in top right with icon for less noise Signed-off-by: Jan-Christoph Borchardt --- core/css/header.scss | 31 ++++++++++----------------- core/css/icons.scss | 8 +++++++ core/img/actions/settings-white.svg | 1 + core/templates/layout.user.php | 3 +-- settings/js/federationsettingsview.js | 12 ----------- 5 files changed, 21 insertions(+), 34 deletions(-) create mode 100644 core/img/actions/settings-white.svg diff --git a/core/css/header.scss b/core/css/header.scss index 4b6c0fbd007..3de0c50bcd3 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -6,8 +6,8 @@ * @copyright Copyright (c) 2016, Erik Pellikka * @copyright Copyright (c) 2016, jowi * @copyright Copyright (c) 2015, Hendrik Leppelsack - * @copyright Copyright (c) 2015, Jan-Christoph Borchardt * @copyright Copyright (c) 2015, Volker E + * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt * * @license GNU AGPL version 3 or any later version * @@ -248,10 +248,6 @@ nav { left: 242px; } -#expanddiv:after { - right: 15px; -} - #navigation { box-sizing: border-box; * { @@ -372,7 +368,7 @@ nav { #expand { display: flex; align-items: center; - padding: 7px 30px 6px 10px; + padding: 7px 20px 6px 10px; cursor: pointer; * { cursor: pointer; @@ -386,14 +382,12 @@ nav { &:focus, &:active { color: $color-primary-text; - img { + img, + #expandDisplayName { -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; opacity: 1; } } - .icon-caret { - margin-top: 0; - } /* Profile picture in header */ .avatardiv { @@ -409,6 +403,11 @@ nav { display: none; } } + + #expandDisplayName { + padding: 8px; + opacity: .7; + } } #expanddiv { @@ -425,7 +424,7 @@ nav { box-sizing: border-box; &:after { /* position of dropdown arrow */ - right: 15px; + right: 13px; } a { display: block; @@ -449,14 +448,6 @@ nav { } } -/* do not show display name when profile picture is present */ - -#header { - .avatardiv.avatardiv-shown + #expandDisplayName { - display: none; - } -} - #appmenu { display: inline-block; width: auto; @@ -583,4 +574,4 @@ nav { } } -} \ No newline at end of file +} diff --git a/core/css/icons.scss b/core/css/icons.scss index 42224a9cfc4..d6a03b3187b 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -318,6 +318,14 @@ img, object, video, button, textarea, input, select { background-image: url('../img/actions/settings.svg?v=1'); } +.icon-settings-dark { + background-image: url('../img/actions/settings-dark.svg?v=1'); +} + +.icon-settings-white { + background-image: url('../img/actions/settings-white.svg?v=1'); +} + .icon-share { background-image: url('../img/actions/share.svg?v=1'); } diff --git a/core/img/actions/settings-white.svg b/core/img/actions/settings-white.svg new file mode 100644 index 00000000000..2371d204964 --- /dev/null +++ b/core/img/actions/settings-white.svg @@ -0,0 +1 @@ + diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index adeeaf03797..a7da4a39dd7 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -160,8 +160,7 @@ > - -
+
    diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index 360167bfe43..2715c1e1e08 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -111,21 +111,9 @@ $.when(savingData).done(function() { //OC.msg.finishedSaving('#personal-settings-container .msg', result) self._showInputChangeSuccess(field); - if (field === 'displayname') { - self._updateDisplayName(value); - } }); }, - _updateDisplayName: function(displayName) { - // update displayName on the top right expand button - $('#expandDisplayName').text(displayName); - // update avatar if avatar is available - if (!$('#removeavatar').hasClass('hidden')) { - updateAvatar(); - } - }, - _onScopeChanged: function(field, scope) { var $dialog = $('.oc-dialog:visible'); if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {