diff --git a/customize.dist/images/logo_ngi_trust.png b/customize.dist/images/logo_ngi_trust.png new file mode 100644 index 000000000..79db383d0 Binary files /dev/null and b/customize.dist/images/logo_ngi_trust.png differ diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js index b5454f3c6..88a5053e3 100644 --- a/customize.dist/pages/contact.js +++ b/customize.dist/pages/contact.js @@ -8,7 +8,7 @@ define([ return function () { var adminEmail = Config.adminEmail && Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr'; - var adminMailbox = Config.supportMailbox; + var adminMailbox = Config.supportMailbox && LocalStore.isLoggedIn(); return h('div#cp-main', [ Pages.infopageTopbar(), h('div.container.cp-container', [ @@ -34,7 +34,7 @@ define([ ) ) ) : undefined, - (adminMailbox && LocalStore.isLoggedIn()) ? h('div.col-12.col-sm-6.col-md-3.col-lg-3', + adminMailbox ? h('div.col-12.col-sm-6.col-md-3.col-lg-3', h('a.card', {href : "/support/"}, h('div.card-body', h('p', [ diff --git a/customize.dist/pages/features.js b/customize.dist/pages/features.js index 62ef9ae85..14c901ce4 100644 --- a/customize.dist/pages/features.js +++ b/customize.dist/pages/features.js @@ -7,7 +7,6 @@ define([ '/customize/pages.js', '/api/config', ], function ($, h, Msg, AppConfig, LocalStore, Pages, Config) { - var origin = encodeURIComponent(window.location.hostname); var accounts = { donateURL: AppConfig.donateURL || "https://opencollective.com/cryptpad/", upgradeURL: AppConfig.upgradeURL diff --git a/customize.dist/pages/index.js b/customize.dist/pages/index.js index dc100c554..ef51d18b3 100644 --- a/customize.dist/pages/index.js +++ b/customize.dist/pages/index.js @@ -133,8 +133,8 @@ define([ ]), blocks, ]), + Pages.infopageFooter(), ]), - Pages.infopageFooter(), ]; }; }); diff --git a/customize.dist/pages/what-is-cryptpad.js b/customize.dist/pages/what-is-cryptpad.js index f9fed2f89..a2c46ec52 100644 --- a/customize.dist/pages/what-is-cryptpad.js +++ b/customize.dist/pages/what-is-cryptpad.js @@ -64,19 +64,23 @@ define([ h('div.col-md-6.order-md-1.small-logos', [ h('img', { src: '/customize/images/logo_ngi.png?' + urlArgs, - alt: 'Logo NGI Trust' + alt: 'NGI Award 2019' }), h('img', { src: '/customize/images/logo_nlnet.svg?' + urlArgs, - alt: 'Logo NLNet Foundation' + alt: 'NLNet Foundation logo' }), h('img', { src: '/customize/images/logo_bpifrance.svg?' + urlArgs, - alt: 'Logo BPI France' + alt: 'BPI France logo' }), h('img', { src: '/customize/images/logo_moss.jpg?' + urlArgs, - alt: 'Logo Mozilla Open Source Support' + alt: 'Mozilla Open Source Support logo' + }), + h('img', { + src: '/customize/images/logo_ngi_trust.png?' + urlArgs, + alt: 'NGI Trust logo' }), ]), ]), diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index 38c0c6139..4b7cc97bf 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -60,7 +60,7 @@ @colortheme_alertify-cancel: @colortheme_modal-bg; @colortheme_alertify-cancel-border: #949494; -@colortheme_notification-log: fade(@colortheme_logo-1, 90%); +@colortheme_notification-log: fade(@colortheme_logo-2, 90%); @colortheme_notification-color: #fff;; @colortheme_notification-warn: rgba(205, 37, 50, 0.8); diff --git a/customize.dist/src/less2/include/comments.less b/customize.dist/src/less2/include/comments.less index dc2ef0461..f53fb00ff 100644 --- a/customize.dist/src/less2/include/comments.less +++ b/customize.dist/src/less2/include/comments.less @@ -54,6 +54,8 @@ height: unset !important; max-height: 140px; // 6 lines padding: 3px 5px; + user-select: text; + -webkit-user-select: text; // fix for iOS (can't type in contenteditable if user-select none) } margin-bottom: 5px; } diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index 535b2afe8..354493e1f 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -37,6 +37,16 @@ body { margin: 0; font-size: 16px; font-family: @colortheme_font; + + #cp-main { + display: flex; + flex-flow: column; + min-height: 100vh; + & > .cp-container { + flex: 1; + } + } + .cp-container { font-size: 16px; padding-top: @infopages_padding; @@ -121,6 +131,8 @@ body { background-color: @footer-color; padding-top: 20px; + align-self: normal; // override align-items:center from parent in index.html + .container { margin-bottom: 20px; a { diff --git a/customize.dist/src/less2/include/messenger.less b/customize.dist/src/less2/include/messenger.less index f5ace3444..4a05af91c 100644 --- a/customize.dist/src/less2/include/messenger.less +++ b/customize.dist/src/less2/include/messenger.less @@ -94,6 +94,7 @@ flex-flow: column; flex: 1; min-width: 0; + color: @colortheme_base; .cp-app-contacts-name { white-space: nowrap; } @@ -113,7 +114,7 @@ width: 20px; text-align: center; &:hover { - color: darken(@msg-color, 20%); + color: @cryptpad_text_col; } } diff --git a/customize.dist/src/less2/pages/page-register.less b/customize.dist/src/less2/pages/page-register.less index 0c03d57e4..ebd89ed07 100644 --- a/customize.dist/src/less2/pages/page-register.less +++ b/customize.dist/src/less2/pages/page-register.less @@ -38,6 +38,19 @@ p:empty { display: none; } + + nav { + display: flex; + align-items: center; + justify-content: flex-end; + } + + @media screen and (max-width: 600px) { + nav .btn-danger { + line-height: inherit; + } + } + } .cp-register-det { diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index a8f90c111..fc426ab8c 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -659,7 +659,16 @@ define([ // Put in the following function the RPC queries that should also work in filepicker + var _sframeChan = sframeChan; var addCommonRpc = function (sframeChan, safe) { + // Send UI.log and UI.warn commands from the secureiframe to the normal iframe + sframeChan.on('EV_ALERTIFY_LOG', function (msg) { + _sframeChan.event('EV_ALERTIFY_LOG', msg); + }); + sframeChan.on('EV_ALERTIFY_WARN', function (msg) { + _sframeChan.event('EV_ALERTIFY_WARN', msg); + }); + Cryptpad.universal.onEvent.reg(function (data) { sframeChan.event('EV_UNIVERSAL_EVENT', data); }); diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 9304d9469..c46a0641d 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -851,6 +851,14 @@ define([ Feedback.init(feedback); } catch (e) { Feedback.init(false); } + if (privateData.secureIframe) { + UI.log = function (msg) { ctx.sframeChan.event('EV_ALERTIFY_LOG', msg); }; + UI.warn = function (msg) { ctx.sframeChan.event('EV_ALERTIFY_WARN', msg); }; + } else { + ctx.sframeChan.on('EV_ALERTIFY_LOG', function (msg) { UI.log(msg); }); + ctx.sframeChan.on('EV_ALERTIFY_WARN', function (msg) { UI.warn(msg); }); + } + try { var forbidden = privateData.disabledApp; if (forbidden) { diff --git a/www/secureiframe/main.js b/www/secureiframe/main.js index 62175c5a0..a5d1faed3 100644 --- a/www/secureiframe/main.js +++ b/www/secureiframe/main.js @@ -102,6 +102,7 @@ define([ password: config.data.password, isTemplate: isTemplate, file: config.data.file, + secureIframe: true, }; for (var k in additionalPriv) { metaObj.priv[k] = additionalPriv[k]; }