Refactor account page to user account page (#2235)

* Refactor account page to user account page
pull/2236/head
Thomas Kaul 1 year ago committed by GitHub
parent 183ac8fa2b
commit 3e98f097ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,8 +21,8 @@ const routes: Routes = [
{
path: 'account',
loadChildren: () =>
import('./pages/account/account-page.module').then(
(m) => m.AccountPageModule
import('./pages/user-account/user-account-page.module').then(
(m) => m.UserAccountPageModule
)
},
{

@ -2,12 +2,12 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
import { AccountPageComponent } from './account-page.component';
import { UserAccountPageComponent } from './user-account-page.component';
const routes: Routes = [
{
canActivate: [AuthGuard],
component: AccountPageComponent,
component: UserAccountPageComponent,
path: '',
title: $localize`My Ghostfolio`
}
@ -17,4 +17,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AccountPageRoutingModule {}
export class UserAccountPageRoutingModule {}

@ -24,6 +24,7 @@ import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service';
import { downloadAsFile, getDateFormatString } from '@ghostfolio/common/helper';
import { Access, User } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { format, parseISO } from 'date-fns';
import { uniq } from 'lodash';
import { DeviceDetectorService } from 'ngx-device-detector';
import { StripeService } from 'ngx-stripe';
@ -31,15 +32,14 @@ import { EMPTY, Subject } from 'rxjs';
import { catchError, switchMap, takeUntil } from 'rxjs/operators';
import { CreateOrUpdateAccessDialog } from './create-or-update-access-dialog/create-or-update-access-dialog.component';
import { format, parseISO } from 'date-fns';
@Component({
host: { class: 'page' },
selector: 'gf-account-page',
styleUrls: ['./account-page.scss'],
templateUrl: './account-page.html'
selector: 'gf-user-account-page',
styleUrls: ['./user-account-page.scss'],
templateUrl: './user-account-page.html'
})
export class AccountPageComponent implements OnDestroy, OnInit {
export class UserAccountPageComponent implements OnDestroy, OnInit {
@ViewChild('toggleSignInWithFingerprintEnabledElement')
signInWithFingerprintElement: MatCheckbox;

@ -12,14 +12,13 @@ import { GfPortfolioAccessTableModule } from '@ghostfolio/client/components/acce
import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator';
import { GfValueModule } from '@ghostfolio/ui/value';
import { AccountPageRoutingModule } from './account-page-routing.module';
import { AccountPageComponent } from './account-page.component';
import { GfCreateOrUpdateAccessDialogModule } from './create-or-update-access-dialog/create-or-update-access-dialog.module';
import { UserAccountPageRoutingModule } from './user-account-page-routing.module';
import { UserAccountPageComponent } from './user-account-page.component';
@NgModule({
declarations: [AccountPageComponent],
declarations: [UserAccountPageComponent],
imports: [
AccountPageRoutingModule,
CommonModule,
FormsModule,
GfCreateOrUpdateAccessDialogModule,
@ -33,7 +32,8 @@ import { GfCreateOrUpdateAccessDialogModule } from './create-or-update-access-di
MatFormFieldModule,
MatSelectModule,
ReactiveFormsModule,
RouterModule
RouterModule,
UserAccountPageRoutingModule
]
})
export class AccountPageModule {}
export class UserAccountPageModule {}
Loading…
Cancel
Save