@fiduswriter/frontend 0.1.23 → 0.1.25
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/dist/api/index.d.ts +9 -3
- package/dist/api/index.d.ts.map +1 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +6 -5
- package/dist/app/index.js.map +1 -1
- package/dist/document_templates/editor.js +1 -1
- package/dist/document_templates/editor.js.map +1 -1
- package/dist/document_templates/overview.js +1 -1
- package/dist/document_templates/overview.js.map +1 -1
- package/dist/documents/overview/index.js +1 -1
- package/dist/documents/overview/index.js.map +1 -1
- package/dist/documents/overview/menu.d.ts.map +1 -1
- package/dist/documents/overview/menu.js +6 -2
- package/dist/documents/overview/menu.js.map +1 -1
- package/dist/feedback/index.d.ts +2 -1
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/index.js +7 -4
- package/dist/feedback/index.js.map +1 -1
- package/dist/menu/index.js +5 -2
- package/dist/menu/index.js.map +1 -1
- package/dist/prelogin/index.js +1 -1
- package/dist/prelogin/index.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/user/auth/password_reset_change.d.ts +2 -2
- package/dist/user/auth/password_reset_change.d.ts.map +1 -1
- package/dist/user/auth/password_reset_change.js +6 -6
- package/dist/user/auth/password_reset_change.js.map +1 -1
- package/dist/user/contacts/index.js +1 -1
- package/dist/user/contacts/index.js.map +1 -1
- package/dist/user/profile/delete_user.d.ts +2 -1
- package/dist/user/profile/delete_user.d.ts.map +1 -1
- package/dist/user/profile/delete_user.js +7 -3
- package/dist/user/profile/delete_user.js.map +1 -1
- package/dist/user/profile/index.d.ts.map +1 -1
- package/dist/user/profile/index.js +2 -2
- package/dist/user/profile/index.js.map +1 -1
- package/package.json +8 -7
- package/src/api/index.ts +9 -1
- package/src/app/index.ts +5 -5
- package/src/document_templates/editor.ts +1 -1
- package/src/document_templates/overview.ts +1 -1
- package/src/documents/overview/index.ts +1 -1
- package/src/documents/overview/menu.ts +7 -2
- package/src/feedback/index.ts +7 -4
- package/src/menu/index.ts +8 -8
- package/src/prelogin/index.ts +1 -1
- package/src/types.ts +1 -0
- package/src/user/auth/password_reset_change.ts +11 -7
- package/src/user/contacts/index.ts +1 -1
- package/src/user/profile/delete_user.ts +8 -4
- package/src/user/profile/index.ts +3 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {escapeText
|
|
1
|
+
import {escapeText} from "fwtoolkit"
|
|
2
2
|
import {PreloginPage} from "../../prelogin/index.js"
|
|
3
3
|
|
|
4
4
|
export class PasswordResetChangePassword extends PreloginPage {
|
|
5
|
-
key: string
|
|
5
|
+
key: string
|
|
6
6
|
|
|
7
|
-
constructor({app, language}: {app: any; language: string}, key: string
|
|
7
|
+
constructor({app, language}: {app: any; language: string}, key: string) {
|
|
8
8
|
super({app, language})
|
|
9
9
|
this.title = gettext("Change Password")
|
|
10
10
|
this.key = key
|
|
@@ -76,10 +76,14 @@ export class PasswordResetChangePassword extends PreloginPage {
|
|
|
76
76
|
if (errors) {
|
|
77
77
|
return
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
;(this.app as any).apiConnectors.auth
|
|
80
|
+
.passwordResetKeyGet(this.key)
|
|
81
|
+
.then(({url}: {url: string}) =>
|
|
82
|
+
(this.app as any).apiConnectors.auth.passwordResetKeyPost(
|
|
83
|
+
url,
|
|
84
|
+
{password1, password2}
|
|
85
|
+
)
|
|
86
|
+
)
|
|
83
87
|
.then(() => {
|
|
84
88
|
if (document.body !== this.dom) {
|
|
85
89
|
return
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {Dialog, activateWait, addAlert, deactivateWait
|
|
1
|
+
import {Dialog, activateWait, addAlert, deactivateWait} from "fwtoolkit"
|
|
2
2
|
import {deleteUserDialogTemplate} from "./templates.js"
|
|
3
3
|
|
|
4
4
|
export class DeleteUserDialog {
|
|
5
5
|
username: string
|
|
6
|
+
app: any
|
|
6
7
|
dialog: any
|
|
7
8
|
|
|
8
|
-
constructor(username: string) {
|
|
9
|
+
constructor(username: string, app: any) {
|
|
9
10
|
this.username = username
|
|
11
|
+
this.app = app
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
init(): void {
|
|
@@ -45,8 +47,10 @@ export class DeleteUserDialog {
|
|
|
45
47
|
deleteCurrentUser(password: string): void {
|
|
46
48
|
activateWait()
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
this.app.apiConnectors.userProfile
|
|
51
|
+
.deleteUser({password})
|
|
52
|
+
.then((response: Response) => {
|
|
53
|
+
switch (response.status) {
|
|
50
54
|
case 200:
|
|
51
55
|
window.location.href = "/"
|
|
52
56
|
break
|
|
@@ -53,7 +53,8 @@ export class Profile {
|
|
|
53
53
|
changePwdDialog({username: this.user.username, app: this.app}),
|
|
54
54
|
"#delete-account": (_el, _event) => {
|
|
55
55
|
const dialog = new DeleteUserDialog(
|
|
56
|
-
(this.dom.querySelector("#delete-account") as HTMLElement).dataset.username
|
|
56
|
+
(this.dom.querySelector("#delete-account") as HTMLElement).dataset.username!,
|
|
57
|
+
this.app
|
|
57
58
|
)
|
|
58
59
|
dialog.init()
|
|
59
60
|
},
|
|
@@ -175,7 +176,7 @@ export class Profile {
|
|
|
175
176
|
])
|
|
176
177
|
|
|
177
178
|
setDocTitle(gettext("Configure profile"), this.app)
|
|
178
|
-
const feedbackTab = new FeedbackTab()
|
|
179
|
+
const feedbackTab = new FeedbackTab(this.app)
|
|
179
180
|
feedbackTab.init()
|
|
180
181
|
}
|
|
181
182
|
|