@rolatech/angular-account 17.2.6 → 17.2.8

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 (63) 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 +3 -3
  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 +8 -6
  7. package/esm2022/lib/components/user-item/user-item.component.mjs +3 -3
  8. package/esm2022/lib/pages/accounts/signin/signin.component.mjs +3 -3
  9. package/esm2022/lib/pages/accounts/signup/signup.component.mjs +3 -3
  10. package/esm2022/lib/pages/myaccount/email/email.component.mjs +6 -6
  11. package/esm2022/lib/pages/myaccount/email-verification/email-verification.component.mjs +3 -3
  12. package/esm2022/lib/pages/myaccount/gender/gender.component.mjs +16 -9
  13. package/esm2022/lib/pages/myaccount/home/home.component.mjs +5 -5
  14. package/esm2022/lib/pages/myaccount/personal-info/info.component.mjs +6 -6
  15. package/esm2022/lib/pages/myaccount/personal-info/profile/profile.component.mjs +5 -5
  16. package/esm2022/lib/pages/myaccount/personal-info/username/username.component.mjs +6 -6
  17. package/esm2022/lib/pages/myaccount/phone/phone.component.mjs +5 -5
  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 +6 -6
  20. package/esm2022/lib/pages/myaccount/security/security-password/security-password.component.mjs +5 -5
  21. package/esm2022/lib/pages/myaccount/security/security-verification/security-verification.component.mjs +3 -3
  22. package/esm2022/lib/services/wechat-login.service.mjs +4 -4
  23. package/fesm2022/{rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs → rolatech-angular-account-email-verification.component-BMf1IfbK.mjs} +4 -4
  24. package/fesm2022/{rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs.map → rolatech-angular-account-email-verification.component-BMf1IfbK.mjs.map} +1 -1
  25. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs +44 -0
  26. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs.map +1 -0
  27. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs +55 -0
  28. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs.map +1 -0
  29. package/fesm2022/{rolatech-angular-account-home.component-CLpbrgbY.mjs → rolatech-angular-account-home.component-BiM95cTU.mjs} +6 -6
  30. package/fesm2022/rolatech-angular-account-home.component-BiM95cTU.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-info.component-CYY20QY4.mjs +98 -0
  32. package/fesm2022/rolatech-angular-account-info.component-CYY20QY4.mjs.map +1 -0
  33. package/fesm2022/{rolatech-angular-account-login.routes-Ck2VnoP1.mjs → rolatech-angular-account-login.routes-BGoZUcbP.mjs} +5 -5
  34. package/fesm2022/{rolatech-angular-account-login.routes-Ck2VnoP1.mjs.map → rolatech-angular-account-login.routes-BGoZUcbP.mjs.map} +1 -1
  35. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs +68 -0
  36. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs.map +1 -0
  37. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs +50 -0
  38. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs.map +1 -0
  39. package/fesm2022/{rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs → rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs} +37 -37
  40. package/fesm2022/rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs.map +1 -0
  41. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs +203 -0
  42. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs.map +1 -0
  43. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs +42 -0
  44. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs.map +1 -0
  45. package/fesm2022/rolatech-angular-account.mjs +1 -1
  46. package/package.json +1 -1
  47. package/themes/_default.scss +1 -1
  48. package/fesm2022/rolatech-angular-account-email.component-OZQWgvRq.mjs +0 -44
  49. package/fesm2022/rolatech-angular-account-email.component-OZQWgvRq.mjs.map +0 -1
  50. package/fesm2022/rolatech-angular-account-gender.component-et-tBTIn.mjs +0 -48
  51. package/fesm2022/rolatech-angular-account-gender.component-et-tBTIn.mjs.map +0 -1
  52. package/fesm2022/rolatech-angular-account-home.component-CLpbrgbY.mjs.map +0 -1
  53. package/fesm2022/rolatech-angular-account-info.component-BylW4MU8.mjs +0 -98
  54. package/fesm2022/rolatech-angular-account-info.component-BylW4MU8.mjs.map +0 -1
  55. package/fesm2022/rolatech-angular-account-phone.component-Y1-PQ88s.mjs +0 -68
  56. package/fesm2022/rolatech-angular-account-phone.component-Y1-PQ88s.mjs.map +0 -1
  57. package/fesm2022/rolatech-angular-account-profile.component-qPo6AqKP.mjs +0 -50
  58. package/fesm2022/rolatech-angular-account-profile.component-qPo6AqKP.mjs.map +0 -1
  59. package/fesm2022/rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs.map +0 -1
  60. package/fesm2022/rolatech-angular-account-security.routes-oSrz_UlJ.mjs +0 -203
  61. package/fesm2022/rolatech-angular-account-security.routes-oSrz_UlJ.mjs.map +0 -1
  62. package/fesm2022/rolatech-angular-account-username.component-aqWzvFh7.mjs +0 -42
  63. package/fesm2022/rolatech-angular-account-username.component-aqWzvFh7.mjs.map +0 -1
