From 3c9199ed42cd7c0feae032575ff248effb04e35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Wed, 18 Dec 2019 10:35:21 +0000 Subject: [PATCH] UI for invite accept page --- www/teams/app-team.less | 30 ++++++++++++++++++++++++++++++ www/teams/inner.js | 8 +++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/www/teams/app-team.less b/www/teams/app-team.less index a032288d1..06d47f4b6 100644 --- a/www/teams/app-team.less +++ b/www/teams/app-team.less @@ -3,6 +3,7 @@ @import (reference) '../../customize/src/less2/include/messenger.less'; @import (reference) '../../customize/src/less2/include/sidebar-layout.less'; @import (reference) "../../customize/src/less2/include/tools.less"; +@import (reference) "../../customize/src/less2/include/colortheme.less"; &.cp-app-team { @@ -188,6 +189,35 @@ } } } + .cp-team-link { + max-width: 550px; + .cp-teams-invite-from { + display: flex; + margin-bottom: 20px; + .cp-teams-invite-from-author { + display: flex; + margin-left: 10px; + .cp-teams-invite-from-avatar { + .avatar_main(25px); + margin-right: 5px; + } + } + } + .cp-teams-invite-message { + background-color: fade(@colortheme_logo-2, 25%); + color: @cryptpad_text_col; + resize: none; + width: 100%; + padding: 12px; + margin-bottom: 20px; + } + .cp-teams-invite-password { + margin-bottom: 20px; + } + i.fa.fa-spin.fa-spinner { + margin-right: 10px; + } + } } #cp-teams-roster-dialog { diff --git a/www/teams/inner.js b/www/teams/inner.js index de1e466c1..511981a29 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -1118,13 +1118,11 @@ define([ json = json; // XXX {message: "", author: "", ???} $div.empty(); $div.append(h('div.cp-teams-invite-from', [ - 'From', // XXX + 'From: ', // XXX displayUser(common, json.author) ])); $div.append(UI.setHTML(h('p.cp-teams-invite-to'), 'Bob has invited you to join the team CryptPad')); // XXX - $div.append(h('div.cp-teams-invite-message', [ - UI.dialog.selectableArea(json.message || '') - ])); + $div.append(h('div.cp-teams-invite-message', json.message || '')); })); }).nThen(function (waitFor) { // If you're logged in, move on to the next nThen @@ -1161,7 +1159,7 @@ define([ if (!val) { return; } process(val); }); - $inviteDiv.prepend(h('div', [ + $inviteDiv.prepend(h('div.cp-teams-invite-password', [ h('p', 'Please enter the invitation password to continue...'), pwInput ])); // XXX