@fiduswriter/frontend 0.1.71 → 0.1.73
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/css/login.css +268 -0
- package/css/show_profile.css +111 -40
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +1 -0
- package/dist/app/index.js.map +1 -1
- package/dist/common/templates.d.ts.map +1 -1
- package/dist/common/templates.js +1 -0
- package/dist/common/templates.js.map +1 -1
- package/dist/common/user_util.d.ts +8 -1
- package/dist/common/user_util.d.ts.map +1 -1
- package/dist/common/user_util.js +24 -0
- package/dist/common/user_util.js.map +1 -1
- package/dist/css/fwtoolkit/data_table.css +31 -6
- package/dist/css/fwtoolkit/dialog.css +51 -0
- package/dist/css/fwtoolkit/fwtoolkit.css +157 -26
- package/dist/css/fwtoolkit/inline_tools.css +5 -8
- package/dist/css/fwtoolkit/overview_menu.css +70 -12
- package/dist/css/login.css +268 -0
- package/dist/css/manifest.json +1 -0
- package/dist/css/show_profile.css +111 -40
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/index.js +6 -1
- package/dist/feedback/index.js.map +1 -1
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +16 -2
- package/dist/menu/index.js.map +1 -1
- package/dist/user/auth/login.d.ts +14 -0
- package/dist/user/auth/login.d.ts.map +1 -1
- package/dist/user/auth/login.js +253 -131
- package/dist/user/auth/login.js.map +1 -1
- package/dist/user/profile/dialog.d.ts +72 -0
- package/dist/user/profile/dialog.d.ts.map +1 -0
- package/dist/user/profile/dialog.js +436 -0
- package/dist/user/profile/dialog.js.map +1 -0
- package/dist/user/profile/dialogs.d.ts +6 -6
- package/dist/user/profile/dialogs.d.ts.map +1 -1
- package/dist/user/profile/dialogs.js +29 -14
- package/dist/user/profile/dialogs.js.map +1 -1
- package/dist/user/profile/index.d.ts +12 -14
- package/dist/user/profile/index.d.ts.map +1 -1
- package/dist/user/profile/index.js +35 -236
- package/dist/user/profile/index.js.map +1 -1
- package/dist/user/profile/templates.d.ts +14 -1
- package/dist/user/profile/templates.d.ts.map +1 -1
- package/dist/user/profile/templates.js +178 -191
- package/dist/user/profile/templates.js.map +1 -1
- package/package.json +3 -2
- package/src/app/index.ts +1 -0
- package/src/common/templates.ts +1 -0
- package/src/common/user_util.ts +26 -1
- package/src/feedback/index.ts +8 -1
- package/src/menu/index.ts +19 -2
- package/src/user/auth/login.ts +338 -153
- package/src/user/profile/dialog.ts +609 -0
- package/src/user/profile/dialogs.ts +51 -14
- package/src/user/profile/index.ts +37 -334
- package/src/user/profile/templates.ts +222 -223
package/dist/user/auth/login.js
CHANGED
|
@@ -1,162 +1,278 @@
|
|
|
1
|
-
import { escapeText } from "fwtoolkit";
|
|
1
|
+
import { OneTimeCodeField, activateWait, addAlert, deactivateWait, ensureCSS, escapeText, langName, setDocTitle, staticUrl } from "fwtoolkit";
|
|
2
|
+
import { FeedbackTab } from "../../feedback/index.js";
|
|
2
3
|
import { PreloginPage } from "../../prelogin/index.js";
|
|
3
4
|
import { socialProviderIcon } from "./social_icons.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.contents = `<div class="fw-login-left">
|
|
25
|
-
<h1 class="fw-login-title">${gettext("Log in")}</h1>
|
|
26
|
-
${this.app.settings?.SOCIALACCOUNT_OPEN
|
|
27
|
-
? this.socialaccount_providers.length
|
|
28
|
-
? `<div class="socialaccount_ballot">
|
|
5
|
+
// Design 5: the login page is a small centered window (card) instead of the
|
|
6
|
+
// full pre-login chrome. GDPR: the user has to enter the full username and
|
|
7
|
+
// password (no semi-logged-in account chooser) and the 2FA code when their
|
|
8
|
+
// account requires it.
|
|
9
|
+
const loginWindowTemplate = ({ language, socialaccount_providers, settings, footerLinks, showPasswordLogin, showSignup }) => `
|
|
10
|
+
<div id="fw-wait">
|
|
11
|
+
<i class="fa fa-spinner fa-pulse"></i>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="fw-login-page-inner">
|
|
14
|
+
<div class="fw-login-window">
|
|
15
|
+
<h1 class="fw-login-logo">
|
|
16
|
+
${settings?.BRANDING_LOGO
|
|
17
|
+
? `<span class="fw-login-branding-logo"><img src="${staticUrl(settings.BRANDING_LOGO)}" alt="Logo" /></span>`
|
|
18
|
+
: `<span class="fw-logo-text"></span><img src="${staticUrl("svg/icon.svg")}" alt="Logo" />`}
|
|
19
|
+
</h1>
|
|
20
|
+
<p class="fw-login-greeting">${gettext("Hey!")}</p>
|
|
21
|
+
<h1 class="fw-login-title">${gettext("Log in")}</h1>
|
|
22
|
+
<div class="fw-login-card-contents">
|
|
23
|
+
${settings?.SOCIALACCOUNT_OPEN && socialaccount_providers.length
|
|
24
|
+
? `<div class="socialaccount_ballot fw-login-social">
|
|
29
25
|
<ul class="socialaccount_providers">
|
|
30
|
-
${
|
|
31
|
-
|
|
32
|
-
<a title="${provider.name}" class="fw-button fw-socialaccount fw-${provider.id}"
|
|
33
|
-
href="${provider.login_url}">
|
|
26
|
+
${socialaccount_providers
|
|
27
|
+
.map((provider) => `<li>
|
|
28
|
+
<a title="${escapeText(provider.name)}" class="fw-button fw-socialaccount fw-${escapeText(provider.id)}"
|
|
29
|
+
href="${escapeText(provider.login_url)}">
|
|
34
30
|
<span class="fab fa-${socialProviderIcon(provider.id)}"></span>
|
|
35
|
-
${gettext("Login with")} ${provider.name}
|
|
31
|
+
${gettext("Login with")} ${escapeText(provider.name)}
|
|
36
32
|
</a>
|
|
37
33
|
</li>`)
|
|
38
|
-
|
|
34
|
+
.join("")}
|
|
39
35
|
</ul>
|
|
40
36
|
</div>`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
${this.app.settings?.PASSWORD_LOGIN
|
|
45
|
-
? `<div class="fw-login-right">
|
|
46
|
-
<form>
|
|
37
|
+
: ""}
|
|
38
|
+
${showPasswordLogin
|
|
39
|
+
? `<form novalidate>
|
|
47
40
|
<ul id="non-field-errors" class="fw-errorlist"></ul>
|
|
48
|
-
<div class="
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
<div class="fw-login-fields">
|
|
42
|
+
<div class="fw-floating-field">
|
|
43
|
+
<label for="id-login">${gettext("Username")}</label>
|
|
44
|
+
<input type="text" name="login" placeholder=" " required="" id="id-login" autocomplete="username" autofocus="autofocus">
|
|
45
|
+
<ul id="id-login-errors" class="fw-errorlist"></ul>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="fw-floating-field">
|
|
48
|
+
<label for="id-password">${gettext("Password")}</label>
|
|
49
|
+
<input type="password" name="password" placeholder=" " required="" id="id-password" autocomplete="current-password">
|
|
50
|
+
<ul id="id-password-errors" class="fw-errorlist"></ul>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="fw-login-password-extras">
|
|
53
|
+
<label for="id-show-password">
|
|
54
|
+
<input type="checkbox" id="id-show-password" name="show-password">
|
|
55
|
+
${gettext("Show password")}
|
|
56
|
+
</label>
|
|
57
|
+
<label for="id-remember">
|
|
58
|
+
<input type="checkbox" id="id-remember" name="remember">
|
|
59
|
+
${gettext("Remember me")}
|
|
60
|
+
</label>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="fw-login-2fa-host" id="fw-login-2fa-host" hidden></div>
|
|
52
63
|
</div>
|
|
53
|
-
<div class="
|
|
54
|
-
<
|
|
55
|
-
<input type="password" name="password" placeholder="${gettext("Password")}" required="" id="id-password" autocomplete="current-password">
|
|
56
|
-
<ul id="id-password-errors" class="fw-errorlist"></ul>
|
|
64
|
+
<div class="fw-login-submit-row">
|
|
65
|
+
<button class="fw-button fw-green fw-dialog-button-primary" type="submit" id="login-submit">${gettext("Continue")}</button>
|
|
57
66
|
</div>
|
|
58
|
-
<div class="
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
<div class="fw-login-secondary-links">
|
|
68
|
+
<a id="lost-passwd" href="/account/password-reset/">${gettext("Forgot Password?")}</a>
|
|
69
|
+
${showSignup
|
|
70
|
+
? `<a id="fw-login-signup" href="/account/sign-up/">${gettext("New here? Sign up")}</a>`
|
|
71
|
+
: ""}
|
|
63
72
|
</div>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
</form>`
|
|
74
|
+
: ""}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="fw-login-footer">
|
|
78
|
+
<select id="lang-selection" aria-label="${gettext("Select language")}">
|
|
79
|
+
${(settings?.LANGUAGES || [])
|
|
80
|
+
.map(([code, _name]) => `<option value="${code}" ${language === code ? "selected" : ""}>${langName(code)}</option>`)
|
|
81
|
+
.join("")}
|
|
82
|
+
</select>
|
|
83
|
+
<ul class="fw-footer-links">
|
|
84
|
+
${footerLinks
|
|
85
|
+
.map(fLink => `<li><a href="${fLink.link}" target="_blank"${fLink.external ? ' rel="noreferrer"' : ""}>${fLink.text}</a></li>`)
|
|
86
|
+
.join("")}
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
</div>`;
|
|
90
|
+
export class LoginPage extends PreloginPage {
|
|
91
|
+
socialaccount_providers;
|
|
92
|
+
twoFactorField;
|
|
93
|
+
pendingCredentials;
|
|
94
|
+
constructor({ app, language, socialaccount_providers }) {
|
|
95
|
+
super({ app, language });
|
|
96
|
+
this.socialaccount_providers = socialaccount_providers;
|
|
97
|
+
this.title = gettext("Login");
|
|
98
|
+
this.pluginLoaders = [];
|
|
99
|
+
this.twoFactorField = undefined;
|
|
100
|
+
this.pendingCredentials = null;
|
|
101
|
+
this.headerLinks = [];
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
this.dom = document.createElement("body");
|
|
105
|
+
this.dom.classList.add("fw-login-page");
|
|
106
|
+
this.dom.classList.add("fw-scrollable");
|
|
107
|
+
this.dom.innerHTML = loginWindowTemplate({
|
|
108
|
+
language: this.language,
|
|
109
|
+
socialaccount_providers: this.socialaccount_providers,
|
|
110
|
+
settings: (this.app.settings || {}),
|
|
111
|
+
footerLinks: this.footerLinks,
|
|
112
|
+
showPasswordLogin: Boolean(this.app.settings?.PASSWORD_LOGIN),
|
|
113
|
+
showSignup: Boolean(this.app.settings?.REGISTRATION_OPEN &&
|
|
114
|
+
this.app.settings?.PASSWORD_LOGIN)
|
|
115
|
+
});
|
|
116
|
+
document.body = this.dom;
|
|
117
|
+
ensureCSS([
|
|
118
|
+
staticUrl("css/login.css"),
|
|
119
|
+
staticUrl("css/two_factor.css")
|
|
120
|
+
]);
|
|
121
|
+
setDocTitle(this.title, this.app);
|
|
122
|
+
new FeedbackTab(this.app).init();
|
|
69
123
|
}
|
|
70
124
|
bind() {
|
|
71
125
|
super.bind();
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
socialButtons.forEach(button => (button.style.width = `${btnWidth}px`));
|
|
126
|
+
const showPassword = document.querySelector("#id-show-password");
|
|
127
|
+
const passwordInput = document.querySelector("#id-password");
|
|
128
|
+
if (showPassword && passwordInput) {
|
|
129
|
+
showPassword.addEventListener("change", () => {
|
|
130
|
+
passwordInput.type = showPassword.checked
|
|
131
|
+
? "text"
|
|
132
|
+
: "password";
|
|
133
|
+
});
|
|
134
|
+
}
|
|
82
135
|
const loginSubmit = document.querySelector("#login-submit");
|
|
83
136
|
if (!loginSubmit) {
|
|
84
137
|
return;
|
|
85
138
|
}
|
|
86
|
-
loginSubmit.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
139
|
+
const form = loginSubmit.closest("form");
|
|
140
|
+
if (form) {
|
|
141
|
+
form.addEventListener("submit", (event) => {
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
this.submitLogin();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
// No surrounding <form>: submit directly from the button click.
|
|
148
|
+
loginSubmit.addEventListener("click", (event) => {
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
this.submitLogin();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
submitLogin() {
|
|
155
|
+
const nonFieldErrors = document.querySelector("#non-field-errors");
|
|
156
|
+
const idLogin = document.querySelector("#id-login");
|
|
157
|
+
const idLoginErrors = document.querySelector("#id-login-errors");
|
|
158
|
+
const idPassword = document.querySelector("#id-password");
|
|
159
|
+
const idPasswordErrors = document.querySelector("#id-password-errors");
|
|
160
|
+
const idRemember = document.querySelector("#id-remember");
|
|
161
|
+
if (!idLogin ||
|
|
162
|
+
!idLoginErrors ||
|
|
163
|
+
!idPassword ||
|
|
164
|
+
!idPasswordErrors ||
|
|
165
|
+
!idRemember) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
nonFieldErrors.innerHTML = "";
|
|
169
|
+
idLoginErrors.innerHTML = "";
|
|
170
|
+
idPasswordErrors.innerHTML = "";
|
|
171
|
+
const login = idLogin.value;
|
|
172
|
+
const password = idPassword.value;
|
|
173
|
+
const remember = idRemember.checked;
|
|
174
|
+
let errors = false;
|
|
175
|
+
if (!login.length) {
|
|
176
|
+
idLoginErrors.innerHTML = `<li>${gettext("This field is required.")}</li>`;
|
|
177
|
+
errors = true;
|
|
178
|
+
}
|
|
179
|
+
if (!password.length) {
|
|
180
|
+
idPasswordErrors.innerHTML = `<li>${gettext("This field is required.")}</li>`;
|
|
181
|
+
errors = true;
|
|
182
|
+
}
|
|
183
|
+
if (errors) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
activateWait();
|
|
187
|
+
this.app.apiConnectors.auth
|
|
188
|
+
.login({ login, password, remember })
|
|
189
|
+
.catch((response) => {
|
|
190
|
+
if (!(response instanceof Response) || response.status !== 400) {
|
|
191
|
+
return Promise.reject(response);
|
|
115
192
|
}
|
|
116
|
-
return
|
|
117
|
-
.
|
|
118
|
-
if (
|
|
119
|
-
|
|
193
|
+
return response.json().then((json) => {
|
|
194
|
+
const needCode = json.form.fields.twofactor.errors.includes("required");
|
|
195
|
+
if (needCode &&
|
|
196
|
+
!json.form.errors.length &&
|
|
197
|
+
!json.form.fields.login.errors.length &&
|
|
198
|
+
!json.form.fields.password.errors.length) {
|
|
199
|
+
this.revealTwoFactorField({ login, password, remember });
|
|
120
200
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
!json.form.fields.login.errors.length &&
|
|
126
|
-
!json.form.fields.password.errors.length) {
|
|
127
|
-
import("./two_factor.js").then(({ twoFactorLoginDialog }) => {
|
|
128
|
-
twoFactorLoginDialog({
|
|
129
|
-
login,
|
|
130
|
-
password,
|
|
131
|
-
remember,
|
|
132
|
-
loginPage: this,
|
|
133
|
-
app: this.app
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
json.form.errors.forEach((error) => (nonFieldErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
139
|
-
json.form.fields.login.errors.forEach((error) => (idLoginErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
140
|
-
json.form.fields.password.errors.forEach((error) => (idPasswordErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
141
|
-
}
|
|
142
|
-
return { json, status: response.status };
|
|
143
|
-
});
|
|
144
|
-
})
|
|
145
|
-
.then((result) => {
|
|
146
|
-
if (!result)
|
|
147
|
-
return;
|
|
148
|
-
const { json, status, requiresEmailConfirmation } = result;
|
|
149
|
-
if (status === 400) {
|
|
150
|
-
return;
|
|
201
|
+
else {
|
|
202
|
+
json.form.errors.forEach((error) => (nonFieldErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
203
|
+
json.form.fields.login.errors.forEach((error) => (idLoginErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
204
|
+
json.form.fields.password.errors.forEach((error) => (idPasswordErrors.innerHTML += `<li>${escapeText(error)}</li>`));
|
|
151
205
|
}
|
|
152
|
-
|
|
206
|
+
return { json, status: response.status };
|
|
153
207
|
});
|
|
208
|
+
})
|
|
209
|
+
.then((result) => {
|
|
210
|
+
if (!result) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const { json, status, requiresEmailConfirmation } = result;
|
|
214
|
+
if (status === 400) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.afterLogin(json, requiresEmailConfirmation);
|
|
218
|
+
})
|
|
219
|
+
.catch(() => {
|
|
220
|
+
addNonFieldError(gettext("Could not log in."));
|
|
221
|
+
})
|
|
222
|
+
.then(() => deactivateWait());
|
|
223
|
+
}
|
|
224
|
+
revealTwoFactorField({ login, password, remember }) {
|
|
225
|
+
if (this.twoFactorField) {
|
|
226
|
+
this.twoFactorField.input.focus();
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const host = document.querySelector("#fw-login-2fa-host");
|
|
230
|
+
if (!host) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.pendingCredentials = { login, password, remember };
|
|
234
|
+
host.hidden = false;
|
|
235
|
+
this.twoFactorField = new OneTimeCodeField({
|
|
236
|
+
id: "two-factor-code",
|
|
237
|
+
label: gettext("Enter the 6-digit code from your authenticator app:"),
|
|
238
|
+
description: "",
|
|
239
|
+
length: 6,
|
|
240
|
+
onComplete: async (twofactor) => {
|
|
241
|
+
await this.submitTwoFactorCode(twofactor);
|
|
242
|
+
}
|
|
154
243
|
});
|
|
244
|
+
this.twoFactorField.input.placeholder = "123456";
|
|
245
|
+
host.replaceChildren(this.twoFactorField.element);
|
|
246
|
+
this.twoFactorField.input.focus();
|
|
247
|
+
}
|
|
248
|
+
async submitTwoFactorCode(twofactor) {
|
|
249
|
+
if (!this.pendingCredentials) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const { login, password, remember } = this.pendingCredentials;
|
|
253
|
+
activateWait();
|
|
254
|
+
try {
|
|
255
|
+
const response = await this.app.apiConnectors.auth.twoFactorLogin({
|
|
256
|
+
login,
|
|
257
|
+
password,
|
|
258
|
+
remember,
|
|
259
|
+
twofactor
|
|
260
|
+
});
|
|
261
|
+
this.pendingCredentials = null;
|
|
262
|
+
this.afterLogin(response);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
this.twoFactorField?.setError(gettext("Could not verify the code."));
|
|
266
|
+
addAlert("error", gettext("Could not verify the code."));
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
deactivateWait();
|
|
270
|
+
}
|
|
155
271
|
}
|
|
156
272
|
afterLogin(json, requiresEmailConfirmation) {
|
|
157
273
|
const currentLang = document.documentElement.lang;
|
|
158
274
|
if (requiresEmailConfirmation) {
|
|
159
|
-
const contentsEl = document.querySelector(".fw-contents");
|
|
275
|
+
const contentsEl = document.querySelector(".fw-login-card-contents");
|
|
160
276
|
if (contentsEl) {
|
|
161
277
|
contentsEl.innerHTML = `<div class="fw-login-left">
|
|
162
278
|
<h1 class="fw-login-title">${gettext("Verify Your E-mail Address")}</h1>
|
|
@@ -184,4 +300,10 @@ export class LoginPage extends PreloginPage {
|
|
|
184
300
|
}
|
|
185
301
|
}
|
|
186
302
|
}
|
|
303
|
+
const addNonFieldError = (message) => {
|
|
304
|
+
const nonFieldErrors = document.querySelector("#non-field-errors");
|
|
305
|
+
if (nonFieldErrors) {
|
|
306
|
+
nonFieldErrors.innerHTML += `<li>${escapeText(message)}</li>`;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
187
309
|
//# sourceMappingURL=login.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/user/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/user/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,SAAS,EACT,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACZ,MAAM,WAAW,CAAA;AAClB,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAC,YAAY,EAAmB,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAWpD,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,uBAAuB;AACvB,MAAM,mBAAmB,GAAG,CAAC,EACzB,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,UAAU,EACO,EAAU,EAAE,CAAC;;;;;;;cAQlB,QAAQ,EAAE,aAAa;IACnB,CAAC,CAAC,kDAAkD,SAAS,CAAC,QAAQ,CAAC,aAAuB,CAAC,wBAAwB;IACvH,CAAC,CAAC,+CAA+C,SAAS,CAAC,cAAc,CAAC,iBAClF;;uCAE2B,OAAO,CAAC,MAAM,CAAC;qCACjB,OAAO,CAAC,QAAQ,CAAC;;UAG1C,QAAQ,EAAE,kBAAkB,IAAI,uBAAuB,CAAC,MAAM;IAC1D,CAAC,CAAC;;0BAEQ,uBAAuB;SACpB,GAAG,CACA,CAAC,QAAa,EAAE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Q,EAAE;IAC/C,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAClE,IAAI,cAAc,EAAE,CAAC;QACjB,cAAc,CAAC,SAAS,IAAI,OAAO,UAAU,CAAC,OAAO,CAAC,OAAO,CAAA;IACjE,CAAC;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BooleanSwitch, Dialog, DialogTabs } from "fwtoolkit";
|
|
2
|
+
import type { FrontendApp, User } from "../../types.js";
|
|
3
|
+
import type { PluginList } from "../../app/index.js";
|
|
4
|
+
export interface ProfileDialogOptions {
|
|
5
|
+
app: FrontendApp;
|
|
6
|
+
user: User & {
|
|
7
|
+
id?: number;
|
|
8
|
+
};
|
|
9
|
+
socialaccount_providers: Array<Record<string, unknown>>;
|
|
10
|
+
profilePlugins?: PluginList;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Design 5 "Configure profile" dialog.
|
|
15
|
+
*
|
|
16
|
+
* A tab dialog whose action buttons ("Delete account" and the primary
|
|
17
|
+
* "Confirm") sit in the title bar (`buttonsTop`), matching the design.
|
|
18
|
+
*
|
|
19
|
+
* The class also provides the plugin host surface used by profile plugins
|
|
20
|
+
* (`pluginTemplates`, `clickTargets`, `postRenderHandlers`, `save`, `dom`,
|
|
21
|
+
* `user`, `app`), so existing plugins keep working unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProfileDialog {
|
|
24
|
+
app: FrontendApp;
|
|
25
|
+
user: User & {
|
|
26
|
+
id?: number;
|
|
27
|
+
};
|
|
28
|
+
socialaccount_providers: Array<Record<string, unknown>>;
|
|
29
|
+
pluginTemplates: string[];
|
|
30
|
+
clickTargets: Record<string, (el: Record<string, any>, event: Event) => void>;
|
|
31
|
+
postRenderHandlers: Array<() => void>;
|
|
32
|
+
plugins: Record<string, {
|
|
33
|
+
init(): void;
|
|
34
|
+
}> | null;
|
|
35
|
+
dom: HTMLElement;
|
|
36
|
+
profilePlugins: PluginList;
|
|
37
|
+
dialog: Dialog | null;
|
|
38
|
+
dialogTabs: DialogTabs | null;
|
|
39
|
+
dirty: boolean;
|
|
40
|
+
twoFactorSwitch: BooleanSwitch | null;
|
|
41
|
+
twoFactorEnabled: boolean;
|
|
42
|
+
onClose: (() => void) | false;
|
|
43
|
+
activeTab: number;
|
|
44
|
+
redraw: () => void;
|
|
45
|
+
constructor({ app, user, socialaccount_providers, profilePlugins, onClose }: ProfileDialogOptions);
|
|
46
|
+
activateFidusPlugins(): void;
|
|
47
|
+
open(): void;
|
|
48
|
+
buildTabs(): {
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
template: () => string;
|
|
52
|
+
}[];
|
|
53
|
+
/**
|
|
54
|
+
* Redraw the tab contents in place after a sub-dialog changed something
|
|
55
|
+
* (avatar, e-mail addresses, …), keeping the dialog open on the tab the
|
|
56
|
+
* user was looking at.
|
|
57
|
+
*/
|
|
58
|
+
refreshContent(): void;
|
|
59
|
+
markDirty(): void;
|
|
60
|
+
resetDirty(): void;
|
|
61
|
+
deleteAccount(): void;
|
|
62
|
+
initTwoFactorSwitch(): void;
|
|
63
|
+
updateTwoFactorStatus(): void;
|
|
64
|
+
updateE2EEPassphraseStatus(): void;
|
|
65
|
+
setupE2EEPassphrase(): Promise<void>;
|
|
66
|
+
recoverE2EEPassphrase(): Promise<void>;
|
|
67
|
+
changeE2EEPassphrase(): Promise<void>;
|
|
68
|
+
save(): Promise<void>;
|
|
69
|
+
updateUserData(): void;
|
|
70
|
+
close(): void;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/user/profile/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,MAAM,EACN,UAAU,EAQb,MAAM,WAAW,CAAA;AAElB,OA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