pwa-auth 3.4.8 → 3.5.1
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/LICENSES.txt +36 -15
- package/README.md +547 -311
- package/base/api/drawer.d.ts +4 -0
- package/base/api/drawer.d.ts.map +1 -0
- package/base/api/drawer.js +12 -0
- package/base/api/drawer.js.map +1 -0
- package/base/api/user.d.ts +4 -0
- package/base/api/user.d.ts.map +1 -0
- package/base/api/user.js +25 -0
- package/base/api/user.js.map +1 -0
- package/base/api/verify.d.ts +4 -0
- package/base/api/verify.d.ts.map +1 -0
- package/base/api/verify.js +113 -0
- package/base/api/verify.js.map +1 -0
- package/base/deprecated/email-changed.d.ts +5 -0
- package/base/deprecated/email-changed.d.ts.map +1 -0
- package/base/deprecated/email-changed.js +9 -0
- package/base/deprecated/email-changed.js.map +1 -0
- package/base/events/emit.d.ts +12 -0
- package/base/events/emit.d.ts.map +1 -0
- package/base/events/emit.js +30 -0
- package/base/events/emit.js.map +1 -0
- package/base/events/names.d.ts +31 -0
- package/base/events/names.d.ts.map +1 -0
- package/base/events/names.js +31 -0
- package/base/events/names.js.map +1 -0
- package/base/events/types.d.ts +71 -0
- package/base/events/types.d.ts.map +1 -0
- package/base/events/types.js +2 -0
- package/base/events/types.js.map +1 -0
- package/base/export/pwa-auth.d.ts +17 -7
- package/base/export/pwa-auth.d.ts.map +1 -0
- package/base/export/pwa-auth.js +13 -7
- package/base/export/pwa-auth.js.map +1 -1
- package/base/firebase/attribute.d.ts +2 -0
- package/base/firebase/attribute.d.ts.map +1 -0
- package/base/firebase/attribute.js +17 -0
- package/base/firebase/attribute.js.map +1 -0
- package/base/firebase/authentication.d.ts +21 -10
- package/base/firebase/authentication.d.ts.map +1 -0
- package/base/firebase/authentication.js +65 -8
- package/base/firebase/authentication.js.map +1 -1
- package/base/firebase/interface.d.ts +7 -1
- package/base/firebase/interface.d.ts.map +1 -0
- package/base/firebase/interface.js +99 -68
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts +2 -0
- package/base/firebase/message.d.ts.map +1 -0
- package/base/firebase/message.js +34 -0
- package/base/firebase/message.js.map +1 -0
- package/base/firebase/password.d.ts +11 -0
- package/base/firebase/password.d.ts.map +1 -0
- package/base/firebase/password.js +16 -0
- package/base/firebase/password.js.map +1 -0
- package/base/lazyLoader.d.ts +1 -0
- package/base/lazyLoader.d.ts.map +1 -0
- package/base/redux/backend.d.ts +1 -0
- package/base/redux/backend.d.ts.map +1 -0
- package/base/redux/backend.js +1 -1
- package/base/redux/backend.js.map +1 -1
- package/base/redux/frontend.d.ts +16 -1
- package/base/redux/frontend.d.ts.map +1 -0
- package/base/redux/frontend.js +6 -3
- package/base/redux/frontend.js.map +1 -1
- package/base/store.d.ts +1 -6
- package/base/store.d.ts.map +1 -0
- package/base/store.js +2 -4
- package/base/store.js.map +1 -1
- package/base/webcomponents/css/animation.d.ts +1 -0
- package/base/webcomponents/css/animation.d.ts.map +1 -0
- package/base/webcomponents/css/animation.js +79 -67
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/css/svg.d.ts +1 -2
- package/base/webcomponents/css/svg.d.ts.map +1 -0
- package/base/webcomponents/css/svg.js +2 -4
- package/base/webcomponents/css/svg.js.map +1 -1
- package/base/webcomponents/css/tap.d.ts +3 -0
- package/base/webcomponents/css/tap.d.ts.map +1 -0
- package/base/webcomponents/css/tap.js +9 -0
- package/base/webcomponents/css/tap.js.map +1 -0
- package/base/webcomponents/css/toggle.d.ts +1 -0
- package/base/webcomponents/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/css/toggle.js +5 -5
- package/base/webcomponents/drawer/css/drawer.d.ts +1 -0
- package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/drawer.js +101 -74
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/css/exit.d.ts +1 -0
- package/base/webcomponents/drawer/css/exit.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/exit.js +58 -52
- package/base/webcomponents/drawer/css/exit.js.map +1 -1
- package/base/webcomponents/drawer/css/link.d.ts +1 -0
- package/base/webcomponents/drawer/css/link.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/link.js +9 -10
- package/base/webcomponents/drawer/css/link.js.map +1 -1
- package/base/webcomponents/drawer/css/paragraph.d.ts +1 -0
- package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/paragraph.js +37 -20
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +21 -7
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/drawer.js +292 -90
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/drawer/keys.d.ts +4 -0
- package/base/webcomponents/drawer/keys.d.ts.map +1 -0
- package/base/webcomponents/drawer/keys.js +57 -0
- package/base/webcomponents/drawer/keys.js.map +1 -0
- package/base/webcomponents/form/css/button.d.ts +1 -0
- package/base/webcomponents/form/css/button.d.ts.map +1 -0
- package/base/webcomponents/form/css/button.js +69 -51
- package/base/webcomponents/form/css/button.js.map +1 -1
- package/base/webcomponents/form/css/input.d.ts +1 -0
- package/base/webcomponents/form/css/input.d.ts.map +1 -0
- package/base/webcomponents/form/css/input.js +22 -21
- package/base/webcomponents/form/css/input.js.map +1 -1
- package/base/webcomponents/form/css/label.d.ts +1 -0
- package/base/webcomponents/form/css/label.d.ts.map +1 -0
- package/base/webcomponents/form/css/label.js +22 -21
- package/base/webcomponents/form/css/label.js.map +1 -1
- package/base/webcomponents/form/css/list.d.ts +1 -0
- package/base/webcomponents/form/css/list.d.ts.map +1 -0
- package/base/webcomponents/form/css/list.js +19 -19
- package/base/webcomponents/form/css/notice.d.ts +3 -0
- package/base/webcomponents/form/css/notice.d.ts.map +1 -0
- package/base/webcomponents/form/css/notice.js +20 -0
- package/base/webcomponents/form/css/notice.js.map +1 -0
- package/base/webcomponents/form/css/status.d.ts +4 -0
- package/base/webcomponents/form/css/status.d.ts.map +1 -0
- package/base/webcomponents/form/css/status.js +44 -0
- package/base/webcomponents/form/css/status.js.map +1 -0
- package/base/webcomponents/form/css/toggle.d.ts +1 -0
- package/base/webcomponents/form/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/form/css/toggle.js +43 -17
- package/base/webcomponents/form/css/toggle.js.map +1 -1
- package/base/webcomponents/form/draft.d.ts +5 -0
- package/base/webcomponents/form/draft.d.ts.map +1 -0
- package/base/webcomponents/form/draft.js +22 -0
- package/base/webcomponents/form/draft.js.map +1 -0
- package/base/webcomponents/form/forgot.d.ts +26 -3
- package/base/webcomponents/form/forgot.d.ts.map +1 -0
- package/base/webcomponents/form/forgot.js +297 -30
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/letters.d.ts +3 -0
- package/base/webcomponents/form/letters.d.ts.map +1 -0
- package/base/webcomponents/form/letters.js +21 -0
- package/base/webcomponents/form/letters.js.map +1 -0
- package/base/webcomponents/form/login.d.ts +10 -0
- package/base/webcomponents/form/login.d.ts.map +1 -0
- package/base/webcomponents/form/login.js +221 -89
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/notice.d.ts +4 -0
- package/base/webcomponents/form/notice.d.ts.map +1 -0
- package/base/webcomponents/form/notice.js +14 -0
- package/base/webcomponents/form/notice.js.map +1 -0
- package/base/webcomponents/form/reveal.d.ts +3 -0
- package/base/webcomponents/form/reveal.d.ts.map +1 -0
- package/base/webcomponents/form/reveal.js +14 -0
- package/base/webcomponents/form/reveal.js.map +1 -0
- package/base/webcomponents/form/signup.d.ts +8 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -0
- package/base/webcomponents/form/signup.js +201 -100
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/form/verified.d.ts +3 -0
- package/base/webcomponents/form/verified.d.ts.map +1 -0
- package/base/webcomponents/form/verified.js +45 -0
- package/base/webcomponents/form/verified.js.map +1 -0
- package/base/webcomponents/icon/css/icon.d.ts +1 -0
- package/base/webcomponents/icon/css/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/css/icon.js +63 -49
- package/base/webcomponents/icon/css/icon.js.map +1 -1
- package/base/webcomponents/icon/icon.d.ts +6 -4
- package/base/webcomponents/icon/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/icon.js +48 -27
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +1 -0
- package/base/webcomponents/login/css/auth.d.ts.map +1 -0
- package/base/webcomponents/login/css/auth.js +37 -36
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/css/link.d.ts +1 -0
- package/base/webcomponents/login/css/link.d.ts.map +1 -0
- package/base/webcomponents/login/css/link.js +9 -10
- package/base/webcomponents/login/css/link.js.map +1 -1
- package/base/webcomponents/login/css/paragraph.d.ts +1 -0
- package/base/webcomponents/login/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/login/css/paragraph.js +8 -8
- package/base/webcomponents/login/page.d.ts +10 -6
- package/base/webcomponents/login/page.d.ts.map +1 -0
- package/base/webcomponents/login/page.js +96 -55
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -0
- package/base/webcomponents/settings/css/navigation.d.ts.map +1 -0
- package/base/webcomponents/settings/css/navigation.js +78 -68
- package/base/webcomponents/settings/css/navigation.js.map +1 -1
- package/base/webcomponents/settings/input/delete.d.ts +7 -6
- package/base/webcomponents/settings/input/delete.d.ts.map +1 -0
- package/base/webcomponents/settings/input/delete.js +135 -47
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +7 -5
- package/base/webcomponents/settings/input/email.d.ts.map +1 -0
- package/base/webcomponents/settings/input/email.js +155 -50
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.d.ts +8 -5
- package/base/webcomponents/settings/input/name.d.ts.map +1 -0
- package/base/webcomponents/settings/input/name.js +116 -53
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.d.ts +8 -5
- package/base/webcomponents/settings/input/password.d.ts.map +1 -0
- package/base/webcomponents/settings/input/password.js +200 -103
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +8 -6
- package/base/webcomponents/settings/input/uploader.d.ts.map +1 -0
- package/base/webcomponents/settings/input/uploader.js +209 -170
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/input/verify.d.ts +64 -0
- package/base/webcomponents/settings/input/verify.d.ts.map +1 -0
- package/base/webcomponents/settings/input/verify.js +272 -0
- package/base/webcomponents/settings/input/verify.js.map +1 -0
- package/base/webcomponents/settings/settings.d.ts +15 -10
- package/base/webcomponents/settings/settings.d.ts.map +1 -0
- package/base/webcomponents/settings/settings.js +226 -146
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/firebase.md +107 -0
- package/intro.md +19 -0
- package/license +21 -21
- package/package.json +116 -85
- package/source/pwa-auth.js +1097 -404
- package/source/pwa-styles.css +50 -68
- package/base/redux/drawer.d.ts +0 -17
- package/base/redux/drawer.js +0 -22
- package/base/redux/drawer.js.map +0 -1
- package/demonstration/index.html +0 -99
- package/demonstration/pwa-styles.css +0 -77
- package/demonstration/styles.css +0 -77
- package/source/THIRD_PARTY_LICENSES.txt +0 -303
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { LitElement, css, html } from 'lit';
|
|
11
|
+
import { state } from 'lit/decorators.js';
|
|
12
|
+
import { connect } from 'pwa-helpers';
|
|
13
|
+
import store from '../../../store.js';
|
|
14
|
+
import { sendVerification } from '../../../api/verify.js';
|
|
15
|
+
import { userMessage } from '../../../firebase/message.js';
|
|
16
|
+
import { buttonStyle } from '../../form/css/button.js';
|
|
17
|
+
import { tapStyle } from '../../css/tap.js';
|
|
18
|
+
import { verifiedMark, verifiedStyle } from '../../form/verified.js';
|
|
19
|
+
const verifyWait = 45;
|
|
20
|
+
const sentMessage = 'Check your inbox for the verification email.';
|
|
21
|
+
export class EmailVerify extends connect(store)(LitElement) {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.login = false;
|
|
25
|
+
this.verified = false;
|
|
26
|
+
this.email = '';
|
|
27
|
+
this.status = '';
|
|
28
|
+
this.tone = '';
|
|
29
|
+
this.busy = false;
|
|
30
|
+
this.cooldown = 0;
|
|
31
|
+
this.timer = 0;
|
|
32
|
+
this.resend = async (event) => {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
if (this.busy || this.cooldown > 0 || this.verified)
|
|
35
|
+
return;
|
|
36
|
+
this.busy = true;
|
|
37
|
+
this.tone = '';
|
|
38
|
+
this.status = '';
|
|
39
|
+
try {
|
|
40
|
+
const sent = await sendVerification();
|
|
41
|
+
if (sent)
|
|
42
|
+
this.showSent();
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
this.showFirebase(error);
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
this.busy = false;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.clearWait();
|
|
54
|
+
super.disconnectedCallback();
|
|
55
|
+
}
|
|
56
|
+
stateChanged(state) {
|
|
57
|
+
this.login = Boolean(state.frontend?.login);
|
|
58
|
+
this.verified = Boolean(state.backend?.verified);
|
|
59
|
+
this.email = state.backend?.email ?? '';
|
|
60
|
+
this.hidden = !this.login;
|
|
61
|
+
if (this.verified)
|
|
62
|
+
this.clearWait();
|
|
63
|
+
}
|
|
64
|
+
static get styles() {
|
|
65
|
+
return [
|
|
66
|
+
buttonStyle,
|
|
67
|
+
tapStyle,
|
|
68
|
+
verifiedStyle,
|
|
69
|
+
css `
|
|
70
|
+
|
|
71
|
+
:host { display: block; }
|
|
72
|
+
|
|
73
|
+
.notice {
|
|
74
|
+
margin: 4px 16px 8px;
|
|
75
|
+
padding: 14px 16px 16px;
|
|
76
|
+
color: var(--pwa_label_text_color, #1c2430);
|
|
77
|
+
background: var(--pwa_nav_on_background, #f3efe6);
|
|
78
|
+
border: 1px solid var(--pwa_line_color, #e3daca);
|
|
79
|
+
border-radius: 10px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.lead {
|
|
83
|
+
margin: 0;
|
|
84
|
+
font-size: 0.95rem;
|
|
85
|
+
line-height: 1.45;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.row {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
gap: 8px;
|
|
93
|
+
flex-wrap: wrap;
|
|
94
|
+
margin: 0 0 8px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mail {
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
overflow-wrap: anywhere;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.notice.ok {
|
|
103
|
+
color: var(--pwa_action_background_color, #2a6b45);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Required - live region stays in the tree. Idle layout stays put. */
|
|
107
|
+
.status {
|
|
108
|
+
margin: 8px 0 0;
|
|
109
|
+
color: var(--pwa_label_text_color, #1c2430);
|
|
110
|
+
font-size: 0.95rem;
|
|
111
|
+
line-height: 1.4;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.status:not(.on) {
|
|
115
|
+
position: absolute;
|
|
116
|
+
width: 1px;
|
|
117
|
+
height: 1px;
|
|
118
|
+
padding: 0;
|
|
119
|
+
margin: -1px;
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
clip: rect(0, 0, 0, 0);
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
border: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.status.error { color: var(--pwa_close_color, #9a3b32); }
|
|
127
|
+
|
|
128
|
+
.status:focus { outline: 0; }
|
|
129
|
+
|
|
130
|
+
.status:focus-visible {
|
|
131
|
+
outline: 2px solid var(--pwa_action_border_color, #214f34);
|
|
132
|
+
outline-offset: 2px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
button.action-button {
|
|
136
|
+
display: inline-block;
|
|
137
|
+
margin: 12px 0 0;
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
button.action-button:disabled {
|
|
142
|
+
cursor: default;
|
|
143
|
+
opacity: 0.72;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
`
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
lead() {
|
|
150
|
+
if (this.email)
|
|
151
|
+
return `${this.email} is not verified yet. You can still sign in.`;
|
|
152
|
+
return 'This email is not verified yet. You can still sign in.';
|
|
153
|
+
}
|
|
154
|
+
buttonLabel() {
|
|
155
|
+
if (this.busy)
|
|
156
|
+
return 'Sending…';
|
|
157
|
+
if (this.cooldown > 0)
|
|
158
|
+
return `Send again in ${this.cooldown}s`;
|
|
159
|
+
return 'Resend verification email';
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
if (!this.login)
|
|
163
|
+
return html ``;
|
|
164
|
+
if (this.verified) {
|
|
165
|
+
return html `
|
|
166
|
+
<div class="notice ok" part="notice">
|
|
167
|
+
<p class="row">
|
|
168
|
+
<span class="mail">${this.email}</span>
|
|
169
|
+
${verifiedMark}
|
|
170
|
+
</p>
|
|
171
|
+
</div>
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
const described = 'pwa-verify-status';
|
|
175
|
+
return html `
|
|
176
|
+
<div class="notice" part="notice">
|
|
177
|
+
|
|
178
|
+
<p class="row">
|
|
179
|
+
<span class="mail">${this.email}</span>
|
|
180
|
+
<span class="unverified" part="unverified">Not verified</span>
|
|
181
|
+
</p>
|
|
182
|
+
|
|
183
|
+
<p class="lead">${this.lead()}</p>
|
|
184
|
+
|
|
185
|
+
<form novalidate @submit="${this.resend}">
|
|
186
|
+
|
|
187
|
+
<p
|
|
188
|
+
id="pwa-verify-status"
|
|
189
|
+
part="status"
|
|
190
|
+
class="status ${this.status ? 'on' : ''} ${this.tone}"
|
|
191
|
+
role="status"
|
|
192
|
+
aria-live="polite"
|
|
193
|
+
aria-atomic="true"
|
|
194
|
+
tabindex="-1">${this.status}</p>
|
|
195
|
+
|
|
196
|
+
<button
|
|
197
|
+
type="submit"
|
|
198
|
+
part="submit"
|
|
199
|
+
class="action-button"
|
|
200
|
+
aria-describedby="${described}"
|
|
201
|
+
aria-busy="${this.busy ? 'true' : 'false'}"
|
|
202
|
+
?disabled="${this.busy || this.cooldown > 0}">${this.buttonLabel()}</button>
|
|
203
|
+
|
|
204
|
+
</form>
|
|
205
|
+
|
|
206
|
+
</div>
|
|
207
|
+
`;
|
|
208
|
+
}
|
|
209
|
+
showSent() {
|
|
210
|
+
this.tone = '';
|
|
211
|
+
this.status = sentMessage;
|
|
212
|
+
this.cooldown = verifyWait;
|
|
213
|
+
this.armCooldown();
|
|
214
|
+
void this.updateComplete.then(() => { this.focusStatus(); });
|
|
215
|
+
}
|
|
216
|
+
showFirebase(error) {
|
|
217
|
+
this.tone = 'error';
|
|
218
|
+
this.status = userMessage(error);
|
|
219
|
+
void this.updateComplete.then(() => { this.focusStatus(); });
|
|
220
|
+
}
|
|
221
|
+
focusStatus() {
|
|
222
|
+
const status = this.renderRoot.querySelector('#pwa-verify-status');
|
|
223
|
+
status?.focus();
|
|
224
|
+
}
|
|
225
|
+
clearWait() {
|
|
226
|
+
window.clearInterval(this.timer);
|
|
227
|
+
this.timer = 0;
|
|
228
|
+
this.cooldown = 0;
|
|
229
|
+
}
|
|
230
|
+
armCooldown() {
|
|
231
|
+
window.clearInterval(this.timer);
|
|
232
|
+
this.timer = window.setInterval(() => {
|
|
233
|
+
if (this.cooldown <= 1) {
|
|
234
|
+
this.cooldown = 0;
|
|
235
|
+
window.clearInterval(this.timer);
|
|
236
|
+
this.timer = 0;
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
this.cooldown -= 1;
|
|
240
|
+
}, 1000);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
__decorate([
|
|
244
|
+
state(),
|
|
245
|
+
__metadata("design:type", Object)
|
|
246
|
+
], EmailVerify.prototype, "login", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
state(),
|
|
249
|
+
__metadata("design:type", Object)
|
|
250
|
+
], EmailVerify.prototype, "verified", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
state(),
|
|
253
|
+
__metadata("design:type", Object)
|
|
254
|
+
], EmailVerify.prototype, "email", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
state(),
|
|
257
|
+
__metadata("design:type", Object)
|
|
258
|
+
], EmailVerify.prototype, "status", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
state(),
|
|
261
|
+
__metadata("design:type", Object)
|
|
262
|
+
], EmailVerify.prototype, "tone", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
state(),
|
|
265
|
+
__metadata("design:type", Object)
|
|
266
|
+
], EmailVerify.prototype, "busy", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
state(),
|
|
269
|
+
__metadata("design:type", Object)
|
|
270
|
+
], EmailVerify.prototype, "cooldown", void 0);
|
|
271
|
+
customElements.define('email-verify', EmailVerify);
|
|
272
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/verify.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,KAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGrE,MAAM,UAAU,GAAG,EAAE,CAAC;AAGtB,MAAM,WAAW,GAAG,8CAA8C,CAAC;AAEnE,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAYzD;QAAgB,KAAK,EAAE,CAAC;QAVP,UAAK,GAAG,KAAK,CAAC;QACd,aAAQ,GAAG,KAAK,CAAC;QACjB,UAAK,GAAG,EAAE,CAAC;QACX,WAAM,GAAG,EAAE,CAAC;QACZ,SAAI,GAAG,EAAE,CAAC;QACV,SAAI,GAAG,KAAK,CAAC;QACb,aAAQ,GAAG,CAAC,CAAC;QAEtB,UAAK,GAAG,CAAC,CAAC;QAuKV,WAAM,GAAG,KAAK,EAAE,KAAY,EAAE,EA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AE,IAAI,CAAC,CAAC;IAEX,CAAC;CAEF;AAtPkB;IAAhB,KAAK,EAAE;;0CAAuB;AACd;IAAhB,KAAK,EAAE;;6CAA0B;AACjB;IAAhB,KAAK,EAAE;;0CAAoB;AACX;IAAhB,KAAK,EAAE;;2CAAqB;AACZ;IAAhB,KAAK,EAAE;;yCAAmB;AACV;IAAhB,KAAK,EAAE;;yCAAsB;AACb;IAAhB,KAAK,EAAE;;6CAAsB;AAkPhC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CSSResultArray, LitElement } from 'lit';
|
|
2
|
-
import { AppState } from '../../store';
|
|
3
|
-
import './input/uploader';
|
|
4
|
-
import './input/name';
|
|
5
|
-
import './input/email';
|
|
6
|
-
import './input/password';
|
|
7
|
-
import './input/delete';
|
|
2
|
+
import { AppState } from '../../store.js';
|
|
3
|
+
import './input/uploader.js';
|
|
4
|
+
import './input/name.js';
|
|
5
|
+
import './input/email.js';
|
|
6
|
+
import './input/password.js';
|
|
7
|
+
import './input/delete.js';
|
|
8
|
+
import './input/verify.js';
|
|
8
9
|
declare const UserSettings_base: (new (...args: any[]) => {
|
|
9
10
|
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
10
11
|
connectedCallback(): void;
|
|
@@ -24,9 +25,6 @@ declare const UserSettings_base: (new (...args: any[]) => {
|
|
|
24
25
|
phone: string;
|
|
25
26
|
email: string;
|
|
26
27
|
};
|
|
27
|
-
drawer: {
|
|
28
|
-
drawer: boolean;
|
|
29
|
-
};
|
|
30
28
|
backend: {
|
|
31
29
|
verified: boolean;
|
|
32
30
|
anon: boolean;
|
|
@@ -44,10 +42,16 @@ export declare class UserSettings extends UserSettings_base {
|
|
|
44
42
|
empty: string;
|
|
45
43
|
private profileTopic;
|
|
46
44
|
private name;
|
|
45
|
+
private email;
|
|
46
|
+
private login;
|
|
47
47
|
constructor();
|
|
48
|
-
|
|
48
|
+
connectedCallback(): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
private onSubmit;
|
|
51
|
+
private onTabKey;
|
|
49
52
|
stateChanged(state: AppState): void;
|
|
50
53
|
static get styles(): CSSResultArray;
|
|
54
|
+
private openTab;
|
|
51
55
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
52
56
|
}
|
|
53
57
|
declare global {
|
|
@@ -56,3 +60,4 @@ declare global {
|
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
export {};
|
|
63
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/settings/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAe,KAAK,CAAC;AAGrE,OAAO,EAAS,QAAQ,EAAE,MAAqB,gBAAgB,CAAC;AAGhE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAO3B,qBACa,YAAa,SAAQ,iBAA0B;IAGV,KAAK,SAAM;IAElD,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,KAAK,CAAS;;IAKtB,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAKrC,OAAO,CAAC,QAAQ,CAEf;IAGD,OAAO,CAAC,QAAQ;IAYhB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAO5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAqC5B;IAEN,OAAO,CAAC,OAAO;IAIf,SAAS,CAAC,MAAM;CAoJjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
|