Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Support for login + E2EE set up with QR #9403

Merged
merged 80 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
85cfabc
Support for login + E2EE set up with QR
hughns Oct 12, 2022
ee6df88
Whitespace
hughns Oct 12, 2022
b4222dc
Padding
hughns Oct 12, 2022
0ae60e4
Refactor of fetch
hughns Oct 12, 2022
b5040db
Whitespace
hughns Oct 12, 2022
2789ace
CSS whitespace
hughns Oct 12, 2022
80fef38
Add link to MSC3906
hughns Oct 13, 2022
d97e8a3
Handle incorrect typing in MatrixClientPeg.get()
hughns Oct 13, 2022
5709df6
Use unstable class name
hughns Oct 13, 2022
93b2b6e
fix: use unstable class name
hughns Oct 13, 2022
ac38955
Use default fetch client instead
hughns Oct 13, 2022
8f647e2
Update to revised function name
hughns Oct 13, 2022
996a9cf
Refactor device manager panel and make it work with new sessions manager
hughns Oct 14, 2022
9e505f7
Lint fix
hughns Oct 14, 2022
42a2ec1
Add missing interstitials and update wording
hughns Oct 14, 2022
2c3df97
Linting
hughns Oct 14, 2022
209ce5a
Merge branch 'develop' into hughns/login-with-qr
hughns Oct 14, 2022
ae8a010
i18n
hughns Oct 14, 2022
073f52c
Lint
hughns Oct 14, 2022
fd1aeb3
Use sensible sdk config name for fallback server
hughns Oct 14, 2022
53d14a6
Improve error handling for QR code generation
hughns Oct 14, 2022
87adf05
Refactor feature availability logic
hughns Oct 14, 2022
d31026f
Hide device manager panel if no options available
hughns Oct 14, 2022
f0400f7
Put sign in with QR behind lab setting
hughns Oct 14, 2022
eb88f78
Reduce scope of PR to just showing code on existing device
hughns Oct 15, 2022
3abcaf0
i18n updates
hughns Oct 15, 2022
5142dbc
Handle null features
hughns Oct 15, 2022
ae77a1a
Testing for LoginWithQRSection
hughns Oct 16, 2022
4683d42
Refactor to handle UIA
hughns Oct 16, 2022
1135d3c
Imports
hughns Oct 16, 2022
207cba3
Reduce diff complexity
hughns Oct 16, 2022
d96106b
Remove unnecessary change
hughns Oct 16, 2022
e2ff60f
Remove unused styles
hughns Oct 16, 2022
987bdc5
Support UIA
hughns Oct 16, 2022
18a943e
Tidy up
hughns Oct 16, 2022
f688104
i18n
hughns Oct 16, 2022
20f31ca
Remove additional unused parts of flow
hughns Oct 16, 2022
cbfc1d9
Add extra instruction when showing QR code
hughns Oct 16, 2022
2711538
Add getVersions to server mocks
hughns Oct 16, 2022
e7057b4
Use proper colours for theme support
hughns Oct 16, 2022
d3cda5b
Test cases
hughns Oct 16, 2022
3dcbdd6
Lint
hughns Oct 16, 2022
58dd76a
Merge branch 'develop' into hughns/login-with-qr
hughns Oct 16, 2022
b3d135e
Remove obsolete snapshot
hughns Oct 16, 2022
eed649b
Don't override error if already set
hughns Oct 16, 2022
f103cfd
Remove unused var
hughns Oct 17, 2022
9133206
Update src/components/views/settings/devices/LoginWithQRSection.tsx
hughns Oct 17, 2022
7187f89
Update src/components/views/auth/LoginWithQR.tsx
hughns Oct 17, 2022
e2b9a7f
Update src/components/views/auth/LoginWithQR.tsx
hughns Oct 17, 2022
16a8904
Update src/components/views/auth/LoginWithQR.tsx
hughns Oct 17, 2022
0704865
Update src/components/views/auth/LoginWithQR.tsx
hughns Oct 17, 2022
49fd8f5
Update src/components/views/auth/LoginWithQR.tsx
hughns Oct 17, 2022
1b003f5
Update res/css/views/auth/_LoginWithQR.pcss
hughns Oct 17, 2022
212cd74
Use spacing variables
hughns Oct 17, 2022
0a74bf3
Remove debug
hughns Oct 17, 2022
d9096c4
Style + docs
hughns Oct 17, 2022
782c714
preventDefault
hughns Oct 17, 2022
c8ddbe8
Names of tests
hughns Oct 17, 2022
55d0757
Fixes for js-sdk refactor
hughns Oct 17, 2022
4e28514
Merge branch 'develop' into hughns/login-with-qr
hughns Oct 17, 2022
a48a458
Update snapshots to match test names
hughns Oct 18, 2022
b5e181c
Refactor labs config to make deployment simpler
hughns Oct 18, 2022
25f8bcf
i18n
hughns Oct 18, 2022
479a6e1
Unused imports
hughns Oct 18, 2022
2fa8bc0
Typo
hughns Oct 18, 2022
0794cff
Stateless component
hughns Oct 18, 2022
c6e0628
Whitespace
hughns Oct 18, 2022
343974f
Use context not MatrixClientPeg
hughns Oct 18, 2022
710edf9
Add missing context
hughns Oct 18, 2022
d8c94f2
Type updates to match js-sdk
hughns Oct 18, 2022
984bf72
Wrap click handlers in useCallback
hughns Oct 18, 2022
4e417ad
Update src/components/views/settings/DevicesPanel.tsx
hughns Oct 19, 2022
6b682b5
Wait for DOM update instead of timeout
hughns Oct 19, 2022
4703541
Merge branch 'develop' into hughns/login-with-qr
Oct 19, 2022
c22479c
Add missing snapshot update from last commit
hughns Oct 19, 2022
edbe559
Remove void keyword in favour of then() clauses
hughns Oct 19, 2022
9c7cb2a
Merge branch 'hughns/login-with-qr' of https://github.com/matrix-org/…
hughns Oct 19, 2022
c7532d9
test main paths in LoginWithQR
Oct 19, 2022
f1f621e
Merge branch 'develop' into hughns/login-with-qr
Oct 19, 2022
5de0f4c
Merge branch 'develop' into hughns/login-with-qr
Oct 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
@import "./views/auth/_CountryDropdown.pcss";
@import "./views/auth/_InteractiveAuthEntryComponents.pcss";
@import "./views/auth/_LanguageSelector.pcss";
@import "./views/auth/_LoginWithQR.pcss";
@import "./views/auth/_PassphraseField.pcss";
@import "./views/auth/_Welcome.pcss";
@import "./views/avatars/_BaseAvatar.pcss";
Expand Down
171 changes: 171 additions & 0 deletions res/css/views/auth/_LoginWithQR.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/*
Copyright 2022 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.
*/

