mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Clean-up demo shell Error component (#6403)
* cleanup error component and fix i18n * remove fake component
This commit is contained in:
@@ -1,22 +1,7 @@
|
||||
<div fxLayout="column"
|
||||
fxLayoutAlign="center center">
|
||||
<adf-error-content [errorCode]="errorCode">
|
||||
<div adf-error-content-actions
|
||||
class="app-error-content-buttons">
|
||||
<a *ngIf="'ERROR_CONTENT.' + errorCode + '.SECONDARY_BUTTON.TEXT' | translate"
|
||||
id="adf-secondary-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="onReportIssue()"
|
||||
class="app-error-content-description-link">
|
||||
{{ 'ERROR_CONTENT.' + errorCode + '.SECONDARY_BUTTON.TEXT' | translate | uppercase }}
|
||||
</a>
|
||||
<a id="adf-return-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="onReturnButton()">
|
||||
{{ 'ERROR_CONTENT.' + errorCode + '.RETURN_BUTTON.TEXT' | translate | uppercase }}
|
||||
</a>
|
||||
</div>
|
||||
</adf-error-content>
|
||||
</div>
|
||||
<adf-error-content [errorCode]="errorCode">
|
||||
<div adf-error-content-actions>
|
||||
<button mat-raised-button (click)="onReturnButton()">
|
||||
{{ 'ERROR_CONTENT.RETURN_BUTTON.TEXT' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</adf-error-content>
|
||||
|
@@ -1,9 +0,0 @@
|
||||
.app-error-content {
|
||||
|
||||
&-buttons {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-demo-error',
|
||||
styleUrls: ['./demo-error.component.scss'],
|
||||
templateUrl: './demo-error.component.html'
|
||||
})
|
||||
export class DemoErrorComponent implements OnInit {
|
||||
@@ -32,7 +31,7 @@ export class DemoErrorComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
if (this.route) {
|
||||
this.route.params.forEach((params: Params) => {
|
||||
this.route.params.subscribe((params: Params) => {
|
||||
if (params['id']) {
|
||||
this.errorCode = params['id'];
|
||||
}
|
||||
@@ -40,10 +39,6 @@ export class DemoErrorComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
onReportIssue() {
|
||||
this.router.navigate(['/report-issue']);
|
||||
}
|
||||
|
||||
onReturnButton() {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user