@rolatech/angular-account 17.2.4 → 17.2.6

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.
Files changed (71) hide show
  1. package/esm2022/lib/components/avatar-update-dialog/avatar-update-dialog.component.mjs +3 -3
  2. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +3 -3
  3. package/esm2022/lib/components/login/login-wechat/login-wechat.component.mjs +4 -8
  4. package/esm2022/lib/components/logout/logout.component.mjs +3 -3
  5. package/esm2022/lib/components/passwordreset/passwordreset.component.mjs +3 -3
  6. package/esm2022/lib/components/topbar-login/topbar-login.component.mjs +3 -3
  7. package/esm2022/lib/components/user-item/user-item.component.mjs +7 -5
  8. package/esm2022/lib/pages/accounts/signin/signin.component.mjs +21 -9
  9. package/esm2022/lib/pages/accounts/signup/signup.component.mjs +5 -5
  10. package/esm2022/lib/pages/myaccount/email/email.component.mjs +14 -14
  11. package/esm2022/lib/pages/myaccount/email-verification/email-verification.component.mjs +3 -3
  12. package/esm2022/lib/pages/myaccount/gender/gender.component.mjs +15 -16
  13. package/esm2022/lib/pages/myaccount/home/home.component.mjs +42 -84
  14. package/esm2022/lib/pages/myaccount/personal-info/info.component.mjs +10 -17
  15. package/esm2022/lib/pages/myaccount/personal-info/profile/profile.component.mjs +22 -16
  16. package/esm2022/lib/pages/myaccount/personal-info/username/username.component.mjs +12 -14
  17. package/esm2022/lib/pages/myaccount/phone/phone.component.mjs +19 -24
  18. package/esm2022/lib/pages/myaccount/security/security-faceid/security-faceid.component.mjs +3 -3
  19. package/esm2022/lib/pages/myaccount/security/security-index/security-index.component.mjs +3 -3
  20. package/esm2022/lib/pages/myaccount/security/security-password/security-password.component.mjs +8 -11
  21. package/esm2022/lib/pages/myaccount/security/security-verification/security-verification.component.mjs +6 -6
  22. package/esm2022/lib/services/wechat-login.service.mjs +9 -6
  23. package/fesm2022/{rolatech-angular-account-email-verification.component-D9e--XMc.mjs → rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs} +4 -4
  24. package/fesm2022/{rolatech-angular-account-email-verification.component-D9e--XMc.mjs.map → rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs.map} +1 -1
  25. package/fesm2022/{rolatech-angular-account-email.component-DC8qYVOJ.mjs → rolatech-angular-account-email.component-OZQWgvRq.mjs} +14 -14
  26. package/fesm2022/rolatech-angular-account-email.component-OZQWgvRq.mjs.map +1 -0
  27. package/fesm2022/{rolatech-angular-account-gender.component-DWdWJiQW.mjs → rolatech-angular-account-gender.component-et-tBTIn.mjs} +15 -16
  28. package/fesm2022/rolatech-angular-account-gender.component-et-tBTIn.mjs.map +1 -0
  29. package/fesm2022/rolatech-angular-account-home.component-CLpbrgbY.mjs +77 -0
  30. package/fesm2022/rolatech-angular-account-home.component-CLpbrgbY.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-info.component-BylW4MU8.mjs +98 -0
  32. package/fesm2022/rolatech-angular-account-info.component-BylW4MU8.mjs.map +1 -0
  33. package/fesm2022/{rolatech-angular-account-login.routes-DjxoOzuE.mjs → rolatech-angular-account-login.routes-Ck2VnoP1.mjs} +6 -10
  34. package/fesm2022/rolatech-angular-account-login.routes-Ck2VnoP1.mjs.map +1 -0
  35. package/fesm2022/rolatech-angular-account-phone.component-Y1-PQ88s.mjs +68 -0
  36. package/fesm2022/rolatech-angular-account-phone.component-Y1-PQ88s.mjs.map +1 -0
  37. package/fesm2022/rolatech-angular-account-profile.component-qPo6AqKP.mjs +50 -0
  38. package/fesm2022/rolatech-angular-account-profile.component-qPo6AqKP.mjs.map +1 -0
  39. package/fesm2022/rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs +444 -0
  40. package/fesm2022/rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs.map +1 -0
  41. package/fesm2022/{rolatech-angular-account-security.routes-Dag8RZ38.mjs → rolatech-angular-account-security.routes-oSrz_UlJ.mjs} +14 -15
  42. package/fesm2022/rolatech-angular-account-security.routes-oSrz_UlJ.mjs.map +1 -0
  43. package/fesm2022/{rolatech-angular-account-username.component-BL2F5fnx.mjs → rolatech-angular-account-username.component-aqWzvFh7.mjs} +12 -14
  44. package/fesm2022/rolatech-angular-account-username.component-aqWzvFh7.mjs.map +1 -0
  45. package/fesm2022/rolatech-angular-account.mjs +2 -2
  46. package/lib/pages/myaccount/email/email.component.d.ts +5 -4
  47. package/lib/pages/myaccount/gender/gender.component.d.ts +4 -1
  48. package/lib/pages/myaccount/home/home.component.d.ts +8 -15
  49. package/lib/pages/myaccount/personal-info/info.component.d.ts +2 -4
  50. package/lib/pages/myaccount/personal-info/profile/profile.component.d.ts +2 -2
  51. package/lib/pages/myaccount/personal-info/username/username.component.d.ts +2 -2
  52. package/lib/pages/myaccount/phone/phone.component.d.ts +2 -2
  53. package/lib/pages/myaccount/security/security-verification/security-verification.component.d.ts +1 -1
  54. package/lib/services/wechat-login.service.d.ts +3 -1
  55. package/package.json +5 -5
  56. package/themes/_default.scss +1 -1
  57. package/fesm2022/rolatech-angular-account-email.component-DC8qYVOJ.mjs.map +0 -1
  58. package/fesm2022/rolatech-angular-account-gender.component-DWdWJiQW.mjs.map +0 -1
  59. package/fesm2022/rolatech-angular-account-home.component-B28zyXQ7.mjs +0 -117
  60. package/fesm2022/rolatech-angular-account-home.component-B28zyXQ7.mjs.map +0 -1
  61. package/fesm2022/rolatech-angular-account-info.component-DNi4eTxV.mjs +0 -105
  62. package/fesm2022/rolatech-angular-account-info.component-DNi4eTxV.mjs.map +0 -1
  63. package/fesm2022/rolatech-angular-account-login.routes-DjxoOzuE.mjs.map +0 -1
  64. package/fesm2022/rolatech-angular-account-phone.component-r9dWPfEL.mjs +0 -73
  65. package/fesm2022/rolatech-angular-account-phone.component-r9dWPfEL.mjs.map +0 -1
  66. package/fesm2022/rolatech-angular-account-profile.component-CJfmQ3Ba.mjs +0 -44
  67. package/fesm2022/rolatech-angular-account-profile.component-CJfmQ3Ba.mjs.map +0 -1
  68. package/fesm2022/rolatech-angular-account-rolatech-angular-account-P3NArisC.mjs +0 -429
  69. package/fesm2022/rolatech-angular-account-rolatech-angular-account-P3NArisC.mjs.map +0 -1
  70. package/fesm2022/rolatech-angular-account-security.routes-Dag8RZ38.mjs.map +0 -1
  71. package/fesm2022/rolatech-angular-account-username.component-BL2F5fnx.mjs.map +0 -1
