From 8a11cf9b3857438fdc871b02bafdc25ff2239b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Thu, 21 Nov 2019 12:29:23 +0000 Subject: [PATCH] style share modal --- .../src/less2/include/alertify.less | 24 ++++++++++++++----- .../src/less2/include/colortheme.less | 2 +- www/common/common-ui-elements.js | 12 ++++++---- www/common/translations/messages.json | 8 +++---- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index 142cc2509..a98572939 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -17,13 +17,14 @@ @alertify-btn-fg: @alertify-fore; + @alertify-light-bg: fade(@alertify-fore, 25%); @alertify-bg: @colortheme_modal-dim; @alertify-fg: @alertify-fore; @alertify-input-bg: @colortheme_modal-input; @alertify-input-fg: @colortheme_modal-input-fg; - @alertify_padding-base: @variables_padding; + @alertify_padding-base: 8px; // XXX to align tab contents with buttons. could change @variables-padding: 12px @alertify_box-shadow: @variables_shadow; // Logs to show that something has happened @@ -158,33 +159,44 @@ margin-bottom: @alertify_padding-base; margin: 0; overflow: auto; + &.access-rights{ + .radio-group{ + display: flex; + flex-direction: row; + .cp-radio{ + margin-right: 30px; + } + } + } } .alertify-tabs { max-height: 100%; display: flex; flex-flow: column; .alertify-tabs-titles { - height: 30px; + height: 40px; display: flex; border-bottom: 1px solid @alertify-fore; - margin-bottom: 20px; + margin-bottom: 10px; box-sizing: content-box; span { font-size: 20px; - height: 30px; - line-height: 30px; + height: 40px; + line-height: 40px; box-sizing: border-box; padding: 0 15px; border-left: 1px solid lighten(@alertify-base, 10%); border-right: 1px solid lighten(@alertify-base, 10%); cursor: pointer; + &:hover { + background-color: @alertify-light-bg; + } } span.alertify-tabs-active { background-color: @alertify-fore; border-left: 1px solid @alertify-fore; border-right: 1px solid @alertify-fore; color: @alertify-base; - font-weight: bold; cursor: default; } } diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index 44719c2d6..2e0c6371c 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -23,7 +23,7 @@ @colortheme_form-bg: @colortheme_logo-2; @colortheme_form-color: #ffffff; @colortheme_form-bg-alt: #ffffff; -@colortheme_form-color-alt: @colortheme_logo-1; +@colortheme_form-color-alt: @colortheme_logo-2; @colortheme_form-warning: #f49842; @colortheme_form-warning-hov: darken(@colortheme_form-warning, 5%); diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 3c2fa3785..0931980c2 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -899,7 +899,7 @@ define([ delete friends[curve]; }); - var friendsList = UIElements.getUserGrid(Messages.share_linkFriends, { + var friendsList = UIElements.getUserGrid(null, { common: common, data: friends, noFilter: false @@ -1038,17 +1038,16 @@ define([ var parsed = Hash.parsePadUrl(pathname); var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1; - var rights = h('div.msg', [ + var rights = h('div.msg.access-rights', [ h('label', Messages.share_linkAccess), h('br'), + h('div.radio-group',[ UI.createRadio('accessRights', 'cp-share-editable-false', Messages.share_linkView, true, { mark: {tabindex:1} }), canPresent ? UI.createRadio('accessRights', 'cp-share-present', Messages.share_linkPresent, false, { mark: {tabindex:1} }) : undefined, UI.createRadio('accessRights', 'cp-share-editable-true', - Messages.share_linkEdit, false, { mark: {tabindex:1} }), - - h('br'), + Messages.share_linkEdit, false, { mark: {tabindex:1} })]) ]); @@ -1203,12 +1202,15 @@ define([ // Create modal var tabs = [{ title: Messages.share_linkCategory, + icon: "fa-link", content: frameLink }, { title: Messages.share_contactCategory, + icon: "fa-address-book", content: frameContacts }, { title: Messages.share_embedCategory, + icon: "fa-code", content: frameEmbed }]; if (typeof(AppConfig.customizeShareOptions) === 'function') { diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 6751fa8c3..83a64842a 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -984,11 +984,11 @@ "share_linkEdit": "Edit", "share_linkView": "View", "share_linkEmbed": "Embed mode (hide toolbar and user list)", - "share_linkPresent": "Present (hide editable sections)", - "share_linkOpen": "Open in new tab", - "share_linkCopy": "Copy to clipboard", + "share_linkPresent": "Present", + "share_linkOpen": "Preview", + "share_linkCopy": "Copy", "share_contactCategory": "Contacts", - "share_noContacts": "You have no friends, learn how to get some. // XXX", + "share_noContacts": "You do not have any contacts yet. // XXX", "share_embedCategory": "Embed", "share_mediatagCopy": "Copy mediatag to clipboard", "loading_pad_1": "Initializing pad",