From 909f22979f8fe667b1b7675d3c08ed982c394a23 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 7 Apr 2021 17:08:25 +0300 Subject: [PATCH 1/2] add user profile screen --- apps/red-ui/src/app/app-routing.module.ts | 15 +++ apps/red-ui/src/app/app.module.ts | 3 +- .../base-screen/base-screen.component.html | 124 ++++++++++-------- .../base-screen/base-screen.component.ts | 8 +- .../user-profile-screen.component.html | 57 ++++++++ .../user-profile-screen.component.scss | 48 +++++++ .../user-profile-screen.component.ts | 91 +++++++++++++ apps/red-ui/src/assets/i18n/en.json | 16 ++- 8 files changed, 303 insertions(+), 59 deletions(-) create mode 100644 apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html create mode 100644 apps/red-ui/src/app/components/user-profile/user-profile-screen.component.scss create mode 100644 apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts diff --git a/apps/red-ui/src/app/app-routing.module.ts b/apps/red-ui/src/app/app-routing.module.ts index 23d068454..676a591e8 100644 --- a/apps/red-ui/src/app/app-routing.module.ts +++ b/apps/red-ui/src/app/app-routing.module.ts @@ -9,6 +9,7 @@ import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { DownloadsListScreenComponent } from './components/downloads-list-screen/downloads-list-screen.component'; import { AppStateGuard } from './state/app-state.guard'; +import { UserProfileScreenComponent } from './components/user-profile/user-profile-screen.component'; const routes = [ { @@ -37,6 +38,20 @@ const routes = [ routeGuards: [AuthGuard, RedRoleGuard] } }, + { + path: 'ui/my-profile', + component: BaseScreenComponent, + children: [ + { + path: '', + component: UserProfileScreenComponent + } + ], + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } + }, { path: 'ui/admin', component: BaseScreenComponent, diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index b9142f7a1..d89bb2958 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -29,12 +29,13 @@ import { DownloadsListScreenComponent } from './components/downloads-list-screen import { AppRoutingModule } from './app-routing.module'; import { SharedModule } from './modules/shared/shared.module'; import { FileUploadDownloadModule } from './modules/upload-download/file-upload-download.module'; +import { UserProfileScreenComponent } from './components/user-profile/user-profile-screen.component'; export function HttpLoaderFactory(httpClient: HttpClient) { return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json'); } -const screens = [BaseScreenComponent, PdfViewerScreenComponent, HtmlDebugScreenComponent, DownloadsListScreenComponent]; +const screens = [BaseScreenComponent, PdfViewerScreenComponent, HtmlDebugScreenComponent, DownloadsListScreenComponent, UserProfileScreenComponent]; const components = [AppComponent, LogoComponent, AuthErrorComponent, ToastComponent, NotificationsComponent, ...screens]; diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html index 88da93e88..f0b6e76c2 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html @@ -1,17 +1,18 @@ -
-
- - -