@@ -0,0 +1,68 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, effect, Component } from '@angular/core';
3
+ import * as i2 from '@angular/material/button';
4
+ import { MatButton } from '@angular/material/button';
5
+ import { AuthService, AuthUserService } from '@rolatech/angular-auth';
6
+ import { AngularCommonModule } from '@rolatech/angular-common';
7
+ import { BaseComponent, AngularComponentsModule, AppContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
8
+ import * as i1 from '@angular/forms';
9
+ import * as i3 from '@angular/material/form-field';
10
+ import * as i4 from '@angular/material/input';
11
+
12
+ class PhoneComponent extends BaseComponent {
13
+ constructor() {
14
+ super();
15
+ this.user = inject(AuthService).user;
16
+ this.authUserService = inject(AuthUserService);
17
+ this.phone = '';
18
+ this.code = '';
19
+ this.countDown = false;
20
+ this.countDownTime = 60;
21
+ this.showButtonText = '发送验证码';
22
+ effect(() => {
23
+ this.phone = this.user()?.phone;
24
+ });
25
+ }
26
+ ngOnInit() { }
27
+ sendSMSCode() {
28
+ this.countDown = true;
29
+ const start = setInterval(() => {
30
+ if (this.countDownTime >= 0) {
31
+ this.showButtonText = `${this.countDownTime--}秒重发`;
32
+ }
33
+ else {
34
+ clearInterval(start);
35
+ this.showButtonText = '重新发送';
36
+ this.countDown = false;
37
+ this.countDownTime = 60;
38
+ }
39
+ }, 1000);
40
+ this.authUserService.sendSMSCode('+86', this.phone).subscribe({
41
+ next: (res) => {
42
+ this.snackBarService.open('发送成功');
43
+ },
44
+ error: (error) => {
45
+ this.snackBarService.open(error.message);
46
+ },
47
+ });
48
+ }
49
+ save() {
50
+ this.authUserService.changePhone(this.phone, this.code).subscribe({
51
+ next: (res) => {
52
+ this.snackBarService.open('修改成功');
53
+ },
54
+ error: (error) => {
55
+ this.snackBarService.open(error.message);
56
+ },
57
+ });
58
+ }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: PhoneComponent, isStandalone: true, selector: "rolatech-account-phone", usesInheritance: true, ngImport: i0, template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u624B\u673A\u53F7\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">\u624B\u673A\u53F7\u662F\u60A8\u5728\u672C\u7AD9\u7684\u552F\u4E00\u6807\u8BC6, \u66F4\u6539\u540E\u5C06\u540C\u65F6\u66F4\u6539\u7B2C\u4E09\u65B9\u7ED1\u5B9A\u7684\u624B\u673A\u53F7</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"phone\" required />\n </mat-form-field>\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u9A8C\u8BC1\u7801 </mat-label>\n <input matInput [(ngModel)]=\"code\" required />\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px]\">\n <span class=\"text-sm\">{{ showButtonText }}</span>\n </button>\n </div>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-[128px] ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-app-container>\n", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: AppContainerComponent, selector: "rolatech-app-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }] }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PhoneComponent, decorators: [{
63
+ type: Component,
64
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, AppContainerComponent, ToolbarComponent, MatButton], selector: 'rolatech-account-phone', template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u624B\u673A\u53F7\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">\u624B\u673A\u53F7\u662F\u60A8\u5728\u672C\u7AD9\u7684\u552F\u4E00\u6807\u8BC6, \u66F4\u6539\u540E\u5C06\u540C\u65F6\u66F4\u6539\u7B2C\u4E09\u65B9\u7ED1\u5B9A\u7684\u624B\u673A\u53F7</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </mat-label>\n <input matInput [(ngModel)]=\"phone\" required />\n </mat-form-field>\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u9A8C\u8BC1\u7801 </mat-label>\n <input matInput [(ngModel)]=\"code\" required />\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px]\">\n <span class=\"text-sm\">{{ showButtonText }}</span>\n </button>\n </div>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-[128px] ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-app-container>\n", styles: ["mat-form-field{width:100%}\n"] }]
65
+ }], ctorParameters: () => [] });
66
+
67
+ export { PhoneComponent };
68
+ //# sourceMappingURL=rolatech-angular-account-phone.component-Y1-PQ88s.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-phone.component-Y1-PQ88s.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/phone/phone.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/phone/phone.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, AppContainerComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, AppContainerComponent, ToolbarComponent, MatButton],\n selector: 'rolatech-account-phone',\n templateUrl: './phone.component.html',\n styleUrls: ['./phone.component.scss'],\n})\nexport class PhoneComponent extends BaseComponent implements OnInit {\n user = inject(AuthService).user;\n authUserService = inject(AuthUserService);\n phone = '';\n code = '';\n countDown = false;\n countDownTime = 60;\n showButtonText = '发送验证码';\n constructor() {\n super();\n effect(() => {\n this.phone = this.user()?.phone!;\n });\n }\n ngOnInit(): void {}\n\n sendSMSCode() {\n this.countDown = true;\n const start = setInterval(() => {\n if (this.countDownTime >= 0) {\n this.showButtonText = `${this.countDownTime--}秒重发`;\n } else {\n clearInterval(start);\n this.showButtonText = '重新发送';\n this.countDown = false;\n this.countDownTime = 60;\n }\n }, 1000);\n\n this.authUserService.sendSMSCode('+86', this.phone).subscribe({\n next: (res) => {\n this.snackBarService.open('发送成功');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n save() {\n this.authUserService.changePhone(this.phone, this.code).subscribe({\n next: (res) => {\n this.snackBarService.open('修改成功');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-app-container>\n <rolatech-toolbar title=\"修改手机号\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">手机号是您在本站的唯一标识, 更改后将同时更改第三方绑定的手机号</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 手机号 </mat-label>\n <input matInput [(ngModel)]=\"phone\" required />\n </mat-form-field>\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 验证码 </mat-label>\n <input matInput [(ngModel)]=\"code\" required />\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px]\">\n <span class=\"text-sm\">{{ showButtonText }}</span>\n </button>\n </div>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button m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 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, effect, Component } from '@angular/core';
3
+ import * as i2 from '@angular/material/button';
4
+ import { MatButton } from '@angular/material/button';
5
+ import { AuthUserService, AuthService } from '@rolatech/angular-auth';
6
+ import { AngularCommonModule } from '@rolatech/angular-common';
7
+ import { BaseComponent, AngularComponentsModule, AppContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
8
+ import { BackButtonDirective } from '@rolatech/angular-services';
9
+ import * as i1 from '@angular/forms';
10
+ import * as i3 from '@angular/material/form-field';
11
+ import * as i4 from '@angular/material/input';
12
+
13
+ class ProfileComponent extends BaseComponent {
14
+ constructor() {
15
+ super();
16
+ this.authUserService = inject(AuthUserService);
17
+ this.user = inject(AuthService).user;
18
+ this.name = '';
19
+ effect(() => {
20
+ this.name = this.user()?.name;
21
+ });
22
+ }
23
+ ngOnInit() { }
24
+ save() {
25
+ this.authUserService.changeName(this.name).subscribe({
26
+ next: (res) => {
27
+ this.snackBarService.open('修改成功');
28
+ },
29
+ error: (error) => {
30
+ this.snackBarService.open(error.message);
31
+ },
32
+ });
33
+ }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: ProfileComponent, isStandalone: true, selector: "rolatech-account-profile", usesInheritance: true, ngImport: i0, template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u59D3\u540D\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">\u7528\u6237\u540D\u662F\u60A8\u5728\u672C\u7AD9\u7684\u7B80\u79F0, \u53EF\u4EE5\u662F\u771F\u5B9E\u59D3\u540D, \u4E5F\u53EF\u4EE5\u662F\u6635\u79F0</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 text-white\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n </div>\n</rolatech-app-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }, { kind: "component", type: AppContainerComponent, selector: "rolatech-app-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }] }); }
36
+ }
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ProfileComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ standalone: true, imports: [
40
+ AngularCommonModule,
41
+ AngularComponentsModule,
42
+ MatButton,
43
+ BackButtonDirective,
44
+ AppContainerComponent,
45
+ ToolbarComponent,
46
+ ], selector: 'rolatech-account-profile', template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u59D3\u540D\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">\u7528\u6237\u540D\u662F\u60A8\u5728\u672C\u7AD9\u7684\u7B80\u79F0, \u53EF\u4EE5\u662F\u771F\u5B9E\u59D3\u540D, \u4E5F\u53EF\u4EE5\u662F\u6635\u79F0</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 text-white\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n </div>\n</rolatech-app-container>\n" }]
47
+ }], ctorParameters: () => [] });
48
+
49
+ export { ProfileComponent };
50
+ //# sourceMappingURL=rolatech-angular-account-profile.component-qPo6AqKP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-profile.component-qPo6AqKP.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/profile/profile.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/profile/profile.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, AppContainerComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n standalone: true,\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n MatButton,\n BackButtonDirective,\n AppContainerComponent,\n ToolbarComponent,\n ],\n selector: 'rolatech-account-profile',\n templateUrl: './profile.component.html',\n styleUrls: ['./profile.component.scss'],\n})\nexport class ProfileComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n user = inject(AuthService).user;\n name = '';\n constructor() {\n super();\n effect(() => {\n this.name = this.user()?.name!;\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.changeName(this.name).subscribe({\n next: (res) => {\n this.snackBarService.open('修改成功');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-app-container>\n <rolatech-toolbar title=\"修改姓名\" back divider></rolatech-toolbar>\n <div class=\"p-3\">\n <p class=\"text-md my-3\">用户名是您在本站的简称, 可以是真实姓名, 也可以是昵称</p>\n <div class=\"flex flex-col mt-3\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 text-white\" (click)=\"save()\">保存</button>\n </div>\n </div>\n </div>\n</rolatech-app-container>\n"],"names":[],"mappings":";;;;;;;;;;;;AAqBM,MAAO,gBAAiB,SAAQ,aAAa,CAAA;AAIjD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAJV,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAChC,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QAGR,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAK,CAAC;AACjC,SAAC,CAAC,CAAC;KACJ;AACD,IAAA,QAAQ,MAAW;IAEnB,IAAI,GAAA;QACF,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,S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