Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
[AAE-7721] - fixed wrong showing on back arrow adding demo new header…
Browse files Browse the repository at this point in the history
… (#3579)
  • Loading branch information
VitoAlbano authored and Travis CI User committed Mar 10, 2022
1 parent 2e7647a commit 18af1d0
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import { Routes } from '@angular/router';
import { AuthGuard } from '@alfresco/adf-core';
import { DASHBOARD_ROUTES, MODEL_EDITOR_ROUTES, SelectedProjectSetterGuard, ProjectLoaderGuard, AUTHENTICATED_ROUTES, MainNavigationComponent } from '@alfresco-dbp/modeling-shared/sdk';
import { DASHBOARD_ROUTES, MODEL_EDITOR_ROUTES, SelectedProjectSetterGuard, ProjectLoaderGuard, AUTHENTICATED_ROUTES, MainNavigationComponent, StudioHeaderComponent } from '@alfresco-dbp/modeling-shared/sdk';
import { StudioLayoutComponent } from './components/studio-layout/studio-layout.component';
import { ErrorContentComponent } from '../../common/components/error/error-content.component';
import { AboutComponent } from '../../common/components/about/about.component';
Expand Down Expand Up @@ -66,7 +66,8 @@ export const studioLayoutRoutes: Routes = [
data: { hostFor: MODEL_EDITOR_ROUTES },
canActivate: [ SelectedProjectSetterGuard, ProjectLoaderGuard ],
children: []
}
},
{ path: '', component: StudioHeaderComponent, outlet: 'main-header'}
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="ama-studio-project-header">
<button mat-icon-button aria-label="Back arrow">
<mat-icon>arrow_back</mat-icon>
</button>
<button mat-icon-button aria-label="Hide left sidenav">
<i class="material-icons-outlined">space_dashboard</i>
</button>
<button mat-icon-button aria-label="Preferred project indicator">
<mat-icon>star_border</mat-icon>
</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.ama-studio-project-header {
width: 100%;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*!
* @license
* Copyright 2019 Alfresco, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';

@Component({
templateUrl: './studio-header.component.html',
styleUrls: ['./studio-header.component.scss'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class StudioHeaderComponent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { RootNavigationComponent } from './components/root/root-navigation.compo
import { MainNavigationComponent } from './components/main-navigation/main-navigation.component';
import { MainNavigationHeaderComponent } from './components/main-header/main-navigation-header.component';
import { UserInfoMenuComponent } from './components/user-info-menu/user-info-menu.component';
import { StudioHeaderComponent } from './components/studio-header/studio-header.component';

@NgModule({
imports: [
Expand All @@ -34,7 +35,7 @@ import { UserInfoMenuComponent } from './components/user-info-menu/user-info-men
RouterModule.forChild([]),
CoreModule.forChild()
],
declarations: [ RootNavigationComponent, MainNavigationComponent, MainNavigationHeaderComponent, UserInfoMenuComponent] ,
exports: [ RootNavigationComponent, MainNavigationComponent, MainNavigationHeaderComponent, UserInfoMenuComponent ]
declarations: [ RootNavigationComponent, MainNavigationComponent, MainNavigationHeaderComponent, UserInfoMenuComponent, StudioHeaderComponent] ,
exports: [ RootNavigationComponent, MainNavigationComponent, MainNavigationHeaderComponent, UserInfoMenuComponent, StudioHeaderComponent ]
})
export class NavigationModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export * from './components/root/root-navigation.component';
export * from './components/main-navigation/main-navigation.component';
export * from './components/main-header/main-navigation-header.component';
export * from './components/user-info-menu/user-info-menu.component';
export * from './components/studio-header/studio-header.component';
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
import { Routes } from '@angular/router';
import { ProjectContentComponent } from '../components/project-content/project-content.component';
import { ProjectNavigationComponent } from '../components/project-navigation/project-navigation.component';
import { AUTHENTICATED_ROUTES, MainNavigationHeaderComponent, MODEL_EDITOR_ROUTES } from '@alfresco-dbp/modeling-shared/sdk';
import { MODEL_EDITOR_ROUTES } from '@alfresco-dbp/modeling-shared/sdk';

export const studioProjectEditorRoutes: Routes = [
{ path: '', component: ProjectContentComponent, data: { injectTo: MODEL_EDITOR_ROUTES } },
{ path: '', component: MainNavigationHeaderComponent, data: { injectTo: AUTHENTICATED_ROUTES }, outlet: 'main-header'},
{ path: '', component: ProjectNavigationComponent, data: { injectTo: MODEL_EDITOR_ROUTES }, outlet: 'left-sidebar' }
];

0 comments on commit 18af1d0

Please sign in to comment.