Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/migrate show access token dialog component to standalone (#5525)

Sven Günther33067e260457
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2acbdd4d5a..b3ee567506 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Refactored the show access token dialog component to standalone
- Upgraded `prisma` from version `6.15.0` to `6.16.1`
## 2.199.0 - 2025-09-14
diff --git a/apps/client/src/app/pages/register/register-page.component.ts b/apps/client/src/app/pages/register/register-page.component.ts
index 35b9d5cd2b..0f644600b6 100644
--- a/apps/client/src/app/pages/register/register-page.component.ts
+++ b/apps/client/src/app/pages/register/register-page.component.ts
@@ -19,17 +19,11 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ShowAccessTokenDialogParams } from './show-access-token-dialog/interfaces/interfaces';
-import { ShowAccessTokenDialog } from './show-access-token-dialog/show-access-token-dialog.component';
-import { ShowAccessTokenDialogModule } from './show-access-token-dialog/show-access-token-dialog.module';
+import { GfShowAccessTokenDialogComponent } from './show-access-token-dialog/show-access-token-dialog.component';
@Component({
host: { class: 'page' },
- imports: [
- GfLogoComponent,
- MatButtonModule,
- RouterModule,
- ShowAccessTokenDialogModule
- ],
+ imports: [GfLogoComponent, MatButtonModule, RouterModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
selector: 'gf-register-page',
styleUrls: ['./register-page.scss'],
@@ -90,7 +84,7 @@ export class GfRegisterPageComponent implements OnDestroy, OnInit {
}
public openShowAccessTokenDialog() {
- const dialogRef = this.dialog.open(ShowAccessTokenDialog, {
+ const dialogRef = this.dialog.open(GfShowAccessTokenDialogComponent, {
data: {
deviceType: this.deviceType,
needsToAcceptTermsOfService: this.hasPermissionForSubscription
diff --git a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts
index f154851dff..a73d1cf2a5 100644
--- a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts
+++ b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts
@@ -1,15 +1,26 @@
import { DataService } from '@ghostfolio/client/services/data.service';
import { publicRoutes } from '@ghostfolio/common/routes/routes';
+import { ClipboardModule } from '@angular/cdk/clipboard';
+import { TextFieldModule } from '@angular/cdk/text-field';
+import { CommonModule } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
+ CUSTOM_ELEMENTS_SCHEMA,
Inject,
ViewChild
} from '@angular/core';
-import { MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatStepper } from '@angular/material/stepper';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { MatButtonModule } from '@angular/material/button';
+import { MatCheckboxModule } from '@angular/material/checkbox';
+import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatInputModule } from '@angular/material/input';
+import { MatStepper, MatStepperModule } from '@angular/material/stepper';
+import { RouterModule } from '@angular/router';
+import { IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import {
arrowForwardOutline,
@@ -23,12 +34,27 @@ import { ShowAccessTokenDialogParams } from './interfaces/interfaces';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
+ imports: [
+ ClipboardModule,
+ CommonModule,
+ FormsModule,
+ IonIcon,
+ MatButtonModule,
+ MatCheckboxModule,
+ MatDialogModule,
+ MatFormFieldModule,
+ MatInputModule,
+ MatStepperModule,
+ ReactiveFormsModule,
+ RouterModule,
+ TextFieldModule
+ ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
selector: 'gf-show-access-token-dialog',
- standalone: false,
styleUrls: ['./show-access-token-dialog.scss'],
templateUrl: 'show-access-token-dialog.html'
})
-export class ShowAccessTokenDialog {
+export class GfShowAccessTokenDialogComponent {
@ViewChild(MatStepper) stepper!: MatStepper;
public accessToken: string;
diff --git a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.module.ts b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.module.ts
deleted file mode 100644
index 0c7a6fc85d..0000000000
--- a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.module.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { ClipboardModule } from '@angular/cdk/clipboard';
-import { TextFieldModule } from '@angular/cdk/text-field';
-import { CommonModule } from '@angular/common';
-import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { MatButtonModule } from '@angular/material/button';
-import { MatCheckboxModule } from '@angular/material/checkbox';
-import { MatDialogModule } from '@angular/material/dialog';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { MatStepperModule } from '@angular/material/stepper';
-import { RouterModule } from '@angular/router';
-
-import { ShowAccessTokenDialog } from './show-access-token-dialog.component';
-
-@NgModule({
- declarations: [ShowAccessTokenDialog],
- imports: [
- ClipboardModule,
- CommonModule,
- FormsModule,
- MatButtonModule,
- MatCheckboxModule,
- MatDialogModule,
- MatFormFieldModule,
- MatInputModule,
- MatStepperModule,
- ReactiveFormsModule,
- RouterModule,
- TextFieldModule
- ],
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
-})
-export class ShowAccessTokenDialogModule {}