From a31901895848865f42bbf0aa09f65fea024bb4df Mon Sep 17 00:00:00 2001 From: Marco Leorato Date: Fri, 20 Aug 2021 16:25:02 +0200 Subject: [PATCH 01/11] Changed the layout to have a single header. Modified the header to be the same for logged in and anonymous pages. Changed a bit the style of the header to be fixed and not change based on the vh and change the main div to follow resize correctly. Enable again the returnUrl in the login to redirect to the returnUrl instead of always datasets/. If you are already logged in it will figure as such in the header. Also if you open the login page while logged in you get redirected to datasets. Updated all the styles removing the reference to the login-header. --- CI/ESS/styles.scss | 2 - CI/MAXIV/maxiv-theme.scss | 2 - CI/RFI/theme.scss | 2 - .../app-header/app-header.component.html | 80 ++-- .../app-header/app-header.component.scss | 22 +- .../app-header/app-header.component.ts | 11 +- .../app-layout/app-layout.component.html | 2 +- .../app-layout/app-layout.component.scss | 3 +- .../app-layout/app-layout.component.ts | 6 +- .../app-main-layout.component.html | 4 + .../app-main-layout.component.scss | 4 + .../app-main-layout.component.spec.ts | 56 +++ .../app-main-layout.component.ts | 8 + src/app/_layout/layout.module.ts | 10 +- src/app/app-routing/app-routing.module.ts | 390 +++++++++--------- .../dashboard/dashboard.component.html | 1 + .../breadcrumb/breadcrumb.component.scss | 3 +- .../state-management/effects/user.effects.ts | 2 +- src/app/users/login/login.component.html | 102 ++--- src/app/users/login/login.component.scss | 57 +-- src/app/users/login/login.component.ts | 7 +- src/styles.scss | 2 - 22 files changed, 429 insertions(+), 347 deletions(-) create mode 100644 src/app/_layout/app-main-layout/app-main-layout.component.html create mode 100644 src/app/_layout/app-main-layout/app-main-layout.component.scss create mode 100644 src/app/_layout/app-main-layout/app-main-layout.component.spec.ts create mode 100644 src/app/_layout/app-main-layout/app-main-layout.component.ts diff --git a/CI/ESS/styles.scss b/CI/ESS/styles.scss index 7b352e20f..a8a912f5a 100644 --- a/CI/ESS/styles.scss +++ b/CI/ESS/styles.scss @@ -3,7 +3,6 @@ @use '~@angular/material' as mat; @use "./app/app-theme" as app; @use "./app/_layout/app-header/app-header-theme" as app-header; -@use "./app/_layout/login-header/login-header-theme" as login-header; @use "./app/datasets/anonymous-details/anonymous-details-theme" as anonymous-details; @use "./app/datasets/anonymous-details-dashboard/anonymous-details-dashboard-theme" as anonymous-details-dashboard; @use "./app/datasets/batch-view/batch-view-theme" as batch-view; @@ -255,7 +254,6 @@ $theme: custom-light-theme( @include mat.all-component-themes($theme); @include app.theme($theme); @include app-header.theme($theme); -@include login-header.theme($theme); @include anonymous-details.theme($theme); @include anonymous-details-dashboard.theme($theme); @include batch-view.theme($theme); diff --git a/CI/MAXIV/maxiv-theme.scss b/CI/MAXIV/maxiv-theme.scss index 90e9567c6..e84fdbccf 100644 --- a/CI/MAXIV/maxiv-theme.scss +++ b/CI/MAXIV/maxiv-theme.scss @@ -3,7 +3,6 @@ @use '~@angular/material' as mat; @use "./app/app-theme" as app; @use "./app/_layout/app-header/app-header-theme" as app-header; -@use "./app/_layout/login-header/login-header-theme" as login-header; @use "./app/datasets/anonymous-details/anonymous-details-theme" as anonymous-details; @use "./app/datasets/anonymous-details-dashboard/anonymous-details-dashboard-theme" as anonymous-details-dashboard; @use "./app/datasets/batch-view/batch-view-theme" as batch-view; @@ -301,7 +300,6 @@ $theme: custom-light-theme( @include mat.all-component-themes($theme); @include app.theme($theme); @include app-header.theme($theme); -@include login-header.theme($theme); @include anonymous-details.theme($theme); @include anonymous-details-dashboard.theme($theme); @include batch-view.theme($theme); diff --git a/CI/RFI/theme.scss b/CI/RFI/theme.scss index 7b352e20f..a8a912f5a 100644 --- a/CI/RFI/theme.scss +++ b/CI/RFI/theme.scss @@ -3,7 +3,6 @@ @use '~@angular/material' as mat; @use "./app/app-theme" as app; @use "./app/_layout/app-header/app-header-theme" as app-header; -@use "./app/_layout/login-header/login-header-theme" as login-header; @use "./app/datasets/anonymous-details/anonymous-details-theme" as anonymous-details; @use "./app/datasets/anonymous-details-dashboard/anonymous-details-dashboard-theme" as anonymous-details-dashboard; @use "./app/datasets/batch-view/batch-view-theme" as batch-view; @@ -255,7 +254,6 @@ $theme: custom-light-theme( @include mat.all-component-themes($theme); @include app.theme($theme); @include app-header.theme($theme); -@include login-header.theme($theme); @include anonymous-details.theme($theme); @include anonymous-details-dashboard.theme($theme); @include batch-view.theme($theme); diff --git a/src/app/_layout/app-header/app-header.component.html b/src/app/_layout/app-header/app-header.component.html index 525dafe9b..c60b115e9 100644 --- a/src/app/_layout/app-header/app-header.component.html +++ b/src/app/_layout/app-header/app-header.component.html @@ -1,12 +1,12 @@
@@ -17,61 +17,61 @@ - + - + - + @@ -96,29 +96,39 @@
>
- - - + +
+ + account_circle + Sign in + +
+ + + + + + + + + + + + + - - - - - - -
diff --git a/src/app/_layout/app-header/app-header.component.scss b/src/app/_layout/app-header/app-header.component.scss index 8618f64c9..341f0406f 100644 --- a/src/app/_layout/app-header/app-header.component.scss +++ b/src/app/_layout/app-header/app-header.component.scss @@ -5,12 +5,16 @@ z-index: 1000; mat-toolbar { - height: 7vh; + height: 3.5rem; - .logo { - height: 4vh; - margin-right: 1em; - padding-top: 0.5vh; + a { + height: 2.5rem; + padding: 0.5rem; + + .logo { + height: 100%; + margin-right: 0.5rem; + } } .spacer { @@ -18,7 +22,7 @@ } .toplink { - padding: 10px; + padding: 0.5rem 1rem; font: bold; font-size: 11pt; @@ -32,11 +36,11 @@ } .user-button { - font-size: 11px; - line-height: 20px; + font-size: 0.75rem; + line-height: 1rem; .user-image { - height: 3vh; + height: 2rem; } } } diff --git a/src/app/_layout/app-header/app-header.component.ts b/src/app/_layout/app-header/app-header.component.ts index f7f81046b..bb4bebb61 100644 --- a/src/app/_layout/app-header/app-header.component.ts +++ b/src/app/_layout/app-header/app-header.component.ts @@ -9,7 +9,8 @@ import { Subscription } from "rxjs"; import { getCurrentUserAccountType, getCurrentUser, - getProfile + getProfile, + getIsLoggedIn, getIsLoggingIn, getCurrentUserName } from "state-management/selectors/user.selectors"; import { getDatasetsInBatch } from "state-management/selectors/datasets.selectors"; @@ -22,6 +23,7 @@ export class AppHeaderComponent implements OnInit, OnDestroy { private subscriptions: Subscription[] = []; facility: string; status: string; + loggedIn: boolean; username = ""; profileImage: string; @@ -50,6 +52,10 @@ export class AppHeaderComponent implements OnInit, OnDestroy { ngOnInit() { this.store.dispatch(fetchCurrentUserAction()); + this.store.pipe(select(getIsLoggedIn)).subscribe(status => { + this.loggedIn = status; + }); + this.subscriptions.push( this.batch$.subscribe(datasets => { if (datasets) { @@ -75,6 +81,9 @@ export class AppHeaderComponent implements OnInit, OnDestroy { if (current) { this.username = current.username.replace("ms-ad.", ""); if (!current.realm && current.id) { + this.store.pipe(select(getCurrentUserName)).subscribe(profile => { + console.log("TEST"); + }); this.store.pipe(select(getProfile)).subscribe(profile => { if (profile) { this.username = profile.username; diff --git a/src/app/_layout/app-layout/app-layout.component.html b/src/app/_layout/app-layout/app-layout.component.html index e6cbb5b5e..a450c28e1 100644 --- a/src/app/_layout/app-layout/app-layout.component.html +++ b/src/app/_layout/app-layout/app-layout.component.html @@ -1,10 +1,10 @@
-
diff --git a/src/app/_layout/app-layout/app-layout.component.scss b/src/app/_layout/app-layout/app-layout.component.scss index 2ef47f05c..9527daeeb 100644 --- a/src/app/_layout/app-layout/app-layout.component.scss +++ b/src/app/_layout/app-layout/app-layout.component.scss @@ -1,4 +1,3 @@ .main { - height: 95vh; - padding: 1.5em; + height: calc(100vh - 3.5rem); } diff --git a/src/app/_layout/app-layout/app-layout.component.ts b/src/app/_layout/app-layout/app-layout.component.ts index 41a3e0498..f506dc1a0 100644 --- a/src/app/_layout/app-layout/app-layout.component.ts +++ b/src/app/_layout/app-layout/app-layout.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from "@angular/core"; import { Store, select } from "@ngrx/store"; -import { getTheme } from "state-management/selectors/user.selectors"; +import {getIsLoggedIn, getTheme} from "state-management/selectors/user.selectors"; import { Observable } from "rxjs"; @Component({ @@ -10,10 +10,14 @@ import { Observable } from "rxjs"; }) export class AppLayoutComponent implements OnInit { darkTheme$: Observable = new Observable(); + loggedIn: boolean; constructor(private store: Store) {} ngOnInit() { this.darkTheme$ = this.store.pipe(select(getTheme)); + this.store.pipe(select(getIsLoggedIn)).subscribe(status => { + this.loggedIn = status; + }); } } diff --git a/src/app/_layout/app-main-layout/app-main-layout.component.html b/src/app/_layout/app-main-layout/app-main-layout.component.html new file mode 100644 index 000000000..cd4968108 --- /dev/null +++ b/src/app/_layout/app-main-layout/app-main-layout.component.html @@ -0,0 +1,4 @@ +
+ + +
diff --git a/src/app/_layout/app-main-layout/app-main-layout.component.scss b/src/app/_layout/app-main-layout/app-main-layout.component.scss new file mode 100644 index 000000000..e26993c26 --- /dev/null +++ b/src/app/_layout/app-main-layout/app-main-layout.component.scss @@ -0,0 +1,4 @@ +.main-app { + height: calc(100vh - 3.5rem); + padding: 1.5rem; +} diff --git a/src/app/_layout/app-main-layout/app-main-layout.component.spec.ts b/src/app/_layout/app-main-layout/app-main-layout.component.spec.ts new file mode 100644 index 000000000..f4eb90c39 --- /dev/null +++ b/src/app/_layout/app-main-layout/app-main-layout.component.spec.ts @@ -0,0 +1,56 @@ +import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; + +import { AppMainLayoutComponent } from "./app-main-layout.component"; +import { NO_ERRORS_SCHEMA } from "@angular/core"; +import { BreadcrumbModule } from "shared/modules/breadcrumb/breadcrumb.module"; +import { AppHeaderComponent } from "_layout/app-header/app-header.component"; +import { RouterTestingModule } from "@angular/router/testing"; +import {MatMenuModule} from "@angular/material/menu"; +import { MatToolbarModule } from "@angular/material/toolbar"; +import { Store } from "@ngrx/store"; +import { ActivatedRoute, Router } from "@angular/router"; +import { APP_CONFIG } from "app-config.module"; +import { MockStore, MockActivatedRoute, MockRouter } from "shared/MockStubs"; + +describe("AppMainLayoutComponent", () => { + let component: AppMainLayoutComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + schemas: [NO_ERRORS_SCHEMA], + declarations: [AppMainLayoutComponent, AppHeaderComponent], + imports: [ + BreadcrumbModule, + MatMenuModule, + MatToolbarModule, + RouterTestingModule + ] + }); + TestBed.overrideComponent(AppHeaderComponent, { + set: { + providers: [{ provide: APP_CONFIG, useValue: { facility: "ESS" } }] + } + }); + TestBed.overrideComponent(AppMainLayoutComponent, { + set: { + providers: [ + { provide: Store, useClass: MockStore }, + { provide: ActivatedRoute, useClass: MockActivatedRoute }, + { provide: Router, useClass: MockRouter } + ] + } + }); + TestBed.compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AppMainLayoutComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it("should create", () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/_layout/app-main-layout/app-main-layout.component.ts b/src/app/_layout/app-main-layout/app-main-layout.component.ts new file mode 100644 index 000000000..e3e1931ad --- /dev/null +++ b/src/app/_layout/app-main-layout/app-main-layout.component.ts @@ -0,0 +1,8 @@ +import { Component } from "@angular/core"; + +@Component({ + selector: "app-main-app-layout", + templateUrl: "./app-main-layout.component.html", + styleUrls: ["./app-main-layout.component.scss"] +}) +export class AppMainLayoutComponent {} diff --git a/src/app/_layout/layout.module.ts b/src/app/_layout/layout.module.ts index 01e69dd05..fd93dd66b 100644 --- a/src/app/_layout/layout.module.ts +++ b/src/app/_layout/layout.module.ts @@ -8,19 +8,15 @@ import { MatMenuModule } from "@angular/material/menu"; import { MatToolbarModule } from "@angular/material/toolbar"; import { RouterModule } from "@angular/router"; import { DatasetsModule } from "datasets/datasets.module"; -import { AnonymousLayoutComponent } from "./anonymous-layout/anonymous-layout.component"; import { AppLayoutComponent } from "./app-layout/app-layout.component"; -import { LoginHeaderComponent } from "./login-header/login-header.component"; -import { LoginLayoutComponent } from "./login-layout/login-layout.component"; +import { AppMainLayoutComponent } from "./app-main-layout/app-main-layout.component"; import { SharedCatanieModule } from "shared/shared.module"; @NgModule({ declarations: [ - AnonymousLayoutComponent, - AppHeaderComponent, AppLayoutComponent, - LoginHeaderComponent, - LoginLayoutComponent + AppHeaderComponent, + AppMainLayoutComponent, ], imports: [ CommonModule, diff --git a/src/app/app-routing/app-routing.module.ts b/src/app/app-routing/app-routing.module.ts index 076aab5d4..78202fc67 100644 --- a/src/app/app-routing/app-routing.module.ts +++ b/src/app/app-routing/app-routing.module.ts @@ -35,14 +35,13 @@ import { PublisheddataEditComponent } from "publisheddata/publisheddata-edit/pub import { RedirectGuard } from "app-routing/redirect.guard"; import { ProposalDashboardComponent } from "proposals/proposal-dashboard/proposal-dashboard.component"; import { SampleDashboardComponent } from "samples/sample-dashboard/sample-dashboard.component"; -import { LoginLayoutComponent } from "_layout/login-layout/login-layout.component"; import { AppLayoutComponent } from "_layout/app-layout/app-layout.component"; +import { AppMainLayoutComponent } from "_layout/app-main-layout/app-main-layout.component"; import { PoliciesDashboardComponent } from "policies/policies-dashboard/policies-dashboard.component"; import { InstrumentsDashboardComponent } from "instruments/instruments-dashboard/instruments-dashboard.component"; import { InstrumentDetailsComponent } from "instruments/instrument-details/instrument-details.component"; import { AnonymousDashboardComponent } from "datasets/anonymous-dashboard/anonymous-dashboard.component"; import { AnonymousDetailsDashboardComponent } from "datasets/anonymous-details-dashboard/anonymous-details-dashboard.component"; -import { AnonymousLayoutComponent } from "_layout/anonymous-layout/anonymous-layout.component"; import { JobsGuard } from "app-routing/jobs.guard"; import { PoliciesGuard } from "app-routing/policies.guard"; import { LogbookGuard } from "app-routing/logbook.guard"; @@ -52,46 +51,6 @@ import { LeavingPageGuard } from "./pending-changes.guard"; import { ProposalDashboardNewComponent } from "proposals/proposal-dashboard-new/proposal-dashboard-new.component"; export const routes: Routes = [ - { - path: "", - component: AnonymousLayoutComponent, - children: [ - { - path: "", - redirectTo: "anonymous/datasets", - pathMatch: "full", - }, - { - path: "anonymous/datasets", - component: AnonymousDashboardComponent, - }, - { - path: "anonymous/datasets/:id", - component: AnonymousDetailsDashboardComponent, - }, - { - path: "anonymous/about", - component: AboutComponent, - }, - { - path: "anonymous/help", - component: HelpComponent, - }, - ], - }, - { - path: "", - component: LoginLayoutComponent, - children: [ - { path: "", redirectTo: "/login", pathMatch: "full" }, - { path: "login", component: LoginComponent }, - { - path: "login/error", - component: ErrorPageComponent, - data: { errorTitle: "Location Not Found", breadcrumb: "Error" }, - }, - ], - }, { path: "", component: AppLayoutComponent, @@ -102,172 +61,195 @@ export const routes: Routes = [ pathMatch: "full", }, { - path: "datasets/batch/publish", - component: PublishComponent, - canActivate: [AuthGuard], - }, - { - path: "datasets", - component: DashboardComponent, - canActivate: [DatasetsGuard], - }, - { - path: "datasets/batch", - component: BatchViewComponent, - canActivate: [AuthGuard], - }, - { - path: "datasets/:id", - component: DatasetDetailsDashboardComponent, - canActivate: [DatasetsGuard], - canDeactivate: [LeavingPageGuard] - }, - { - path: "datasets/:id/datablocks", - component: DatablocksComponent, - canActivate: [DatasetsGuard], - }, - { - path: "datasets/:id/datafiles", - component: DatafilesComponent, - canActivate: [DatasetsGuard], - }, - { - path: "files", - component: FilesDashboardComponent, - canActivate: [AuthGuard], - }, - { - path: "instruments", - component: InstrumentsDashboardComponent, - canActivate: [AuthGuard], - }, - { - path: "instruments/:id", - component: InstrumentDetailsComponent, - canActivate: [AuthGuard], - }, - { - path: "proposals", - component: ProposalDashboardNewComponent, - canActivate: [AuthGuard], - }, - { - path: "proposalsold", - component: ProposalDashboardComponent, - canActivate: [AuthGuard], - }, - { - path: "proposals/:id", - component: ViewProposalPageComponent, - canActivate: [AuthGuard], - }, - { - path: "publishedDatasets", - component: PublisheddataDashboardComponent, - canActivate: [AuthGuard], - }, - { - path: "publishedDatasets/:id/edit", - component: PublisheddataEditComponent, - canActivate: [AuthGuard], - }, - { - path: "publishedDatasets/:id", - component: PublisheddataDetailsComponent, - canActivate: [AuthGuard], - }, - { - path: "samples", - component: SampleDashboardComponent, - canActivate: [AuthGuard], + path: "login", + component: LoginComponent, }, { - path: "samples/:id", - component: SampleDetailComponent, - canActivate: [AuthGuard], - }, + path: "", + component: AppMainLayoutComponent, + children: [ + { + path: "anonymous", + redirectTo: "anonymous/datasets", + pathMatch: "full" + }, + { + path: "anonymous/datasets", + component: AnonymousDashboardComponent + }, + { + path: "anonymous/datasets/:id", + component: AnonymousDetailsDashboardComponent, + }, + { + path: "datasets/batch/publish", + component: PublishComponent, + canActivate: [AuthGuard], + }, + { + path: "datasets", + component: DashboardComponent, + canActivate: [DatasetsGuard], + }, + { + path: "datasets/batch", + component: BatchViewComponent, + canActivate: [AuthGuard], + }, + { + path: "datasets/:id", + component: DatasetDetailsDashboardComponent, + canActivate: [DatasetsGuard], + canDeactivate: [LeavingPageGuard] + }, + { + path: "datasets/:id/datablocks", + component: DatablocksComponent, + canActivate: [DatasetsGuard], + }, + { + path: "datasets/:id/datafiles", + component: DatafilesComponent, + canActivate: [DatasetsGuard], + }, + { + path: "files", + component: FilesDashboardComponent, + canActivate: [AuthGuard], + }, + { + path: "instruments", + component: InstrumentsDashboardComponent, + canActivate: [AuthGuard], + }, + { + path: "instruments/:id", + component: InstrumentDetailsComponent, + canActivate: [AuthGuard], + }, + { + path: "proposals", + component: ProposalDashboardNewComponent, + canActivate: [AuthGuard], + }, + { + path: "proposalsold", + component: ProposalDashboardComponent, + canActivate: [AuthGuard], + }, + { + path: "proposals/:id", + component: ViewProposalPageComponent, + canActivate: [AuthGuard], + }, + { + path: "publishedDatasets", + component: PublisheddataDashboardComponent, + canActivate: [AuthGuard], + }, + { + path: "publishedDatasets/:id/edit", + component: PublisheddataEditComponent, + canActivate: [AuthGuard], + }, + { + path: "publishedDatasets/:id", + component: PublisheddataDetailsComponent, + canActivate: [AuthGuard], + }, + { + path: "samples", + component: SampleDashboardComponent, + canActivate: [AuthGuard], + }, + { + path: "samples/:id", + component: SampleDetailComponent, + canActivate: [AuthGuard], + }, - { - path: "policies", - component: PoliciesDashboardComponent, - canActivate: [AuthGuard, PoliciesGuard], - }, + { + path: "policies", + component: PoliciesDashboardComponent, + canActivate: [AuthGuard, PoliciesGuard], + }, - { - path: "user", - component: UserSettingsComponent, - canActivate: [AuthGuard], - }, - { - path: "user/settings", - component: UserSettingsComponent, - canActivate: [AuthGuard], - }, - { - path: "user/jobsold", - component: JobsDashboardComponent, - canActivate: [AuthGuard, JobsGuard], - }, - { - path: "user/jobs", - component: JobsDashboardNewComponent, - canActivate: [AuthGuard, JobsGuard], - }, - { - path: "user/jobs/:id", - component: JobsDetailComponent, - canActivate: [AuthGuard, JobsGuard], - }, - { - path: "about", - component: AboutComponent, - }, - { - path: "help", - component: HelpComponent, - }, - { - path: "logbooks", - component: LogbooksTableComponent, - canActivate: [AuthGuard, LogbookGuard], - }, - { - path: "logbooks/:name", - component: LogbooksDashboardComponent, - canActivate: [AuthGuard, LogbookGuard], - }, - { - path: "error", - component: ErrorPageComponent, - data: { errorTitle: "Location Not Found"}, - }, - { - path: "help/ingestManual", - canActivate: [RedirectGuard], - component: RedirectGuard, - data: { - urlConfigItem: "ingestManual", - }, - }, - { - path: "help/SciCatGettingStartedSLSSummary", - canActivate: [RedirectGuard], - component: RedirectGuard, - data: { - urlConfigItem: "gettingStarted", - }, - }, - { - path: "logout", - component: LoginLayoutComponent, - canActivate: [AuthGuard], - }, - { - path: "404", - component: ErrorPageComponent, - data: { errorTitle: "404 Page not found" , message: "Sorry, the page you are trying to view doesn't exist"} - }, + { + path: "user", + component: UserSettingsComponent, + canActivate: [AuthGuard], + }, + { + path: "user/settings", + component: UserSettingsComponent, + canActivate: [AuthGuard], + }, + { + path: "user/jobsold", + component: JobsDashboardComponent, + canActivate: [AuthGuard, JobsGuard], + }, + { + path: "user/jobs", + component: JobsDashboardNewComponent, + canActivate: [AuthGuard, JobsGuard], + }, + { + path: "user/jobs/:id", + component: JobsDetailComponent, + canActivate: [AuthGuard, JobsGuard], + }, + { + path: "about", + component: AboutComponent, + }, + { + path: "help", + component: HelpComponent, + }, + { + path: "logbooks", + component: LogbooksTableComponent, + canActivate: [AuthGuard, LogbookGuard], + }, + { + path: "logbooks/:name", + component: LogbooksDashboardComponent, + canActivate: [AuthGuard, LogbookGuard], + }, + { + path: "error", + component: ErrorPageComponent, + data: { errorTitle: "Location Not Found"}, + }, + { + path: "help/ingestManual", + canActivate: [RedirectGuard], + component: RedirectGuard, + data: { + urlConfigItem: "ingestManual", + }, + }, + { + path: "help/SciCatGettingStartedSLSSummary", + canActivate: [RedirectGuard], + component: RedirectGuard, + data: { + urlConfigItem: "gettingStarted", + }, + }, + { + path: "logout", + component: LoginComponent, + canActivate: [AuthGuard], + }, + { + path: "404", + component: ErrorPageComponent, + data: { errorTitle: "404 Page not found" , message: "Sorry, the page you are trying to view doesn't exist"} + }, + ] + } ], }, { diff --git a/src/app/datasets/dashboard/dashboard.component.html b/src/app/datasets/dashboard/dashboard.component.html index edfc01147..1de58b009 100644 --- a/src/app/datasets/dashboard/dashboard.component.html +++ b/src/app/datasets/dashboard/dashboard.component.html @@ -1,3 +1,4 @@ +
diff --git a/src/app/shared/modules/breadcrumb/breadcrumb.component.scss b/src/app/shared/modules/breadcrumb/breadcrumb.component.scss index 12f5ba66b..428fc9406 100644 --- a/src/app/shared/modules/breadcrumb/breadcrumb.component.scss +++ b/src/app/shared/modules/breadcrumb/breadcrumb.component.scss @@ -1,5 +1,6 @@ .breadcrumb { - margin: 1em 0; + margin: 1rem 0; + padding-left: 1rem; .container { border-top: 1px solid; diff --git a/src/app/state-management/effects/user.effects.ts b/src/app/state-management/effects/user.effects.ts index 1394f0a4b..a91c818cc 100644 --- a/src/app/state-management/effects/user.effects.ts +++ b/src/app/state-management/effects/user.effects.ts @@ -195,7 +195,7 @@ export class UserEffects { () => this.actions$.pipe( ofType(fromActions.logoutCompleteAction), - tap(() => this.router.navigate([""])) + tap(() => this.router.navigate(["anonymous"])) ), { dispatch: false } ); diff --git a/src/app/users/login/login.component.html b/src/app/users/login/login.component.html index eff069aea..e1d522240 100644 --- a/src/app/users/login/login.component.html +++ b/src/app/users/login/login.component.html @@ -1,56 +1,58 @@ -