From df53cbc0a9317c0858f215ef6b9f04cb840bfa84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 28 Jul 2020 10:52:51 +0100 Subject: [PATCH 01/15] Access modal .wide sizing --- .../src/less2/include/alertify.less | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index db951613c..3e939b125 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -157,8 +157,7 @@ background: #fff; box-shadow: @alertify_box-shadow; &.wide { - width: 1000px; - max-width: 70%; + max-width: 850px; } } @@ -393,9 +392,15 @@ .cp-share-columns { display: flex; flex-flow: row; + @media screen and (max-width: (@browser_media-medium-screen)) { + flex-flow: column; + } & > .cp-share-column { width: 50%; + @media screen and (max-width: (@browser_media-medium-screen)) { + width: unset; + } //padding: 0 10px; position: relative; &.contains-nav { @@ -414,14 +419,24 @@ } &:first-child { margin-right: @alertify_padding-base; + @media screen and (max-width: (@browser_media-medium-screen)) { + margin: 0 0 @alertify_padding-base 0; + } } &:last-child { margin-left: @alertify_padding-base; + @media screen and (max-width: (@browser_media-medium-screen)) { + margin: 0px; + } } } & > .cp-share-column-mid { display: flex; align-items: center; + justify-content: center; + @media screen and (max-width: (@browser_media-medium-screen)) { + margin-bottom: @alertify_padding-base; + } button { width: 50px; margin: 0; From cfd218a8caf892d7e06f34c56c2c6a3082cd7f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 28 Jul 2020 11:27:45 +0100 Subject: [PATCH 02/15] Switch radio group to column on small screens - To give more space to longer translated radio-button titles - For share modal access rights --- .../src/less2/include/modals-ui-elements.less | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index e8282f6e8..37c3b8545 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -1,5 +1,7 @@ @import (reference) "./colortheme-all.less"; @import (reference) "./variables.less"; +@import (reference) "./browser.less"; + .modals-ui-elements_main() { --LessLoader_require: LessLoader_currentFile(); } @@ -20,6 +22,15 @@ .cp-radio { margin-right: 30px; } + @media (max-width: @browser_media-medium-screen) { + flex-direction: column; + &:not(:last-child) { + margin-bottom: 0px; + } + .cp-radio { + margin: 0 0 5px 0; + } + } } } From 66e9ad2dcdae4f43a56062b251782c65469bb68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 28 Jul 2020 12:25:27 +0100 Subject: [PATCH 03/15] Hide inactive tab titles on small screens --- customize.dist/src/less2/include/alertify.less | 9 ++++++++- www/common/common-interface.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index 3e939b125..aaf8db992 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -183,7 +183,7 @@ border-bottom: 1px solid @alertify-fore; margin-bottom: 10px; box-sizing: content-box; - span { + .alertify-tabs-title { .tools_unselectable(); font-size: 20px; height: 40px; @@ -200,6 +200,13 @@ color: #949494; cursor: not-allowed; } + &:not(.alertify-tabs-active) { + @media (max-width: @browser_media-medium-screen) { + .tab-title-text { + display: none; + } + } + } } span.alertify-tabs-active { background-color: @alertify-fore !important; diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 37ef044ff..1b1fdc072 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -221,7 +221,7 @@ define([ tabs.forEach(function (tab, i) { if (!(tab.content || tab.disabled) || !tab.title) { return; } var content = h('div.alertify-tabs-content', tab.content); - var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), tab.title); + var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',tab.title)); if (tab.icon) { var icon = h('i', {class: tab.icon}); $(title).prepend(' ').prepend(icon); From 6792e144101da525f7860e4e4c60e90bba2a4a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 28 Jul 2020 15:27:48 +0100 Subject: [PATCH 04/15] Prevent overlap of cp-modal close button with text. --- customize.dist/src/less2/include/modal.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/customize.dist/src/less2/include/modal.less b/customize.dist/src/less2/include/modal.less index 8ed10a1b2..08c0121fd 100644 --- a/customize.dist/src/less2/include/modal.less +++ b/customize.dist/src/less2/include/modal.less @@ -41,6 +41,7 @@ box-shadow: @variables_shadow; padding: @variables_padding; + padding-top: @variables_padding * 2; position: relative; //top: 15vh; bottom: 15vh; @@ -57,6 +58,11 @@ margin-bottom: 1em; } + & > p:not(.cp-modal-form) { + text-align: left; // XXX needs testing + margin-right: 30px; + } + .cp-modal-form { display: flex; flex-wrap: wrap; From 7fd3f46c2840cf8b4abc7e2ecde74a3b14298b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 28 Jul 2020 16:09:18 +0100 Subject: [PATCH 05/15] make OpenCollective popup responsive --- customize.dist/src/less2/include/corner.less | 1 + 1 file changed, 1 insertion(+) diff --git a/customize.dist/src/less2/include/corner.less b/customize.dist/src/less2/include/corner.less index feec62165..04d503cc9 100644 --- a/customize.dist/src/less2/include/corner.less +++ b/customize.dist/src/less2/include/corner.less @@ -89,6 +89,7 @@ } &.cp-corner-big { width: 500px; + max-width: 95%; } .cp-corner-dontshow { From 68707db72d0ccf3c2efc37ea191f2ede4ea1798a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Sep 2020 15:49:23 +0100 Subject: [PATCH 06/15] Switch access add button on small screens --- customize.dist/src/less2/include/alertify.less | 3 +++ .../src/less2/include/modals-ui-elements.less | 17 +++++++++++++++++ www/common/inner/access.js | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index aaf8db992..ded0ae043 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -449,6 +449,9 @@ margin: 0; min-width: 0; font-size: 18px !important; + @media screen and (max-width: (@browser_media-medium-screen)) { + width: 100%; + } } } } diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index 37c3b8545..8c55ab86c 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -87,6 +87,23 @@ // Access modal .cp-overlay-container { position: relative; + button.btn-primary { + i { + margin-right: 0px !important; + } + i.fa-arrow-left { + display: inline; + @media (max-width: @browser_media-medium-screen) { + display:none; + } + } + i.fa-arrow-up { + display: none; + @media (max-width: @browser_media-medium-screen) { + display: inline; + } + } + } .cp-overlay { position: absolute; background-color: rgba(255,255,255,0.5); diff --git a/www/common/inner/access.js b/www/common/inner/access.js index 2e1f4b4a8..530376854 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -33,7 +33,7 @@ define([ opts = opts || {}; var redrawAll = function () {}; - var addBtn = h('button.btn.btn-primary.fa.fa-arrow-left'); + var addBtn = h('button.btn.btn-primary', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); var div1 = h('div.cp-share-column.cp-ownership'); var divMid = h('div.cp-share-column-mid', addBtn); @@ -388,7 +388,7 @@ define([ var redrawAll = function () {}; - var addBtn = h('button.btn.btn-primary.fa.fa-arrow-left'); + var addBtn = h('button.btn.btn-primary', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); var div1 = h('div.cp-share-column.cp-allowlist'); var divMid = h('div.cp-share-column-mid.cp-overlay-container', [ From be1a2405d59774e492a7e583a2bdb3f91118f902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Sep 2020 16:05:26 +0100 Subject: [PATCH 07/15] Modal tabs accessibility --- www/common/common-interface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 1b1fdc072..f028c415d 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -221,9 +221,9 @@ define([ tabs.forEach(function (tab, i) { if (!(tab.content || tab.disabled) || !tab.title) { return; } var content = h('div.alertify-tabs-content', tab.content); - var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',tab.title)); + var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',{id: 'cp-tab-' + tab.title, 'aria-hidden':"true"}, tab.title)); if (tab.icon) { - var icon = h('i', {class: tab.icon}); + var icon = h('i', {class: tab.icon, 'aria-labelledby': 'cp-tab-' + tab.title}); $(title).prepend(' ').prepend(icon); } $(title).click(function () { From cdb1bcd9c3ff0917b86c006156df944e0f51df85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 09:42:26 +0100 Subject: [PATCH 08/15] fix id name in modal tabs --- www/common/common-interface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index f028c415d..647036356 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -221,9 +221,9 @@ define([ tabs.forEach(function (tab, i) { if (!(tab.content || tab.disabled) || !tab.title) { return; } var content = h('div.alertify-tabs-content', tab.content); - var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',{id: 'cp-tab-' + tab.title, 'aria-hidden':"true"}, tab.title)); + var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',{id: 'cp-tab-' + tab.title.toLowerCase(), 'aria-hidden':"true"}, tab.title)); if (tab.icon) { - var icon = h('i', {class: tab.icon, 'aria-labelledby': 'cp-tab-' + tab.title}); + var icon = h('i', {class: tab.icon, 'aria-labelledby': 'cp-tab-' + tab.title.toLowerCase()}); $(title).prepend(' ').prepend(icon); } $(title).click(function () { From 5132e2baae678ba0ce1077a14439362adfd1882a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 09:43:01 +0100 Subject: [PATCH 09/15] remove double padding in dialogs --- customize.dist/src/less2/include/alertify.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index ded0ae043..c3767f073 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -153,7 +153,6 @@ max-width: 500px; margin: 0 auto; text-align: left; - padding: @alertify_padding-base; background: #fff; box-shadow: @alertify_box-shadow; &.wide { @@ -177,6 +176,7 @@ max-height: 100%; display: flex; flex-flow: column; + padding: @alertify_padding-base; .alertify-tabs-titles { height: 40px; display: flex; From 9e1846530399acb6c5a93d2a9c02cf5eb732e905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 10:34:37 +0100 Subject: [PATCH 10/15] Fix access add button arrow --- .../src/less2/include/modals-ui-elements.less | 31 ++++++++++--------- www/common/inner/access.js | 4 +-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index 8c55ab86c..09e381c47 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -85,25 +85,26 @@ } // Access modal - .cp-overlay-container { - position: relative; - button.btn-primary { - i { - margin-right: 0px !important; + button.cp-access-add { + i { + margin-right: 0px !important; + } + i.fa-arrow-left { + display: inline; + @media (max-width: @browser_media-medium-screen) { + display:none; } - i.fa-arrow-left { + } + i.fa-arrow-up { + display: none; + @media (max-width: @browser_media-medium-screen) { display: inline; - @media (max-width: @browser_media-medium-screen) { - display:none; - } - } - i.fa-arrow-up { - display: none; - @media (max-width: @browser_media-medium-screen) { - display: inline; - } } } + } + + .cp-overlay-container { + position: relative; .cp-overlay { position: absolute; background-color: rgba(255,255,255,0.5); diff --git a/www/common/inner/access.js b/www/common/inner/access.js index 530376854..129b24916 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -33,7 +33,7 @@ define([ opts = opts || {}; var redrawAll = function () {}; - var addBtn = h('button.btn.btn-primary', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); + var addBtn = h('button.btn.btn-primary.cp-access-add', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); var div1 = h('div.cp-share-column.cp-ownership'); var divMid = h('div.cp-share-column-mid', addBtn); @@ -388,7 +388,7 @@ define([ var redrawAll = function () {}; - var addBtn = h('button.btn.btn-primary', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); + var addBtn = h('button.btn.btn-primary.cp-access-add', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]); var div1 = h('div.cp-share-column.cp-allowlist'); var divMid = h('div.cp-share-column-mid.cp-overlay-container', [ From b029e806ee0dd7209fd15dbdb4bf4594ee75d66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 10:42:19 +0100 Subject: [PATCH 11/15] fix address book icon --- www/common/inner/share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/inner/share.js b/www/common/inner/share.js index 34b258109..fe6e9b93c 100644 --- a/www/common/inner/share.js +++ b/www/common/inner/share.js @@ -654,7 +654,7 @@ define([ var tabs = [{ getTab: getContactsTab, title: Messages.share_contactCategory, - icon: "fa fa-addessèbook", + icon: "fa fa-addess-book", active: hasFriends, onShow: onShowContacts, onHide: resetTab @@ -834,7 +834,7 @@ define([ var tabs = [{ getTab: getFileContactsTab, title: Messages.share_contactCategory, - icon: "fa fa-addessèbook", + icon: "fa fa-addess-book", active: hasFriends, }, { getTab: getFileLinkTab, From 6321eedd870bf0567bd573424d692e2d19da7e54 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 15 Sep 2020 11:52:11 +0200 Subject: [PATCH 12/15] Fix missing context menu --- www/common/drive-ui.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index fde53b574..fe3b1b588 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -3682,6 +3682,9 @@ define([ APP.hideMenu(); return; } + if (!$li.length) { + return void $dirContent.contextmenu(); + } // Open the menu $li.contextmenu(); }); From e5cf510881edeb605c86e1ec0edd14d47a6041ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 10:54:46 +0100 Subject: [PATCH 13/15] Fix contacts icon --- www/common/inner/share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/inner/share.js b/www/common/inner/share.js index fe6e9b93c..ce5112736 100644 --- a/www/common/inner/share.js +++ b/www/common/inner/share.js @@ -654,7 +654,7 @@ define([ var tabs = [{ getTab: getContactsTab, title: Messages.share_contactCategory, - icon: "fa fa-addess-book", + icon: "fa fa-address-book", active: hasFriends, onShow: onShowContacts, onHide: resetTab @@ -834,7 +834,7 @@ define([ var tabs = [{ getTab: getFileContactsTab, title: Messages.share_contactCategory, - icon: "fa fa-addess-book", + icon: "fa fa-address-book", active: hasFriends, }, { getTab: getFileLinkTab, From 31165865aeed2d12bc0929f555868562b4e13deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 15 Sep 2020 11:03:43 +0100 Subject: [PATCH 14/15] Change flashing color of mobile drive toolbar button --- www/common/drive-ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index fe3b1b588..954d018da 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1378,7 +1378,7 @@ define([ } $button.show(); $button.css({ - background: '#000' + background: '#63b1f7' }); window.setTimeout(function () { $button.css({ From 99b102e75edbf9ef38bdd3313c0ad788e8a6c7e8 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 23 Sep 2020 14:29:22 +0530 Subject: [PATCH 15/15] use canonical form of user signing keys on user profiles --- www/profile/inner.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/profile/inner.js b/www/profile/inner.js index 12ab5e607..cddae4611 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -6,6 +6,7 @@ define([ '/bower_components/nthen/index.js', '/common/sframe-common.js', '/common/common-util.js', + '/common/common-hash.js', '/common/common-interface.js', '/common/common-ui-elements.js', '/common/common-realtime.js', @@ -33,6 +34,7 @@ define([ nThen, SFCommon, Util, + Hash, UI, UIElements, Realtime, @@ -481,9 +483,7 @@ define([ APP.getEdPublic = function () { var metadataMgr = APP.common.getMetadataMgr(); var privateData = metadataMgr.getPrivateData(); - var name = data.name.toLowerCase().replace(/[^a-zA-Z0-9]+/g, "-"); - var ed = data.edPublic.replace(/\//g, '-'); - var url = privateData.origin + '/user/#/1/' + name + '/' + ed; + var url = Hash.getPublicSigningKeyString(privateData.origin, data.name, data.edPublic); var success = Clipboard.copy(url); if (success) { UI.log(Messages.shareSuccess); } };