@@ -4,11 +4,11 @@ export class WeChatLoginService {
4
4
  constructor() {
5
5
  this.onWeChatLogin = new EventEmitter();
6
6
  }
7
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: WeChatLoginService, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
8
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: WeChatLoginService, ngImport: i0 }); }
9
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: WeChatLoginService, providedIn: 'root' }); }
7
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: WeChatLoginService, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
8
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: WeChatLoginService, ngImport: i0 }); }
9
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: WeChatLoginService, providedIn: 'root' }); }
10
10
  }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: WeChatLoginService, decorators: [{
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: WeChatLoginService, decorators: [{
12
12
  type: Injectable,
13
13
  args: [{
14
14
  providedIn: 'root',
@@ -17,13 +17,13 @@ class EmailVerificationComponent extends BaseComponent {
17
17
  this.dialogService.open(options);
18
18
  this.dialogService.confirmed().subscribe((confirmed) => { });
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EmailVerificationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: EmailVerificationComponent, isStandalone: true, selector: "myaccount-email-verification", usesInheritance: true, ngImport: i0, template: "<div class=\"p-3\">Email verification</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: EmailVerificationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
21
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: EmailVerificationComponent, isStandalone: true, selector: "myaccount-email-verification", usesInheritance: true, ngImport: i0, template: "<div class=\"p-3\">Email verification</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EmailVerificationComponent, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: EmailVerificationComponent, decorators: [{
24
24
  type: Component,
25
25
  args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'myaccount-email-verification', template: "<div class=\"p-3\">Email verification</div>\n" }]
26
26
  }] });
27
27
 
28
28
  export { EmailVerificationComponent };
29
- //# sourceMappingURL=rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs.map
29
+ //# sourceMappingURL=rolatech-angular-account-email-verification.component-BMf1IfbK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-account-email-verification.component-Wgkfs9Lk.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'myaccount-email-verification',\n templateUrl: './email-verification.component.html',\n styleUrls: ['./email-verification.component.scss'],\n})\nexport class EmailVerificationComponent extends BaseComponent implements OnInit {\n ngOnInit(): void {\n this.show();\n }\n show() {\n const options = {\n title: '确认删除吗',\n message: 'CONFIRM.DOWNLOAD.JOB.MESSAGE',\n cancelText: '取消',\n confirmText: '确认',\n };\n this.dialogService.open(options);\n this.dialogService.confirmed().subscribe((confirmed) => {});\n }\n}\n","<div class=\"p-3\">Email verification</div>\n"],"names":[],"mappings":";;;;;AAWM,MAAO,0BAA2B,SAAQ,aAAa,CAAA;IAC3D,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE,CAAC;KACb;IACD,IAAI,GAAA;AACF,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,OAAO,EAAE,8BAA8B;AACvC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,WAAW,EAAE,IAAI;SAClB,CAAC;AACF,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjC,QAAA,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,SAAS,KAAM,GAAC,CAAC,CAAC;KAC7D;8GAbU,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,ECXvC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+CACA,EDKY,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,8BAAE,uBAAuB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3C,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,WACP,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,YAC7C,8BAA8B,EAAA,QAAA,EAAA,+CAAA,EAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"rolatech-angular-account-email-verification.component-BMf1IfbK.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'myaccount-email-verification',\n templateUrl: './email-verification.component.html',\n styleUrls: ['./email-verification.component.scss'],\n})\nexport class EmailVerificationComponent extends BaseComponent implements OnInit {\n ngOnInit(): void {\n this.show();\n }\n show() {\n const options = {\n title: '确认删除吗',\n message: 'CONFIRM.DOWNLOAD.JOB.MESSAGE',\n cancelText: '取消',\n confirmText: '确认',\n };\n this.dialogService.open(options);\n this.dialogService.confirmed().subscribe((confirmed) => {});\n }\n}\n","<div class=\"p-3\">Email verification</div>\n"],"names":[],"mappings":";;;;;AAWM,MAAO,0BAA2B,SAAQ,aAAa,CAAA;IAC3D,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE,CAAC;KACb;IACD,IAAI,GAAA;AACF,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,OAAO,EAAE,8BAA8B;AACvC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,WAAW,EAAE,IAAI;SAClB,CAAC;AACF,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjC,QAAA,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,SAAS,KAAM,GAAC,CAAC,CAAC;KAC7D;8GAbU,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,ECXvC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+CACA,EDKY,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,8BAAE,uBAAuB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3C,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,WACP,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,YAC7C,8BAA8B,EAAA,QAAA,EAAA,+CAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,44 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, effect, Component } from '@angular/core';
3
+ import { AuthUserService, AuthStore } from '@rolatech/angular-auth';
4
+ import { AngularCommonModule } from '@rolatech/angular-common';
5
+ import { BaseComponent, AngularComponentsModule, AppContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
6
+ import { BackButtonDirective } from '@rolatech/angular-services';
7
+ import * as i1 from '@angular/forms';
8
+ import * as i2 from '@angular/material/button';
9
+ import * as i3 from '@angular/material/form-field';
10
+ import * as i4 from '@angular/material/input';
11
+
12
+ class EmailComponent extends BaseComponent {
13
+ constructor() {
14
+ super();
15
+ this.authUserService = inject(AuthUserService);
16
+ this.authStore = inject(AuthStore);
17
+ this.user = this.authStore.user;
18
+ this.email = '';
19
+ effect(() => {
20
+ this.email = this.user()?.email;
21
+ });
22
+ }
23
+ ngOnInit() { }
24
+ save() {
25
+ this.authUserService.update({ email: this.email }).subscribe({
26
+ next: (res) => {
27
+ this.snackBarService.open('修改成功');
28
+ this.authStore.updateEmail(this.email);
29
+ },
30
+ error: (error) => {
31
+ this.snackBarService.open(error.message);
32
+ },
33
+ });
34
+ }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: EmailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: EmailComponent, isStandalone: true, selector: "rolatech-account-email", usesInheritance: true, ngImport: i0, template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u90AE\u7BB1\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u60A8\u53EF\u4EE5\u901A\u8FC7\u90AE\u7BB1\u83B7\u5F97\u66F4\u591A\u6211\u4EEC\u7684\u4EA7\u54C1\u4FE1\u606F</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\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-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\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"] }] }); }
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: EmailComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective, AppContainerComponent, ToolbarComponent], selector: 'rolatech-account-email', template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u90AE\u7BB1\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u60A8\u53EF\u4EE5\u901A\u8FC7\u90AE\u7BB1\u83B7\u5F97\u66F4\u591A\u6211\u4EEC\u7684\u4EA7\u54C1\u4FE1\u606F</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\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-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-app-container>\n" }]
41
+ }], ctorParameters: () => [] });
42
+
43
+ export { EmailComponent };
44
+ //# sourceMappingURL=rolatech-angular-account-email.component-BQaELPci.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-email.component-BQaELPci.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/email/email.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/email/email.component.html"],"sourcesContent":["import { Component, OnInit, PLATFORM_ID, computed, effect, inject, model, signal } from '@angular/core';\nimport { AuthService, AuthStore, 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: [AngularCommonModule, AngularComponentsModule, BackButtonDirective, AppContainerComponent, ToolbarComponent],\n selector: 'rolatech-account-email',\n templateUrl: './email.component.html',\n styleUrls: ['./email.component.scss'],\n})\nexport class EmailComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n authStore = inject(AuthStore);\n user = this.authStore.user;\n email: string | undefined = '';\n constructor() {\n super();\n effect(() => {\n this.email = this.user()?.email;\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.update({ email: this.email }).subscribe({\n next: (res) => {\n this.snackBarService.open('修改成功');\n this.authStore.updateEmail(this.email!);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-app-container>\n <rolatech-toolbar title=\"修改邮箱\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">您可以通过邮箱获得更多我们的产品信息</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-app-container>\n"],"names":[],"mappings":";;;;;;;;;;;AAaM,MAAO,cAAe,SAAQ,aAAa,CAAA;AAK/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AALV,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAC3B,IAAK,CAAA,KAAA,GAAuB,EAAE,CAAC;QAG7B,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC;AAClC,SAAC,CAAC,CAAC;KACJ;AACD,IAAA,QAAQ,MAAW;IAEnB,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;AAC3D,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,KAAM,CAAC,CAAC;aACzC;AACD,YAAA,KAAK,EAAE,CAAC,KAAK,KAAI;gBACf,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aAC1C;AACF,SAAA,CAAC,CAAC;KACJ;8GAvBU,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AAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,QAAA,EAAA,wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKzG,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,CAAC,YAC3G,wBAAwB,EAAA,QAAA,EAAA,8tBAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,55 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, effect, Component } from '@angular/core';
3
+ import * as i3 from '@angular/material/radio';
4
+ import { MatRadioModule } from '@angular/material/radio';
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 { U as UserGender } from './rolatech-angular-account-user-CK_zEFn_.mjs';
10
+ import * as i2 from '@angular/material/button';
11
+ import { MatButtonModule } from '@angular/material/button';
12
+ import * as i1 from '@angular/forms';
13
+
14
+ class GenderComponent extends BaseComponent {
15
+ constructor() {
16
+ super();
17
+ this.authUserService = inject(AuthUserService);
18
+ this.GENDERS = ['男', '女', '不公开'];
19
+ this.gender = UserGender;
20
+ this.selectedGender = '';
21
+ this.user = inject(AuthService).user;
22
+ this.email = '';
23
+ effect(() => {
24
+ this.selectedGender = this.gender[this.user()?.gender];
25
+ });
26
+ }
27
+ ngOnInit() { }
28
+ save() {
29
+ this.authUserService.update({ gender: this.gender[this.selectedGender] }).subscribe({
30
+ next: (res) => {
31
+ this.snackBarService.open('修改成功');
32
+ },
33
+ error: (error) => {
34
+ this.snackBarService.open(error.message);
35
+ },
36
+ });
37
+ }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GenderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: GenderComponent, isStandalone: true, selector: "rolatech-account-gender", usesInheritance: true, ngImport: i0, template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u8BBE\u7F6E\u6027\u522B\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <label class=\"px-2\">\u6027\u522B\u9009\u62E9</label>\n <mat-radio-group class=\"flex flex-col\" color=\"primary\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\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-20 p-2 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-app-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { 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: "directive", type: i3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatRadioModule }, { 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"] }, { kind: "ngmodule", type: MatButtonModule }] }); }
40
+ }
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GenderComponent, decorators: [{
42
+ type: Component,
43
+ args: [{ standalone: true, imports: [
44
+ AngularCommonModule,
45
+ AngularComponentsModule,
46
+ MatRadioModule,
47
+ BackButtonDirective,
48
+ AppContainerComponent,
49
+ ToolbarComponent,
50
+ MatButtonModule,
51
+ ], selector: 'rolatech-account-gender', template: "<rolatech-app-container>\n <rolatech-toolbar title=\"\u8BBE\u7F6E\u6027\u522B\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <label class=\"px-2\">\u6027\u522B\u9009\u62E9</label>\n <mat-radio-group class=\"flex flex-col\" color=\"primary\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\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-20 p-2 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-app-container>\n" }]
52
+ }], ctorParameters: () => [] });
53
+
54
+ export { GenderComponent };
55
+ //# sourceMappingURL=rolatech-angular-account-gender.component-9GJeEE9U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-gender.component-9GJeEE9U.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/gender/gender.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/gender/gender.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatRadioModule } from '@angular/material/radio';\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';\nimport { UserGender } from '../../../contant/user';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n standalone: true,\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n MatRadioModule,\n BackButtonDirective,\n AppContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n ],\n selector: 'rolatech-account-gender',\n templateUrl: './gender.component.html',\n styleUrls: ['./gender.component.scss'],\n})\nexport class GenderComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n GENDERS: string[] = ['男', '女', '不公开'];\n gender: any = UserGender;\n selectedGender = '';\n\n user = inject(AuthService).user;\n email: string | undefined = '';\n constructor() {\n super();\n effect(() => {\n this.selectedGender = this.gender[this.user()?.gender!];\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.update({ gender: this.gender[this.selectedGender] }).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=\"设置性别\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <label class=\"px-2\">性别选择</label>\n <mat-radio-group class=\"flex flex-col\" color=\"primary\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 p-2 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-app-container>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAwBM,MAAO,eAAgB,SAAQ,aAAa,CAAA;AAQhD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AARV,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAC1C,IAAO,CAAA,OAAA,GAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QACtC,IAAM,CAAA,MAAA,GAAQ,UAAU,CAAC;QACzB,IAAc,CAAA,cAAA,GAAG,EAAE,CAAC;AAEpB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAChC,IAAK,CAAA,KAAA,GAAuB,EAAE,CAAC;QAG7B,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAO,CAAC,CAAC;AAC1D,SAAC,CAAC,CAAC;KACJ;AACD,IAAA,QAAQ,MAAW;IAEnB,IAAI,GAAA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,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,SAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACvB,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,mBAAmB,EACnB,QAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,EACrB,QAAA,EAAA,wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,+HAChB,eAAe,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAf3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA;wBACP,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,mBAAmB;wBACnB,qBAAqB;wBACrB,gBAAgB;wBAChB,eAAe;AAChB,qBAAA,EAAA,QAAA,EACS,yBAAyB,EAAA,QAAA,EAAA,uuBAAA,EAAA,CAAA;;;;;"}
@@ -3,7 +3,7 @@ import { inject, Component } from '@angular/core';
3
3
  import { AuthService } from '@rolatech/angular-auth';
