@social-mail/social-mail-client 1.2.113 → 1.2.115
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/admin/AdminAppIndex.pack.js +27 -5
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +2 -2
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/admin/pages/users/UserDetailsPage.d.ts +1 -0
- package/dist/admin/pages/users/UserDetailsPage.d.ts.map +1 -1
- package/dist/admin/pages/users/UserDetailsPage.js +22 -3
- package/dist/admin/pages/users/UserDetailsPage.js.map +1 -1
- package/dist/services/LoginService.d.ts.map +1 -1
- package/dist/services/LoginService.js +5 -2
- package/dist/services/LoginService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.js +11 -8
- package/dist/web/AppIndex.js.map +1 -1
- package/dist/web/AppIndex.pack.js +16 -10
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +2 -2
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/admin/pages/users/UserDetailsPage.tsx +15 -0
- package/src/services/LoginService.ts +2 -0
- package/src/web/AppIndex.tsx +1 -1
package/package.json
CHANGED
|
@@ -11,6 +11,9 @@ import EditUserMailboxPage from "./mailboxes/EditUserMailboxPage";
|
|
|
11
11
|
import EditFileAcessPage from "./files/EditFileAccessPage";
|
|
12
12
|
import { DeleteIconTextButton, SaveIconButton, SaveIconTextButton } from "../../../common/controls/buttons/IconButton";
|
|
13
13
|
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
14
|
+
import FormField from "@web-atoms/web-controls/dist/basic/FormField";
|
|
15
|
+
import PageNavigator from "@web-atoms/web-controls/dist/PageNavigator";
|
|
16
|
+
import EditUserPage from "./EditUserPage";
|
|
14
17
|
|
|
15
18
|
export default class UserDetailsPage extends ContentPage {
|
|
16
19
|
|
|
@@ -31,6 +34,9 @@ export default class UserDetailsPage extends ContentPage {
|
|
|
31
34
|
|
|
32
35
|
<div data-layout="vertical-flex-stretch-items">
|
|
33
36
|
<div data-layout="frame-vertical-flex">
|
|
37
|
+
<FormField label="Username:">
|
|
38
|
+
<label>{this.model.userName}</label>
|
|
39
|
+
</FormField>
|
|
34
40
|
<div data-layout="row">
|
|
35
41
|
Status: <span
|
|
36
42
|
data-color={ this.model.status === "active"
|
|
@@ -53,6 +59,10 @@ export default class UserDetailsPage extends ContentPage {
|
|
|
53
59
|
data-submit-event="reset-mfa"
|
|
54
60
|
text="Reset MFA"
|
|
55
61
|
/>}
|
|
62
|
+
<SaveIconTextButton
|
|
63
|
+
data-click-event="change-password"
|
|
64
|
+
text="Change Password"
|
|
65
|
+
/>
|
|
56
66
|
</div>
|
|
57
67
|
</div>
|
|
58
68
|
</div>
|
|
@@ -115,4 +125,9 @@ export default class UserDetailsPage extends ContentPage {
|
|
|
115
125
|
await this.userService.resetMFA(this.model);
|
|
116
126
|
await this.init();
|
|
117
127
|
}
|
|
128
|
+
|
|
129
|
+
@Action({ onEvent:"change-password"})
|
|
130
|
+
async changePassword() {
|
|
131
|
+
PageNavigator.pushPage(EditUserPage, this.model);
|
|
132
|
+
}
|
|
118
133
|
}
|
|
@@ -5,6 +5,7 @@ import { ILoginSession, IUser, LoginSession, User } from "../model/model";
|
|
|
5
5
|
import SocialMailApp from "../common/SocialMailApp";
|
|
6
6
|
import { App } from "@web-atoms/core/dist/App";
|
|
7
7
|
import WebPushService from "./WebPushService";
|
|
8
|
+
import sleep from "@web-atoms/core/dist/core/sleep";
|
|
8
9
|
|
|
9
10
|
@DISingleton()
|
|
10
11
|
export default class LoginService {
|
|
@@ -40,6 +41,7 @@ export default class LoginService {
|
|
|
40
41
|
session.invalid = true;
|
|
41
42
|
const cloner = this.entityService.cloner(session);
|
|
42
43
|
await this.entityService.save(cloner.copy);
|
|
44
|
+
await sleep(1000);
|
|
43
45
|
location.reload();
|
|
44
46
|
}
|
|
45
47
|
|
package/src/web/AppIndex.tsx
CHANGED
|
@@ -57,7 +57,7 @@ export default class AppIndex extends MobileDesktopApp {
|
|
|
57
57
|
|
|
58
58
|
if (this.desktopApp) {
|
|
59
59
|
this.desktopApp.statusBarRenderer = () => <div data-layout="row">
|
|
60
|
-
<a href="/admin" target="_blank">Admin</a>
|
|
60
|
+
{ currentUser.roles?.find((x) => /^admin/i.test(x.roleName)) && <a href="/admin" target="_blank">Admin</a> }
|
|
61
61
|
<div data-flex="stretch-full"/>
|
|
62
62
|
{ ... ModuleInfo}
|
|
63
63
|
</div>;
|