@rolatech/angular-account 17.2.9 → 17.3.0

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 (67) 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 +3 -3
  7. package/esm2022/lib/components/user-item/user-item.component.mjs +5 -5
  8. package/esm2022/lib/pages/accounts/signin/signin.component.mjs +7 -7
  9. package/esm2022/lib/pages/accounts/signup/signup.component.mjs +7 -7
  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 +7 -7
  13. package/esm2022/lib/pages/myaccount/home/home.component.mjs +9 -44
  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 +6 -13
  16. package/esm2022/lib/pages/myaccount/personal-info/username/username.component.mjs +6 -6
  17. package/esm2022/lib/pages/myaccount/phone/phone.component.mjs +15 -7
  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 +6 -6
  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-BMf1IfbK.mjs → rolatech-angular-account-email-verification.component-j5MMlpq4.mjs} +4 -4
  24. package/fesm2022/{rolatech-angular-account-email-verification.component-BMf1IfbK.mjs.map → rolatech-angular-account-email-verification.component-j5MMlpq4.mjs.map} +1 -1
  25. package/fesm2022/rolatech-angular-account-email.component-OLqoOYNY.mjs +44 -0
  26. package/fesm2022/rolatech-angular-account-email.component-OLqoOYNY.mjs.map +1 -0
  27. package/fesm2022/rolatech-angular-account-gender.component-OBCSGcJl.mjs +55 -0
  28. package/fesm2022/rolatech-angular-account-gender.component-OBCSGcJl.mjs.map +1 -0
  29. package/fesm2022/rolatech-angular-account-home.component-DX7IrKro.mjs +42 -0
  30. package/fesm2022/rolatech-angular-account-home.component-DX7IrKro.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-info.component-Bq6h7lOh.mjs +98 -0
  32. package/fesm2022/rolatech-angular-account-info.component-Bq6h7lOh.mjs.map +1 -0
  33. package/fesm2022/{rolatech-angular-account-login.routes-BGoZUcbP.mjs → rolatech-angular-account-login.routes-DFKK13HD.mjs} +5 -5
  34. package/fesm2022/{rolatech-angular-account-login.routes-BGoZUcbP.mjs.map → rolatech-angular-account-login.routes-DFKK13HD.mjs.map} +1 -1
  35. package/fesm2022/rolatech-angular-account-phone.component-CS_cOB8a.mjs +76 -0
  36. package/fesm2022/rolatech-angular-account-phone.component-CS_cOB8a.mjs.map +1 -0
  37. package/fesm2022/rolatech-angular-account-profile.component-C9lE8mss.mjs +43 -0
  38. package/fesm2022/rolatech-angular-account-profile.component-C9lE8mss.mjs.map +1 -0
  39. package/fesm2022/rolatech-angular-account-rolatech-angular-account-CUq5mgrn.mjs +444 -0
  40. package/fesm2022/rolatech-angular-account-rolatech-angular-account-CUq5mgrn.mjs.map +1 -0
  41. package/fesm2022/rolatech-angular-account-security.routes-0-TC-2OQ.mjs +203 -0
  42. package/fesm2022/rolatech-angular-account-security.routes-0-TC-2OQ.mjs.map +1 -0
  43. package/fesm2022/rolatech-angular-account-username.component-C3uU1lYv.mjs +42 -0
  44. package/fesm2022/rolatech-angular-account-username.component-C3uU1lYv.mjs.map +1 -0
  45. package/fesm2022/rolatech-angular-account.mjs +1 -1
  46. package/lib/pages/accounts/signin/signin.component.d.ts +1 -1
  47. package/lib/pages/myaccount/home/home.component.d.ts +0 -7
  48. package/package.json +1 -1
  49. package/themes/_default.scss +1 -1
  50. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs +0 -44
  51. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs.map +0 -1
  52. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs +0 -55
  53. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs.map +0 -1
  54. package/fesm2022/rolatech-angular-account-home.component-BiM95cTU.mjs +0 -77
  55. package/fesm2022/rolatech-angular-account-home.component-BiM95cTU.mjs.map +0 -1
  56. package/fesm2022/rolatech-angular-account-info.component-CYY20QY4.mjs +0 -98
  57. package/fesm2022/rolatech-angular-account-info.component-CYY20QY4.mjs.map +0 -1
  58. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs +0 -68
  59. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs.map +0 -1
  60. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs +0 -50
  61. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs.map +0 -1
  62. package/fesm2022/rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs +0 -444
  63. package/fesm2022/rolatech-angular-account-rolatech-angular-account-CDoIyg7X.mjs.map +0 -1
  64. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs +0 -203
  65. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs.map +0 -1
  66. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs +0 -42
  67. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs.map +0 -1
