Skip to content

Commit 8596905

Browse files
committed
Merge branch 'develop' into travis/room-list/sticky
2 parents eeac800 + 94f52c4 commit 8596905

File tree

34 files changed

+1889
-559
lines changed

34 files changed

+1889
-559
lines changed

res/css/structures/auth/_CompleteSecurity.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,7 @@ limitations under the License.
9898
}
9999
}
100100
}
101+
102+
.mx_CompleteSecurity_resetText {
103+
padding-top: 20px;
104+
}

res/css/views/dialogs/secretstorage/_CreateSecretStorageDialog.scss

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,42 @@ limitations under the License.
7373
margin-left: 20px;
7474
}
7575

76-
.mx_CreateSecretStorageDialog_recoveryKeyHeader {
77-
margin-bottom: 1em;
78-
}
79-
8076
.mx_CreateSecretStorageDialog_recoveryKeyContainer {
81-
display: flex;
77+
width: 380px;
78+
margin-left: auto;
79+
margin-right: auto;
8280
}
8381

8482
.mx_CreateSecretStorageDialog_recoveryKey {
85-
width: 262px;
83+
font-weight: bold;
84+
text-align: center;
8685
padding: 20px;
8786
color: $info-plinth-fg-color;
8887
background-color: $info-plinth-bg-color;
89-
margin-right: 12px;
88+
border-radius: 6px;
89+
word-spacing: 1em;
90+
margin-bottom: 20px;
9091
}
9192

9293
.mx_CreateSecretStorageDialog_recoveryKeyButtons {
93-
flex: 1;
9494
display: flex;
95+
justify-content: space-between;
9596
align-items: center;
9697
}
9798

9899
.mx_CreateSecretStorageDialog_recoveryKeyButtons .mx_AccessibleButton {
99-
margin-right: 10px;
100+
width: 160px;
101+
padding-left: 0px;
102+
padding-right: 0px;
103+
white-space: nowrap;
100104
}
101105

102-
.mx_CreateSecretStorageDialog_recoveryKeyButtons button {
103-
flex: 1;
104-
white-space: nowrap;
106+
.mx_CreateSecretStorageDialog_continueSpinner {
107+
margin-top: 33px;
108+
text-align: right;
109+
}
110+
111+
.mx_CreateSecretStorageDialog_continueSpinner img {
112+
width: 20px;
113+
height: 20px;
105114
}

res/css/views/elements/_StyledCheckbox.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ limitations under the License.
2525

2626
input[type=checkbox] {
2727
appearance: none;
28+
margin: 0;
29+
padding: 0;
2830

2931
& + label {
3032
display: flex;

res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.scss

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,83 @@ limitations under the License.
4444
padding-right: 5px;
4545
}
4646

47+
.mx_AppearanceUserSettingsTab {
48+
> .mx_SettingsTab_SubHeading {
49+
margin-bottom: 32px;
50+
}
51+
}
52+
53+
.mx_AppearanceUserSettingsTab_themeSection {
54+
$radio-bg-color: $input-darker-bg-color;
55+
color: $primary-fg-color;
56+
57+
> .mx_ThemeSelectors {
58+
display: flex;
59+
flex-direction: row;
60+
flex-wrap: wrap;
61+
62+
margin-top: 4px;
63+
margin-bottom: 30px;
64+
65+
> .mx_RadioButton {
66+
padding: $font-16px;
67+
box-sizing: border-box;
68+
border-radius: 10px;
69+
width: 180px;
70+
71+
background: $radio-bg-color;
72+
opacity: 0.4;
73+
74+
flex-shrink: 1;
75+
flex-grow: 0;
76+
77+
margin-right: 15px;
78+
margin-top: 10px;
79+
80+
font-weight: 600;
81+
color: $muted-fg-color;
82+
83+
> span {
84+
justify-content: center;
85+
}
86+
}
87+
88+
> .mx_RadioButton_enabled {
89+
opacity: 1;
90+
91+
// These colors need to be hardcoded because they don't change with the theme
92+
&.mx_ThemeSelector_light {
93+
background-color: #f3f8fd;
94+
color: #2e2f32;
95+
}
96+
97+
&.mx_ThemeSelector_dark {
98+
background-color: #181b21;
99+
color: #f3f8fd;
100+
101+
> input > div {
102+
border-color: $input-darker-bg-color;
103+
> div {
104+
border-color: $input-darker-bg-color;
105+
}
106+
}
107+
}
108+
109+
&.mx_ThemeSelector_black {
110+
background-color: #000000;
111+
color: #f3f8fd;
112+
113+
> input > div {
114+
border-color: $input-darker-bg-color;
115+
> div {
116+
border-color: $input-darker-bg-color;
117+
}
118+
}
119+
}
120+
}
121+
}
122+
}
123+
47124
.mx_SettingsTab_customFontSizeField {
48125
margin-left: calc($font-16px + 10px);
49126
}

src/CrossSigningManager.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import {encodeBase64} from "matrix-js-sdk/src/crypto/olmlib";
3030
// operation ends.
3131
let secretStorageKeys = {};
3232
let secretStorageBeingAccessed = false;
33+
// Stores the 'passphraseOnly' option for the active storage access operation
34+
let passphraseOnlyOption = null;
3335

3436
function isCachingAllowed() {
3537
return (
@@ -99,6 +101,7 @@ async function getSecretStorageKey({ keys: keyInfos }, ssssItemName) {
99101
const key = await inputToKey(input);
100102
return await MatrixClientPeg.get().checkSecretStorageKey(key, info);
101103
},
104+
passphraseOnly: passphraseOnlyOption,
102105
},
103106
/* className= */ null,
104107
/* isPriorityModal= */ false,
@@ -213,19 +216,27 @@ export async function promptForBackupPassphrase() {
213216
*
214217
* @param {Function} [func] An operation to perform once secret storage has been
215218
* bootstrapped. Optional.
216-
* @param {bool} [forceReset] Reset secret storage even if it's already set up
219+
* @param {object} [opts] Named options
220+
* @param {bool} [opts.forceReset] Reset secret storage even if it's already set up
221+
* @param {object} [opts.withKeys] Map of key ID to key for SSSS keys that the client
222+
* already has available. If a key is not supplied here, the user will be prompted.
223+
* @param {bool} [opts.passphraseOnly] If true, do not prompt for recovery key or to reset keys
217224
*/
218-
export async function accessSecretStorage(func = async () => { }, forceReset = false) {
225+
export async function accessSecretStorage(
226+
func = async () => { }, opts = {},
227+
) {
219228
const cli = MatrixClientPeg.get();
220229
secretStorageBeingAccessed = true;
230+
passphraseOnlyOption = opts.passphraseOnly;
231+
secretStorageKeys = Object.assign({}, opts.withKeys || {});
221232
try {
222-
if (!await cli.hasSecretStorageKey() || forceReset) {
233+
if (!await cli.hasSecretStorageKey() || opts.forceReset) {
223234
// This dialog calls bootstrap itself after guiding the user through
224235
// passphrase creation.
225236
const { finished } = Modal.createTrackedDialogAsync('Create Secret Storage dialog', '',
226237
import("./async-components/views/dialogs/secretstorage/CreateSecretStorageDialog"),
227238
{
228-
force: forceReset,
239+
force: opts.forceReset,
229240
},
230241
null, /* priority = */ false, /* static = */ true,
231242
);
@@ -263,5 +274,6 @@ export async function accessSecretStorage(func = async () => { }, forceReset = f
263274
if (!isCachingAllowed()) {
264275
secretStorageKeys = {};
265276
}
277+
passphraseOnlyOption = null;
266278
}
267279
}

0 commit comments

Comments
 (0)