From db09cadb667c158479c87b421cb95edc2042023e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 14 Apr 2020 17:19:15 +0200 Subject: [PATCH 1/2] remove spinner, change copy, add button placeholder --- res/css/_components.scss | 1 + .../structures/auth/_CompleteSecurity.scss | 1 + .../views/elements/_ButtonPlaceholder.scss | 24 +++++++++++++++++++ .../structures/auth/SetupEncryptionBody.js | 6 ++--- .../views/elements/ButtonPlaceholder.js | 19 +++++++++++++++ src/i18n/strings/en_EN.json | 4 ++-- 6 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 res/css/views/elements/_ButtonPlaceholder.scss create mode 100644 src/components/views/elements/ButtonPlaceholder.js diff --git a/res/css/_components.scss b/res/css/_components.scss index 8706772ad9..21df53d0b9 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -94,6 +94,7 @@ @import "./views/elements/_AccessibleButton.scss"; @import "./views/elements/_AddressSelector.scss"; @import "./views/elements/_AddressTile.scss"; +@import "./views/elements/_ButtonPlaceholder.scss"; @import "./views/elements/_DirectorySearchBox.scss"; @import "./views/elements/_Dropdown.scss"; @import "./views/elements/_EditableItemList.scss"; diff --git a/res/css/structures/auth/_CompleteSecurity.scss b/res/css/structures/auth/_CompleteSecurity.scss index 3050840fe8..80e7aaada0 100644 --- a/res/css/structures/auth/_CompleteSecurity.scss +++ b/res/css/structures/auth/_CompleteSecurity.scss @@ -44,6 +44,7 @@ limitations under the License. .mx_CompleteSecurity_actionRow { display: flex; justify-content: flex-end; + margin-top: $font-28px; .mx_AccessibleButton { margin-inline-start: 18px; diff --git a/res/css/views/elements/_ButtonPlaceholder.scss b/res/css/views/elements/_ButtonPlaceholder.scss new file mode 100644 index 0000000000..c9a8c1f794 --- /dev/null +++ b/res/css/views/elements/_ButtonPlaceholder.scss @@ -0,0 +1,24 @@ +/* +Copyright 2017 Vector Creations Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +.mx_ButtonPlaceholder { + font-size: $font-14px; + font-weight: 600; + padding: 7px 18px; + display: inline-block; + text-align: center; + color: $authpage-secondary-color; +} diff --git a/src/components/structures/auth/SetupEncryptionBody.js b/src/components/structures/auth/SetupEncryptionBody.js index c7c73cd616..a982957ed0 100644 --- a/src/components/structures/auth/SetupEncryptionBody.js +++ b/src/components/structures/auth/SetupEncryptionBody.js @@ -108,14 +108,13 @@ export default class SetupEncryptionBody extends React.Component { member={MatrixClientPeg.get().getUser(this.state.verificationRequest.otherUserId)} />; } else if (phase === PHASE_INTRO) { - const InlineSpinner = sdk.getComponent('elements.InlineSpinner'); + const ButtonPlaceholder = sdk.getComponent("elements.ButtonPlaceholder"); return (

{_t( - "Open an existing session & use it to verify this one, " + + "Use an existing session to verify this one, " + "granting it access to encrypted messages.", )}

-

{_t("Waiting…")}

{_t( "If you can’t access one, ", {}, { @@ -133,6 +132,7 @@ export default class SetupEncryptionBody extends React.Component { > {_t("Skip")} + {_t("Use your other device to continue…")}

); diff --git a/src/components/views/elements/ButtonPlaceholder.js b/src/components/views/elements/ButtonPlaceholder.js new file mode 100644 index 0000000000..9c40df9db6 --- /dev/null +++ b/src/components/views/elements/ButtonPlaceholder.js @@ -0,0 +1,19 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +export default function ButtonPlaceholder(props) { + return
{props.children}
; +} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ae8ed90402..a46c357a3e 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2112,9 +2112,9 @@ "You can now close this window or log in to your new account.": "You can now close this window or log in to your new account.", "Registration Successful": "Registration Successful", "Create your account": "Create your account", - "Open an existing session & use it to verify this one, granting it access to encrypted messages.": "Open an existing session & use it to verify this one, granting it access to encrypted messages.", - "Waiting…": "Waiting…", + "Use an existing session to verify this one, granting it access to encrypted messages.": "Use an existing session to verify this one, granting it access to encrypted messages.", "If you can’t access one, ": "If you can’t access one, ", + "Use your other device to continue…": "Use your other device to continue…", "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.": "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.", "Your new session is now verified. Other users will see it as trusted.": "Your new session is now verified. Other users will see it as trusted.", "Without completing security on this session, it won’t have access to encrypted messages.": "Without completing security on this session, it won’t have access to encrypted messages.", From 368737cfd95f700f376453f1921b13cbc92005f2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 14 Apr 2020 17:41:06 +0200 Subject: [PATCH 2/2] fix copyright --- res/css/views/elements/_ButtonPlaceholder.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/elements/_ButtonPlaceholder.scss b/res/css/views/elements/_ButtonPlaceholder.scss index c9a8c1f794..858fcdecf6 100644 --- a/res/css/views/elements/_ButtonPlaceholder.scss +++ b/res/css/views/elements/_ButtonPlaceholder.scss @@ -1,5 +1,5 @@ /* -Copyright 2017 Vector Creations Ltd +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.