@@ -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, ContainerComponent } 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.3", 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.3", 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.3", 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.3", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.3", type: InfoComponent, isStandalone: true, selector: "rolatech-account-info", ngImport: i0, template: "<rolatech-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 text-[--rt-text-primary]\">\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-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: ContainerComponent, selector: "rolatech-container" }] }); }
91
+ }
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: InfoComponent, decorators: [{
93
+ type: Component,
94
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent, ContainerComponent], selector: 'rolatech-account-info', template: "<rolatech-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 text-[--rt-text-primary]\">\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-container>\n" }]
95
+ }] });
96
+
97
+ export { InfoComponent };
98
+ //# sourceMappingURL=rolatech-angular-account-info.component-Bq6h7lOh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-info.component-Bq6h7lOh.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, ContainerComponent, 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, ContainerComponent],\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-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 text-[--rt-text-primary]\">账户的头像</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-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,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAC1C,IAAM,CAAA,MAAA,GAAQ,EAAE,CAAC;QACjB,IAAI,CAAA,IAAA,GAAG,MAAM,EAAO,CAAC;AAGnB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KAC3B;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACxB;IACD,MAAM,GAAA;QACJ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7B;AACD,IAAA,QAAQ,CAAC,KAAU,EAAA;QACjB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI,EAAE;AACR,YAAA,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AAChC,YAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC3B,YAAA,MAAM,CAAC,MAAM,GAAG,MAAK;AACnB,gBAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;;AAE5B,gBAAA,MAAM,QAAQ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AA,mlJAAA,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-CDoIyg7X.mjs';
6
+ import { W as WeChatLoginService } from './rolatech-angular-account-rolatech-angular-account-CUq5mgrn.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.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 }] }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: LoginWechatComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.3", 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.1", ngImport: i0, type: LoginWechatComponent, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", 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.1", ngImpor
48
48
  const loginRoutes = [{ path: '', component: LoginWechatComponent }];
49
49
 
50
50
  export { loginRoutes as default };