4
4
  import { BaseComponent, AngularComponentsModule, AppContainerComponent, SpinnerComponent, TabsComponent, TabComponent, ToolbarComponent, IconButtonComponent } from '@rolatech/angular-components';
5
5
  import { AngularCommonModule } from '@rolatech/angular-common';
6
- import { U as UserItemComponent } from './rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs';
6
+ import { U as UserItemComponent } from './rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs';
7
7
  import '@angular/common';
8
8
  import '@angular/material/button';
9
9
  import '@angular/material/snack-bar';
@@ -54,10 +54,10 @@ class HomeComponent extends BaseComponent {
54
54
  ngOnInit() {
55
55
  this.select = this.links.findIndex((item) => item.status === '');
56
56
  }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: HomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
58
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: HomeComponent, isStandalone: true, selector: "rolatech-account-home", usesInheritance: true, ngImport: i0, template: "@if (user(); as user) {\n <rolatech-app-container>\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-orange-600\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\">\u6B22\u8FCE\u56DE\u6765, {{ user.name }}</p>\n <p class=\"text-md\">\u7528\u6237\u4E2D\u5FC3, \u65B9\u4FBF\u60A8\u7EF4\u62A4\u4E2A\u4EBA\u4FE1\u606F, \u8FD9\u4F1A\u6709\u4E00\u4E2A\u5F88\u597D\u7684\u4F53\u9A8C</p>\n </div>\n </rolatech-app-container>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: AppContainerComponent, selector: "rolatech-app-container" }] }); }
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
58
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: HomeComponent, isStandalone: true, selector: "rolatech-account-home", usesInheritance: true, ngImport: i0, template: "@if (user(); as user) {\n <rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-orange-600\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\">\u6B22\u8FCE\u56DE\u6765, {{ user.name }}</p>\n <p class=\"text-md\">\u7528\u6237\u4E2D\u5FC3, \u65B9\u4FBF\u60A8\u7EF4\u62A4\u4E2A\u4EBA\u4FE1\u606F, \u8FD9\u4F1A\u6709\u4E00\u4E2A\u5F88\u597D\u7684\u4F53\u9A8C</p>\n </div>\n </div>\n </rolatech-app-container>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: AppContainerComponent, selector: "rolatech-app-container" }] }); }
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: HomeComponent, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HomeComponent, decorators: [{
61
61
  type: Component,
62
62
  args: [{ standalone: true, imports: [
63
63
  AngularCommonModule,
@@ -70,8 +70,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
70
70
  AppContainerComponent,
71
71
  ToolbarComponent,
72
72
  IconButtonComponent,
73
- ], selector: 'rolatech-account-home', template: "@if (user(); as user) {\n <rolatech-app-container>\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-orange-600\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\">\u6B22\u8FCE\u56DE\u6765, {{ user.name }}</p>\n <p class=\"text-md\">\u7528\u6237\u4E2D\u5FC3, \u65B9\u4FBF\u60A8\u7EF4\u62A4\u4E2A\u4EBA\u4FE1\u606F, \u8FD9\u4F1A\u6709\u4E00\u4E2A\u5F88\u597D\u7684\u4F53\u9A8C</p>\n </div>\n </rolatech-app-container>\n}\n" }]
73
+ ], selector: 'rolatech-account-home', template: "@if (user(); as user) {\n <rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-orange-600\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\">\u6B22\u8FCE\u56DE\u6765, {{ user.name }}</p>\n <p class=\"text-md\">\u7528\u6237\u4E2D\u5FC3, \u65B9\u4FBF\u60A8\u7EF4\u62A4\u4E2A\u4EBA\u4FE1\u606F, \u8FD9\u4F1A\u6709\u4E00\u4E2A\u5F88\u597D\u7684\u4F53\u9A8C</p>\n </div>\n </div>\n </rolatech-app-container>\n}\n" }]
74
74
  }], ctorParameters: () => [] });
