From b341ceaf761632d31e8fa3bcafb759e0fb792618 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 5 Feb 2020 11:12:50 +1100 Subject: [PATCH] Closed group joining completed w/o backend --- _locales/en/messages.json | 6 +- js/background.js | 3 +- js/modules/loki_app_dot_net_api.js | 11 +- stylesheets/_session.scss | 20 ++-- stylesheets/_session_left_pane.scss | 9 +- .../conversation/CreateGroupDialog.tsx | 6 +- .../conversation/InviteFriendsDialog.tsx | 12 +-- .../session/LeftPaneChannelSection.tsx | 41 +++---- .../session/LeftPaneContactSection.tsx | 2 +- .../session/SessionClosableOverlay.tsx | 92 ++++++++-------- ts/components/session/SessionIdEditable.tsx | 2 +- .../session/SessionMemberListItem.tsx | 101 +++++++++--------- 12 files changed, 155 insertions(+), 150 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f0a30827c..2c59f0828 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1440,7 +1440,8 @@ "description": "Header for notification settings" }, "readReceiptSettingDescription": { - "message": "See and share when messages have been read (enables read receipts in all sessions).", + "message": + "See and share when messages have been read (enables read receipts in all sessions).", "description": "Description of the read receipts setting" }, "readReceiptSettingTitle": { @@ -2728,7 +2729,8 @@ "message": "Create Closed Group" }, "createClosedGroupDescription": { - "message": "Closed groups are end-to-end encrypted group chats for up to 10 members. They provide the same privacy protections as one-on-one sessions." + "message": + "Closed groups are end-to-end encrypted group chats for up to 10 members. They provide the same privacy protections as one-on-one sessions." }, "createClosedGroupNamePrompt": { "message": "Group Name" diff --git a/js/background.js b/js/background.js index 406ab714b..64433c2f8 100644 --- a/js/background.js +++ b/js/background.js @@ -987,7 +987,6 @@ return toastID; }; - window.getFriendsFromContacts = contacts => { // To call from TypeScript, input / output are both // of type Array @@ -998,7 +997,7 @@ ); } return friendList; - } + }; // Get memberlist. This function is not accurate >> // window.getMemberList = window.lokiPublicChatAPI.getListOfMembers(); diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index ff42135c0..752d37d93 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -496,7 +496,9 @@ class LokiAppDotNetServerAPI { )); } else { // disable check for .loki - process.env.NODE_TLS_REJECT_UNAUTHORIZED = endpoint.match(/\.loki\//) ? 0 : 1; + process.env.NODE_TLS_REJECT_UNAUTHORIZED = endpoint.match(/\.loki\//) + ? 0 + : 1; result = await nodeFetch(url, fetchOptions); // always make sure this check is enabled process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1; @@ -505,7 +507,12 @@ class LokiAppDotNetServerAPI { } } catch (e) { if (txtResponse) { - log.info(`serverRequest ${mode} error`, e.code, e.message, `json: ${txtResponse}`); + log.info( + `serverRequest ${mode} error`, + e.code, + e.message, + `json: ${txtResponse}` + ); } else { log.info(`serverRequest ${mode} error`, e.code, e.message); } diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 118181deb..ef7d0fafc 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -1683,15 +1683,13 @@ input { } } - .group-member-list { &__container { padding: 2px 0px; width: 100%; max-height: 400px; overflow-y: auto; - box-shadow: - inset 0px 14px 7px -15px $session-color-dark-grey, + box-shadow: inset 0px 14px 7px -15px $session-color-dark-grey, inset 0px -14px 7px -15px $session-color-dark-grey; } @@ -1699,7 +1697,6 @@ input { height: 100%; display: flex; flex-direction: column; - } } .create-group-name-input { @@ -1708,14 +1705,13 @@ input { textarea { padding-bottom: 0px !important; - } + } } - - } .session-member-item { - font-family: "SF Pro Text"; + cursor: pointer; + font-family: 'SF Pro Text'; padding: 0px $session-margin-sm; height: 50px; display: flex; @@ -1726,17 +1722,17 @@ input { background-color: $session-shade-4; } - &__checkmark { opacity: 0; transition: $session-transition-duration; - &.selected{ + &.selected { opacity: 1; } } - &__info, &__checkmark{ + &__info, + &__checkmark { display: flex; align-items: center; } @@ -1749,4 +1745,4 @@ input { margin-left: 5px; opacity: 0.8; } -} \ No newline at end of file +} diff --git a/stylesheets/_session_left_pane.scss b/stylesheets/_session_left_pane.scss index 89f4d2b55..8024524e2 100644 --- a/stylesheets/_session_left_pane.scss +++ b/stylesheets/_session_left_pane.scss @@ -271,8 +271,8 @@ $session-compose-margin: 20px; position: relative; height: 1px; opacity: 0.3; - margin-top: -10px; - margin-bottom: 50px; + margin-top: 2px; + margin-bottom: 40px; } .exit { @@ -291,10 +291,9 @@ $session-compose-margin: 20px; } .session-description-long { - <<<<<<>>>>>>9732c4f4d074c1024f308cf7369fc535c26724b4margin: 0px 20px; + margin: 0px 20px; font-family: 'SF Pro Display'; } diff --git a/ts/components/conversation/CreateGroupDialog.tsx b/ts/components/conversation/CreateGroupDialog.tsx index 6e59abf6a..1daf947db 100644 --- a/ts/components/conversation/CreateGroupDialog.tsx +++ b/ts/components/conversation/CreateGroupDialog.tsx @@ -96,7 +96,7 @@ export class CreateGroupDialog extends React.Component { return ( null} onOk={() => null}> -
+

{this.state.errorMessage}

{ />
-
- +
+