51
- //# sourceMappingURL=rolatech-angular-account-login.routes-BGoZUcbP.mjs.map
51
+ //# sourceMappingURL=rolatech-angular-account-login.routes-DFKK13HD.mjs.map
@@ -1 +1 @@
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;;;;"}
1
+ {"version":3,"file":"rolatech-angular-account-login.routes-DFKK13HD.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;AAC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AAE;;;;"}
@@ -0,0 +1,76 @@
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 { MatButtonModule } from '@angular/material/button';
5
+ import { AuthService, AuthUserService } from '@rolatech/angular-auth';
6
+ import { AngularCommonModule } from '@rolatech/angular-common';
7
+ import { BaseComponent, AngularComponentsModule, ContainerComponent, 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 PhoneComponent extends BaseComponent {
14
+ constructor() {
15
+ super();
16
+ this.user = inject(AuthService).user;
17
+ this.authUserService = inject(AuthUserService);
18
+ this.phone = '';
19
+ this.code = '';
20
+ this.countDown = false;
21
+ this.countDownTime = 60;
22
+ this.showButtonText = '发送验证码';
23
+ effect(() => {
24
+ this.phone = this.user()?.phone;
25
+ });
26
+ }
27
+ ngOnInit() { }
28
+ sendSMSCode() {
29
+ this.countDown = true;
30
+ const start = setInterval(() => {
31
+ if (this.countDownTime >= 0) {
32
+ this.showButtonText = `${this.countDownTime--}秒重发`;
33
+ }
34
+ else {
35
+ clearInterval(start);
36
+ this.showButtonText = '重新发送';
37
+ this.countDown = false;
38
+ this.countDownTime = 60;
39
+ }
40
+ }, 1000);
41
+ this.authUserService.sendSMSCode('+86', this.phone).subscribe({
42
+ next: (res) => {
43
+ this.snackBarService.open('发送成功');
44
+ },
45
+ error: (error) => {
46
+ this.snackBarService.open(error.message);
47
+ },
48
+ });
49
+ }
50
+ save() {
51
+ this.authUserService.changePhone(this.phone, this.code).subscribe({
52
+ next: (res) => {
53
+ this.snackBarService.open('修改成功');
54
+ },
55
+ error: (error) => {
56
+ this.snackBarService.open(error.message);
57
+ },
58
+ });
59
+ }
60
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: PhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
61
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.3", type: PhoneComponent, isStandalone: true, selector: "rolatech-account-phone", usesInheritance: true, ngImport: i0, template: "<rolatech-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-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: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }] }); }
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: PhoneComponent, decorators: [{
64
+ type: Component,
65
+ args: [{ standalone: true, imports: [
66
+ AngularCommonModule,
67
+ AngularComponentsModule,
68
+ ContainerComponent,
69
+ ToolbarComponent,
70
+ MatButtonModule,
71
+ BackButtonDirective,
72
+ ], selector: 'rolatech-account-phone', template: "<rolatech-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-container>\n", styles: ["mat-form-field{width:100%}\n"] }]
73
+ }], ctorParameters: () => [] });
74
+
75
+ export { PhoneComponent };
76
+ //# sourceMappingURL=rolatech-angular-account-phone.component-CS_cOB8a.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-phone.component-CS_cOB8a.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 { MatButtonModule } from '@angular/material/button';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, 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 ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n BackButtonDirective,\n ],\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-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-container>\n"],"names":[],"mappings":";;;;;;;;;;;;AAqBM,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,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,KAAM,CAAC;AACnC,SAAC,CAAC,CAAC;KACJ;AACD,IAAA,QAAQ,MAAW;IAEnB,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;AACtB,QAAA,MAAM,KAAK,GAAG,WAAW,CAAC,MAAK;AAC7B,YAAA,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,EAAE;gBAC3B,IAAI,CAAC,cAAc,GAAG,CAAA,EAAG,IAAI,CAAC,aAAa,EAAE,CAAA,GAAA,CAAK,CAAC;aACpD;iBAAM;gBACL,aAAa,CAAC,KAAK,CAAC,CAAC;AACrB,gBAAA,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;AAC7B,gBAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;AACvB,gBAAA,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;aACzB;SACF,EAAE,IAAI,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,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,EAAA,kBAAkB,EAClB,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,EAChB,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,+BACf,mBAAmB,EAAA,QAAA,EAAA,sBAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMV,cAAc,EAAA,UAAA,EAAA,CAAA;kBAd1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA;wBACP,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,gBAAgB;wBAChB,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EACS,wBAAwB,EAAA,QAAA,EAAA,wyCAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,CAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,43 @@
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, ContainerComponent, 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.3", ngImport: i0, type: ProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.3", type: ProfileComponent, isStandalone: true, selector: "rolatech-account-profile", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u59D3\u540D\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\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-6\">\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 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n </div>\n</rolatech-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: ContainerComponent, selector: "rolatech-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.3", ngImport: i0, type: ProfileComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, MatButton, BackButtonDirective, ContainerComponent, ToolbarComponent], selector: 'rolatech-account-profile', template: "<rolatech-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u59D3\u540D\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\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-6\">\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 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n </div>\n</rolatech-container>\n" }]
40
+ }], ctorParameters: () => [] });
41
+
42
+ export { ProfileComponent };
43
+ //# sourceMappingURL=rolatech-angular-account-profile.component-C9lE8mss.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-profile.component-C9lE8mss.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, ContainerComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, MatButton, BackButtonDirective, ContainerComponent, ToolbarComponent],\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-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)]=\"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 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n </div>\n</rolatech-container>\n"],"names":[],"mappings":";;;;;;;;;;;;AAcM,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,SAAS,CAAC;AACnD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACnC;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;8GArBU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,S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