75
75
 
76
76
  export { HomeComponent };
77
- //# sourceMappingURL=rolatech-angular-account-home.component-CLpbrgbY.mjs.map
77
+ //# sourceMappingURL=rolatech-angular-account-home.component-BiM95cTU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-home.component-BiM95cTU.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/home/home.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/home/home.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AuthService } from '@rolatech/angular-auth';\nimport {\n AngularComponentsModule,\n AppContainerComponent,\n BaseComponent,\n IconButtonComponent,\n SpinnerComponent,\n TabComponent,\n TabsComponent,\n ToolbarComponent,\n} from '@rolatech/angular-components';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { UserItemComponent } from '../../../components';\n\n@Component({\n standalone: true,\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n SpinnerComponent,\n UserItemComponent,\n TabsComponent,\n TabComponent,\n ToolbarComponent,\n AppContainerComponent,\n ToolbarComponent,\n IconButtonComponent,\n ],\n selector: 'rolatech-account-home',\n templateUrl: './home.component.html',\n styleUrls: ['./home.component.scss'],\n})\nexport class HomeComponent extends BaseComponent implements OnInit {\n links = [\n {\n name: '全部',\n icon: 'dashboard',\n status: '',\n path: false,\n },\n {\n name: '待付款',\n icon: 'category',\n status: 'created',\n path: true,\n },\n {\n name: '已支付',\n icon: 'category',\n status: 'paid',\n path: true,\n },\n {\n name: '已退款',\n icon: 'category',\n status: 'refunded',\n path: true,\n },\n {\n name: '已取消',\n icon: 'category',\n status: 'canceled',\n path: true,\n },\n ];\n user = inject(AuthService).user;\n select = 0;\n constructor() {\n super();\n }\n ngOnInit(): void {\n this.select = this.links.findIndex((item) => item.status === '');\n }\n}\n","@if (user(); as user) {\n <rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-orange-600\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\">欢迎回来, {{ user.name }}</p>\n <p class=\"text-md\">用户中心, 方便您维护个人信息, 这会有一个很好的体验</p>\n </div>\n </div>\n </rolatech-app-container>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiCM,MAAO,aAAc,SAAQ,aAA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AA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,wGCjC1B,gvBAiBA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDCI,mBAAmB,EACnB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,uBAAuB,+BAMvB,qBAAqB,EAAA,QAAA,EAAA,wBAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQZ,aAAa,EAAA,UAAA,EAAA,CAAA;kBAlBzB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA;wBACP,mBAAmB;wBACnB,uBAAuB;wBACvB,gBAAgB;wBAChB,iBAAiB;wBACjB,aAAa;wBACb,YAAY;wBACZ,gBAAgB;wBAChB,qBAAqB;wBACrB,gBAAgB;wBAChB,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EACS,uBAAuB,EAAA,QAAA,EAAA,gvBAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,98 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, output, Component, Inject } from '@angular/core';
3
+ import { AuthUserService, AuthService } from '@rolatech/angular-auth';
4
+ import { AngularCommonModule } from '@rolatech/angular-common';
5
+ import { AngularComponentsModule, SpinnerComponent, AppContainerComponent } from '@rolatech/angular-components';
6
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
7
+ import { U as UserGender } from './rolatech-angular-account-user-CK_zEFn_.mjs';
8
+ import { CommonModule } from '@angular/common';
9
+ import * as i2 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import * as i3 from '@angular/material/icon';
12
+ import { MatIconModule } from '@angular/material/icon';
13
+ import { SnackBarService } from '@rolatech/angular-services';
14
+ import * as i1 from '@angular/router';
15
+ import * as i2$1 from '@angular/material/divider';
16
+ import * as i4 from '@angular/material/list';
17
+
18
+ class AvatarUpdateDialogComponent {
19
+ constructor(data) {
20
+ this.data = data;
21
+ this.dialogRef = inject(MatDialogRef);
22
+ this.authUserService = inject(AuthUserService);
23
+ this.snackBarService = inject(SnackBarService);
24
+ this.avatar = '';
25
+ this.save = output();
26
+ this.avatar = data.avatar;
27
+ }
28
+ cancel() {
29
+ this.dialogRef.close();
30
+ }
31
+ onSave() {
32
+ this.save.emit(this.avatar);
33
+ }
34
+ onUpload(event) {
35
+ const file = event.target.files[0];
36
+ if (file) {
37
+ const reader = new FileReader();
38
+ reader.readAsDataURL(file);
39
+ reader.onload = () => {
40
+ this.avatar = reader.result;
41
+ // this.isUploading = true;
42
+ const formData = new FormData();
43
+ formData.append('file', file);
44
+ this.authUserService.uploadAvatar(formData).subscribe({
45
+ next: (res) => {
46
+ this.snackBarService.open('更新成功');
47
+ // this.isUploading = false;
48
+ },
49
+ error: (e) => {
50
+ // this.isUploading = false;
51
+ // this.snackBar.open('上传失败: ' + e.message);
52
+ },
53
+ });
54
+ };
55
+ reader.onerror = (error) => {
56
+ // this.isUploading = false;
57
+ };
58
+ }
59
+ }
60
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AvatarUpdateDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
61
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: AvatarUpdateDialogComponent, isStandalone: true, selector: "rolatech-account-avatar-update-dialog", outputs: { save: "save" }, ngImport: i0, template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4FEE\u6539\u5934\u50CF</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-orange-600 w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n\n <!-- <div class=\"p-3 flex justify-end items-center gap-3\">\n <button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\n <button mat-flat-button color=\"primary\" (click)=\"onSave()\">\u4FDD\u5B58</button>\n </div> -->\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>\u66F4\u6362\u5934\u50CF</span>\n </button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AvatarUpdateDialogComponent, decorators: [{
64
+ type: Component,
65
+ args: [{ selector: 'rolatech-account-avatar-update-dialog', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule], template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4FEE\u6539\u5934\u50CF</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-orange-600 w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n\n <!-- <div class=\"p-3 flex justify-end items-center gap-3\">\n <button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\n <button mat-flat-button color=\"primary\" (click)=\"onSave()\">\u4FDD\u5B58</button>\n </div> -->\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>\u66F4\u6362\u5934\u50CF</span>\n </button>\n </div>\n</div>\n" }]
66
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
67
+ type: Inject,
68
+ args: [MAT_DIALOG_DATA]
69
+ }] }] });
70
+
71
+ class InfoComponent {
72
+ constructor() {
73
+ this.authUserService = inject(AuthUserService);
74
+ this.dialog = inject(MatDialog);
75
+ this.user = inject(AuthService).user;
76
+ this.gender = UserGender;
77
+ }
78
+ ngOnInit() { }
79
+ updateAvatar(avatar) {
80
+ const dialogRef = this.dialog.open(AvatarUpdateDialogComponent, {
81
+ data: {
82
+ avatar: avatar,
83
+ },
84
+ });
85
+ dialogRef.afterClosed().subscribe((result) => {
86
+ location.reload();
87
+ });
88
+ }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: InfoComponent, isStandalone: true, selector: "rolatech-account-info", ngImport: i0, template: "<rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u4E2A\u4EBA\u4FE1\u606F</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5168\u90E8\u5185\u5BB9</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3 mb-14\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u5934\u50CF</span>\n <span class=\"w-24 text-sm dark:text-white\">\u8D26\u6237\u7684\u5934\u50CF</span>\n </div>\n <div\n class=\"mr-6 bg-orange-600 w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u59D3\u540D</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u6027\u522B</span>\n <span>{{ gender[user.gender] || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u7528\u6237\u540D</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u8054\u7CFB\u65B9\u5F0F</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u90AE\u7BB1</span>\n <span>{{ user.email || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u7535\u8BDD</span>\n <span>{{ user.phone || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n }\n </div>\n</rolatech-app-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "component", type: AppContainerComponent, selector: "rolatech-app-container" }] }); }
91
+ }
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: InfoComponent, decorators: [{
93
+ type: Component,
94
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent, AppContainerComponent], selector: 'rolatech-account-info', template: "<rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u4E2A\u4EBA\u4FE1\u606F</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5168\u90E8\u5185\u5BB9</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3 mb-14\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u5934\u50CF</span>\n <span class=\"w-24 text-sm dark:text-white\">\u8D26\u6237\u7684\u5934\u50CF</span>\n </div>\n <div\n class=\"mr-6 bg-orange-600 w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u59D3\u540D</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u6027\u522B</span>\n <span>{{ gender[user.gender] || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u7528\u6237\u540D</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u8054\u7CFB\u65B9\u5F0F</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u90AE\u7BB1</span>\n <span>{{ user.email || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">\u7535\u8BDD</span>\n <span>{{ user.phone || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n }\n </div>\n</rolatech-app-container>\n" }]
95
+ }] });
96
+
97
+ export { InfoComponent };
98
+ //# sourceMappingURL=rolatech-angular-account-info.component-CYY20QY4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-info.component-CYY20QY4.mjs","sources":["../../../../libs/angular-account/src/lib/components/avatar-update-dialog/avatar-update-dialog.component.ts","../../../../libs/angular-account/src/lib/components/avatar-update-dialog/avatar-update-dialog.component.html","../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/info.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/info.component.html"],"sourcesContent":["import { Component, Inject, inject, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { MatIconModule } from '@angular/material/icon';\nimport { SnackBarService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-account-avatar-update-dialog',\n standalone: true,\n imports: [CommonModule, MatButtonModule, MatIconModule],\n templateUrl: './avatar-update-dialog.component.html',\n styleUrl: './avatar-update-dialog.component.scss',\n})\nexport class AvatarUpdateDialogComponent {\n dialogRef = inject(MatDialogRef);\n authUserService = inject(AuthUserService);\n snackBarService = inject(SnackBarService);\n avatar: any = '';\n save = output<any>();\n\n constructor(@Inject(MAT_DIALOG_DATA) public data: { avatar: string }) {\n this.avatar = data.avatar;\n }\n\n cancel() {\n this.dialogRef.close();\n }\n onSave() {\n this.save.emit(this.avatar);\n }\n onUpload(event: any) {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n this.avatar = reader.result;\n // this.isUploading = true;\n const formData = new FormData();\n formData.append('file', file);\n\n this.authUserService.uploadAvatar(formData).subscribe({\n next: (res: any) => {\n this.snackBarService.open('更新成功');\n // this.isUploading = false;\n },\n error: (e) => {\n // this.isUploading = false;\n // this.snackBar.open('上传失败: ' + e.message);\n },\n });\n };\n reader.onerror = (error) => {\n // this.isUploading = false;\n };\n }\n }\n}\n","<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">修改头像</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-orange-600 w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n\n <!-- <div class=\"p-3 flex justify-end items-center gap-3\">\n <button mat-button (click)=\"cancel()\">取消</button>\n <button mat-flat-button color=\"primary\" (click)=\"onSave()\">保存</button>\n </div> -->\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>更换头像</span>\n </button>\n </div>\n</div>\n","import { Component, computed, inject, OnInit } from '@angular/core';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, AppContainerComponent, SpinnerComponent } from '@rolatech/angular-components';\nimport { MatDialog } from '@angular/material/dialog';\nimport { UserGender } from '../../../contant/user';\nimport { AvatarUpdateDialogComponent } from '../../../components/avatar-update-dialog/avatar-update-dialog.component';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent, AppContainerComponent],\n selector: 'rolatech-account-info',\n templateUrl: './info.component.html',\n styleUrls: ['./info.component.scss'],\n})\nexport class InfoComponent implements OnInit {\n authUserService = inject(AuthUserService);\n dialog = inject(MatDialog);\n user = inject(AuthService).user;\n gender: any = UserGender;\n\n ngOnInit(): void {}\n updateAvatar(avatar: any) {\n const dialogRef = this.dialog.open(AvatarUpdateDialogComponent, {\n data: {\n avatar: avatar,\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n location.reload();\n });\n }\n}\n","<rolatech-app-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">个人信息</p>\n <p class=\"text-md\">用户信息的全部内容</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3 mb-14\">\n <div class=\"p-3 text-xl\">基本设置</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">头像</span>\n <span class=\"w-24 text-sm dark:text-white\">账户的头像</span>\n </div>\n <div\n class=\"mr-6 bg-orange-600 w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">姓名</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">性别</span>\n <span>{{ gender[user.gender] || '未设置' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">用户名</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">联系方式</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">邮箱</span>\n <span>{{ user.email || '未设置' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm font-thin\">电话</span>\n <span>{{ user.phone || '未设置' }}</span>\n </div>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n }\n </div>\n</rolatech-app-container>\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;MAea,2BAA2B,CAAA;AAOtC,IAAA,WAAA,CAA4C,IAAwB,EAAA;QAAxB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAoB;AANpE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACjC,QAAA,IAAA,CAAA,eA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A,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,wDAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,QAAA,EAAA,wBAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKpF,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;iCACI,IAAI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,EAAA,QAAA,EACtF,uBAAuB,EAAA,QAAA,EAAA,klJAAA,EAAA,CAAA;;;;;"}
@@ -3,7 +3,7 @@ import { inject, PLATFORM_ID, Component } from '@angular/core';
3
3
  import { AuthService } from '@rolatech/angular-auth';
4
4
  import { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';
5
5
  import { BaseComponent, AngularComponentsModule } from '@rolatech/angular-components';
6
- import { W as WeChatLoginService } from './rolatech-angular-account-rolatech-angular-account-OPsV8YM0.mjs';
6
+ import { W as WeChatLoginService } from './rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs';
7
7
  import '@angular/common';
8
8
  import '@angular/material/button';
9
9
  import '@angular/material/snack-bar';
@@ -37,10 +37,10 @@ class LoginWechatComponent extends BaseComponent {
37
37
  },
38
38
  });
39
39
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LoginWechatComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: LoginWechatComponent, isStandalone: true, selector: "rolatech-account-login-wechat", usesInheritance: true, ngImport: i0, template: "<div>loading...</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoginWechatComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: LoginWechatComponent, isStandalone: true, selector: "rolatech-account-login-wechat", usesInheritance: true, ngImport: i0, template: "<div>loading...</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
42
42
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LoginWechatComponent, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoginWechatComponent, decorators: [{
44
44
  type: Component,
45
45
  args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-login-wechat', template: "<div>loading...</div>\n" }]
46
46
  }] });
@@ -48,4 +48,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
48
48
  const loginRoutes = [{ path: '', component: LoginWechatComponent }];
49
49
 
50
50
  export { loginRoutes as default };
51
- //# sourceMappingURL=rolatech-angular-account-login.routes-Ck2VnoP1.mjs.map
51
+ //# sourceMappingURL=rolatech-angular-account-login.routes-BGoZUcbP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-account-login.routes-Ck2VnoP1.mjs","sources":["../../../../libs/angular-account/src/lib/components/login/login-wechat/login-wechat.component.ts","../../../../libs/angular-account/src/lib/components/login/login-wechat/login-wechat.component.html","../../../../libs/angular-account/src/lib/components/login/login.routes.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Component, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\nimport { WeChatLoginService } from '../../../services/wechat-login.service';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-account-login-wechat',\n templateUrl: './login-wechat.component.html',\n styleUrls: ['./login-wechat.component.scss'],\n})\nexport class LoginWechatComponent extends BaseComponent implements OnInit {\n authService = inject(AuthService);\n environment = inject(APP_CONFIG);\n platformId = inject(PLATFORM_ID);\n wechtLoginService = inject(WeChatLoginService);\n\n ngOnInit(): void {\n this.route.queryParams.subscribe({\n next: (params: any) => {\n this.wechatLogin(params.code, params.state);\n },\n });\n }\n wechatLogin(code: string, state: string) {\n this.authService.wechatLogin(code, state).subscribe({\n next: (res) => {\n if (res.name) {\n window.parent.postMessage({ code: 200 }, this.environment.accountsUrl);\n }\n },\n });\n }\n}\n","<div>loading...</div>\n","import { Routes } from '@angular/router';\nimport { LoginWechatComponent } from './login-wechat/login-wechat.component';\n\nconst loginRoutes: Routes = [{ path: '', component: LoginWechatComponent }];\nexport default loginRoutes;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AAPvD,IAAA,WAAA,GAAA;;AAQE,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC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AAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,8BAAE,uBAAuB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3C,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,WACP,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,YAC7C,+BAA+B,EAAA,QAAA,EAAA,yBAAA,EAAA,CAAA;;;AEP3C,MAAM,WAAW,GAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE;;;;"}
1
+ {"version":3,"file":"rolatech-angular-account-login.routes-BGoZUcbP.mjs","sources":["../../../../libs/angular-account/src/lib/components/login/login-wechat/login-wechat.component.ts","../../../../libs/angular-account/src/lib/components/login/login-wechat/login-wechat.component.html","../../../../libs/angular-account/src/lib/components/login/login.routes.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Component, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\nimport { WeChatLoginService } from '../../../services/wechat-login.service';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-account-login-wechat',\n templateUrl: './login-wechat.component.html',\n styleUrls: ['./login-wechat.component.scss'],\n})\nexport class LoginWechatComponent extends BaseComponent implements OnInit {\n authService = inject(AuthService);\n environment = inject(APP_CONFIG);\n platformId = inject(PLATFORM_ID);\n wechtLoginService = inject(WeChatLoginService);\n\n ngOnInit(): void {\n this.route.queryParams.subscribe({\n next: (params: any) => {\n this.wechatLogin(params.code, params.state);\n },\n });\n }\n wechatLogin(code: string, state: string) {\n this.authService.wechatLogin(code, state).subscribe({\n next: (res) => {\n if (res.name) {\n window.parent.postMessage({ code: 200 }, this.environment.accountsUrl);\n }\n },\n });\n }\n}\n","<div>loading...</div>\n","import { Routes } from '@angular/router';\nimport { LoginWechatComponent } from './login-wechat/login-wechat.component';\n\nconst loginRoutes: Routes = [{ path: '', component: LoginWechatComponent }];\nexport default loginRoutes;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AAPvD,IAAA,WAAA,GAAA;;AAQE,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAClC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACjC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AACjC,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAkBhD,KAAA;IAhBC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC;AAC/B,YAAA,IAAI,EAAE,CAAC,MAAW,KAAI;gBACpB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;aAC7C;AACF,SAAA,CAAC,CAAC;KACJ;IACD,WAAW,CAAC,IAAY,EAAE,KAAa,EAAA;QACrC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC;AAClD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,GAAG,CAAC,IAAI,EAAE;AACZ,oBAAA,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;iBACxE;aACF;AACF,SAAA,CAAC,CAAC;KACJ;8GArBU,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,ECdjC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,yBACA,EDQY,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,8BAAE,uBAAuB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3C,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,WACP,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,YAC7C,+BAA+B,EAAA,QAAA,EAAA,yBAAA,EAAA,CAAA;;;AEP3C,MAAM,WAAW,GAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE;;;;"}
@@ -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.1", ngImport: i0, type: PhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", 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\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\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-6\">\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.1", 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\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\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-6\">\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-D2v9enci.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-phone.component-D2v9enci.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=\"修改手机号\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">手机号是您在本站的唯一标识, 更改后将同时更改第三方绑定的手机号</p>\n <div class=\"flex flex-col mt-6\">\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 mat-flat-button class=\"w-[128px] ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-app-container>\n"],"names":[],"mappings":";;;;;;;;;;;AAaM,MAAO,cAAe,SAAQ,aAAa,CAAA;AAQ/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AARV,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAC1C,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;QACX,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;QAClB,IAAa,CAAA,aAAA,GAAG,EAAE,CAAC;QACnB,IAAc,CAAA,cAAA,GAAG,OAAO,CAAC;QAGvB,MAAM,CAAC,MAAK;YACV,IAA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