.mx_LoginWithQRSection .mx_AccessibleButton {
margin-right: $spacing-12;
}

.mx_AuthPage .mx_LoginWithQR {
.mx_AccessibleButton {
display: block !important;
}

.mx_AccessibleButton + .mx_AccessibleButton {
margin-top: $spacing-8;
}

.mx_LoginWithQR_separator {
display: flex;
align-items: center;
text-align: center;

&::before, &::after {
content: '';
flex: 1;
border-bottom: 1px solid $quinary-content;
}

&:not(:empty) {
&::before {
margin-right: 1em;
}
&::after {
margin-left: 1em;
}
}
}

font-size: $font-15px;
}

.mx_UserSettingsDialog .mx_LoginWithQR {
.mx_AccessibleButton + .mx_AccessibleButton {
margin-left: $spacing-12;
}

font-size: $font-14px;

h1 {
font-size: $font-24px;
margin-bottom: 0;
}

li {
line-height: 1.8;
}

.mx_QRCode {
padding: $spacing-12 $spacing-40;
margin: $spacing-28 0;
}

.mx_LoginWithQR_buttons {
text-align: center;
}

.mx_LoginWithQR_qrWrapper {
display: flex;
}
}

.mx_LoginWithQR {
min-height: 350px;
display: flex;
flex-direction: column;

.mx_LoginWithQR_centreTitle {
h1 {
text-align: centre;
}
}

h1 > svg {
&.normal {
color: $secondary-content;
}
&.error {
color: $alert;
}
&.success {
color: $accent;
}
height: 1.3em;
margin-right: $spacing-8;
vertical-align: middle;
}

.mx_LoginWithQR_confirmationDigits {
text-align: center;
margin: $spacing-48 auto;
font-weight: 600;
font-size: $font-24px;
color: $primary-content;
}

.mx_LoginWithQR_confirmationAlert {
border: 1px solid $quaternary-content;
border-radius: $spacing-8;
padding: $spacing-8;
line-height: 1.5em;
display: flex;

svg {
height: 30px;
}
}

.mx_LoginWithQR_separator {
margin: 1em 0;
}

ol {
list-style-position: inside;
padding-inline-start: 0;

li::marker {
color: $accent;
}
}

.mx_LoginWithQR_BackButton {
height: $spacing-12;
margin-bottom: $spacing-24;
svg {
height: 100%;
}
}

.mx_LoginWithQR_main {
display: flex;
flex-direction: column;
flex-grow: 1;
}

.mx_QRCode {
border: 1px solid $quinary-content;
border-radius: $spacing-8;
display: flex;
justify-content: center;
}

.mx_LoginWithQR_spinner {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
}
3 changes: 3 additions & 0 deletions res/img/element-icons/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions res/img/element-icons/devices.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions res/img/element-icons/qrcode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading