@nymphjs/tilmeld-components 1.0.0-beta.135 → 1.0.0-beta.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/Account.svelte +144 -142
- package/dist/ChangePassword.svelte +63 -61
- package/dist/Login.svelte +13 -2
- package/dist/Recover.svelte +150 -134
- package/dist/RevokeTokens.svelte +31 -29
- package/dist/TwoFactor.svelte +194 -180
- package/package.json +3 -3
- package/src/Account.svelte +144 -142
- package/src/ChangePassword.svelte +63 -61
- package/src/Login.svelte +13 -2
- package/src/Recover.svelte +150 -134
- package/src/RevokeTokens.svelte +31 -29
- package/src/TwoFactor.svelte +194 -180
package/dist/Recover.svelte
CHANGED
|
@@ -28,98 +28,76 @@
|
|
|
28
28
|
{#if successRecoveredMessage}
|
|
29
29
|
{successRecoveredMessage}
|
|
30
30
|
{:else}
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
<form
|
|
32
|
+
onsubmit={preventDefault(
|
|
33
|
+
stopPropagation(() => {
|
|
34
|
+
if (!successRecoveredMessage) {
|
|
35
|
+
if (!hasSentSecret) {
|
|
36
|
+
sendRecovery();
|
|
37
|
+
} else {
|
|
38
|
+
recover();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
{#if !hasSentSecret}
|
|
45
|
+
{#if !$clientConfig.emailUsernames}
|
|
46
|
+
<div>
|
|
47
|
+
<FormField style="margin-right: 1em;">
|
|
48
|
+
<Radio
|
|
49
|
+
bind:group={recoveryType}
|
|
50
|
+
value="password"
|
|
51
|
+
{...prefixFilter(restProps, 'recoveryTypePassword$')}
|
|
52
|
+
/>
|
|
53
|
+
{#snippet label()}
|
|
54
|
+
I don't know my password.
|
|
55
|
+
{/snippet}
|
|
56
|
+
</FormField>
|
|
57
|
+
<FormField style="margin-right: 1em;">
|
|
58
|
+
<Radio
|
|
59
|
+
bind:group={recoveryType}
|
|
60
|
+
value="username"
|
|
61
|
+
{...prefixFilter(restProps, 'recoveryTypeUsername$')}
|
|
62
|
+
/>
|
|
63
|
+
{#snippet label()}
|
|
64
|
+
I don't know my username.
|
|
65
|
+
{/snippet}
|
|
66
|
+
</FormField>
|
|
67
|
+
</div>
|
|
65
68
|
{/if}
|
|
66
|
-
{#if recoveryType === 'username'}
|
|
67
|
-
<p>
|
|
68
|
-
To get your username, type your email as you entered it when
|
|
69
|
-
creating your account.
|
|
70
|
-
</p>
|
|
71
|
-
{/if}
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div>
|
|
75
|
-
<Textfield
|
|
76
|
-
bind:this={accountElem}
|
|
77
|
-
bind:value={account}
|
|
78
|
-
label={$clientConfig.emailUsernames || recoveryType === 'username'
|
|
79
|
-
? 'Email Address'
|
|
80
|
-
: 'Username'}
|
|
81
|
-
type={$clientConfig.emailUsernames || recoveryType === 'username'
|
|
82
|
-
? 'email'
|
|
83
|
-
: 'text'}
|
|
84
|
-
input$autocomplete={$clientConfig.emailUsernames ||
|
|
85
|
-
recoveryType === 'username'
|
|
86
|
-
? 'email'
|
|
87
|
-
: 'username'}
|
|
88
|
-
input$autocapitalize="off"
|
|
89
|
-
input$spellcheck="false"
|
|
90
|
-
{...prefixFilter(restProps, 'account$')}
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
69
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
70
|
+
<div>
|
|
71
|
+
{#if recoveryType === 'password'}
|
|
72
|
+
<p>
|
|
73
|
+
To reset your password, type the {$clientConfig.emailUsernames
|
|
74
|
+
? 'email'
|
|
75
|
+
: 'username'}
|
|
76
|
+
you use to sign in below.
|
|
77
|
+
</p>
|
|
78
|
+
{/if}
|
|
79
|
+
{#if recoveryType === 'username'}
|
|
80
|
+
<p>
|
|
81
|
+
To get your username, type your email as you entered it when
|
|
82
|
+
creating your account.
|
|
83
|
+
</p>
|
|
84
|
+
{/if}
|
|
103
85
|
</div>
|
|
104
|
-
{/if}
|
|
105
|
-
{:else}
|
|
106
|
-
<div>
|
|
107
|
-
<p {...prefixFilter(restProps, 'codeSentMessage$')}>
|
|
108
|
-
A code has been sent to you by email. Enter that code here, and a
|
|
109
|
-
new password for your account.
|
|
110
|
-
</p>
|
|
111
|
-
</div>
|
|
112
86
|
|
|
113
|
-
{#if hasSentSecret === 1}
|
|
114
87
|
<div>
|
|
115
88
|
<Textfield
|
|
116
89
|
bind:this={accountElem}
|
|
117
90
|
bind:value={account}
|
|
118
|
-
label={$clientConfig.emailUsernames
|
|
91
|
+
label={$clientConfig.emailUsernames ||
|
|
92
|
+
recoveryType === 'username'
|
|
119
93
|
? 'Email Address'
|
|
120
94
|
: 'Username'}
|
|
121
|
-
type={$clientConfig.emailUsernames
|
|
122
|
-
|
|
95
|
+
type={$clientConfig.emailUsernames ||
|
|
96
|
+
recoveryType === 'username'
|
|
97
|
+
? 'email'
|
|
98
|
+
: 'text'}
|
|
99
|
+
input$autocomplete={$clientConfig.emailUsernames ||
|
|
100
|
+
recoveryType === 'username'
|
|
123
101
|
? 'email'
|
|
124
102
|
: 'username'}
|
|
125
103
|
input$autocapitalize="off"
|
|
@@ -127,64 +105,102 @@
|
|
|
127
105
|
{...prefixFilter(restProps, 'account$')}
|
|
128
106
|
/>
|
|
129
107
|
</div>
|
|
130
|
-
{/if}
|
|
131
108
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
109
|
+
{#if recoveryType === 'password'}
|
|
110
|
+
<div class="tilmeld-recover-action">
|
|
111
|
+
<a
|
|
112
|
+
href={'javascript:void(0);'}
|
|
113
|
+
onclick={() => (hasSentSecret = 1)}
|
|
114
|
+
{...prefixFilter(restProps, 'alreadyGotCodeLink$')}
|
|
115
|
+
>
|
|
116
|
+
Already Got a Code?
|
|
117
|
+
</a>
|
|
118
|
+
</div>
|
|
119
|
+
{/if}
|
|
120
|
+
{:else}
|
|
121
|
+
<div>
|
|
122
|
+
<p {...prefixFilter(restProps, 'codeSentMessage$')}>
|
|
123
|
+
A code has been sent to you by email. Enter that code here, and
|
|
124
|
+
a new password for your account.
|
|
125
|
+
</p>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{#if hasSentSecret === 1}
|
|
129
|
+
<div>
|
|
130
|
+
<Textfield
|
|
131
|
+
bind:this={accountElem}
|
|
132
|
+
bind:value={account}
|
|
133
|
+
label={$clientConfig.emailUsernames
|
|
134
|
+
? 'Email Address'
|
|
135
|
+
: 'Username'}
|
|
136
|
+
type={$clientConfig.emailUsernames ? 'email' : 'text'}
|
|
137
|
+
input$autocomplete={$clientConfig.emailUsernames
|
|
138
|
+
? 'email'
|
|
139
|
+
: 'username'}
|
|
140
|
+
input$autocapitalize="off"
|
|
141
|
+
input$spellcheck="false"
|
|
142
|
+
{...prefixFilter(restProps, 'account$')}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
{/if}
|
|
141
146
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
<div>
|
|
148
|
+
<Textfield
|
|
149
|
+
bind:value={secret}
|
|
150
|
+
label="Recovery Code"
|
|
151
|
+
type="text"
|
|
152
|
+
input$autocomplete="one-time-code"
|
|
153
|
+
{...prefixFilter(restProps, 'recoveryCode$')}
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
151
156
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
<div>
|
|
158
|
+
<Textfield
|
|
159
|
+
bind:value={password}
|
|
160
|
+
label="Password"
|
|
161
|
+
type="password"
|
|
162
|
+
input$autocomplete="new-password"
|
|
163
|
+
{...prefixFilter(restProps, 'password$')}
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
161
166
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
{/if}
|
|
167
|
+
<div>
|
|
168
|
+
<Textfield
|
|
169
|
+
bind:value={password2}
|
|
170
|
+
label="Re-enter Password"
|
|
171
|
+
type="password"
|
|
172
|
+
input$autocomplete="new-password"
|
|
173
|
+
{...prefixFilter(restProps, 'password2$')}
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
172
176
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
<div class="tilmeld-recover-action">
|
|
178
|
+
<a
|
|
179
|
+
href={'javascript:void(0);'}
|
|
180
|
+
onclick={() => (hasSentSecret = false)}
|
|
181
|
+
{...prefixFilter(restProps, 'needCodeLink$')}
|
|
182
|
+
>
|
|
183
|
+
Need a New Code?
|
|
184
|
+
</a>
|
|
185
|
+
</div>
|
|
186
|
+
{/if}
|
|
178
187
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
{#if failureMessage}
|
|
189
|
+
<div class="tilmeld-recover-failure">
|
|
190
|
+
{failureMessage}
|
|
191
|
+
</div>
|
|
192
|
+
{/if}
|
|
193
|
+
|
|
194
|
+
{#if loading}
|
|
195
|
+
<div class="tilmeld-recover-loading">
|
|
196
|
+
<CircularProgress
|
|
197
|
+
style="height: 24px; width: 24px;"
|
|
198
|
+
indeterminate
|
|
199
|
+
{...prefixFilter(restProps, 'progress$')}
|
|
200
|
+
/>
|
|
201
|
+
</div>
|
|
202
|
+
{/if}
|
|
203
|
+
</form>
|
|
188
204
|
{/if}
|
|
189
205
|
</Content>
|
|
190
206
|
<Actions>
|
package/dist/RevokeTokens.svelte
CHANGED
|
@@ -17,38 +17,40 @@
|
|
|
17
17
|
<!-- Title cannot contain leading whitespace due to mdc-typography-baseline-top() -->
|
|
18
18
|
<Title id="tilmeld-revoke-tokens-title">{title}</Title>
|
|
19
19
|
<Content id="tilmeld-revoke-tokens-content">
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<div style="margin-top: 1em;">
|
|
25
|
-
<Textfield
|
|
26
|
-
bind:value={password}
|
|
27
|
-
label="Password"
|
|
28
|
-
type="password"
|
|
29
|
-
style="width: 100%;"
|
|
30
|
-
input$autocomplete="current-password"
|
|
31
|
-
{...prefixFilter(restProps, 'password$')}
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
{@render additional?.()}
|
|
36
|
-
|
|
37
|
-
{#if failureMessage}
|
|
38
|
-
<div class="tilmeld-revoke-tokens-failure">
|
|
39
|
-
{failureMessage}
|
|
20
|
+
<form onsubmit={preventDefault(stopPropagation(revokeTokens))}>
|
|
21
|
+
<div>
|
|
22
|
+
{description}
|
|
40
23
|
</div>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
24
|
+
|
|
25
|
+
<div style="margin-top: 1em;">
|
|
26
|
+
<Textfield
|
|
27
|
+
bind:value={password}
|
|
28
|
+
label="Password"
|
|
29
|
+
type="password"
|
|
30
|
+
style="width: 100%;"
|
|
31
|
+
input$autocomplete="current-password"
|
|
32
|
+
{...prefixFilter(restProps, 'password$')}
|
|
49
33
|
/>
|
|
50
34
|
</div>
|
|
51
|
-
|
|
35
|
+
|
|
36
|
+
{@render additional?.()}
|
|
37
|
+
|
|
38
|
+
{#if failureMessage}
|
|
39
|
+
<div class="tilmeld-revoke-tokens-failure">
|
|
40
|
+
{failureMessage}
|
|
41
|
+
</div>
|
|
42
|
+
{/if}
|
|
43
|
+
|
|
44
|
+
{#if loading}
|
|
45
|
+
<div class="tilmeld-revoke-tokens-loading">
|
|
46
|
+
<CircularProgress
|
|
47
|
+
style="height: 24px; width: 24px;"
|
|
48
|
+
indeterminate
|
|
49
|
+
{...prefixFilter(restProps, 'progress$')}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
{/if}
|
|
53
|
+
</form>
|
|
52
54
|
</Content>
|
|
53
55
|
<Actions>
|
|
54
56
|
<Button disabled={loading} {...prefixFilter(restProps, 'closeButton$')}>
|