mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Clean-up demo shell Error component (#6403)
* cleanup error component and fix i18n * remove fake component
This commit is contained in:
@@ -53,7 +53,6 @@ import { TaskAttachmentsComponent } from './components/process-service/task-atta
|
||||
import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component';
|
||||
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
|
||||
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
|
||||
import { ReportIssueComponent } from './components/report-issue/report-issue.component';
|
||||
import { MonacoEditorModule } from 'ngx-monaco-editor';
|
||||
import { ContentModule } from '@alfresco/adf-content-services';
|
||||
import { InsightsModule } from '@alfresco/adf-insights';
|
||||
@@ -173,7 +172,6 @@ registerLocaleData(localeSv);
|
||||
DemoPermissionComponent,
|
||||
DemoErrorComponent,
|
||||
FormLoadingComponent,
|
||||
ReportIssueComponent,
|
||||
TreeViewSampleComponent,
|
||||
CloudLayoutComponent,
|
||||
AppsCloudDemoComponent,
|
||||
|
@@ -34,7 +34,6 @@ import { OverlayViewerComponent } from './components/overlay-viewer/overlay-view
|
||||
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
|
||||
import { FormLoadingComponent } from './components/form/form-loading.component';
|
||||
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
|
||||
import { ReportIssueComponent } from './components/report-issue/report-issue.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
||||
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
|
||||
@@ -426,10 +425,6 @@ export const appRoutes: Routes = [
|
||||
component: OverlayViewerComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'report-issue',
|
||||
component: ReportIssueComponent
|
||||
},
|
||||
{
|
||||
path: 'datatable-lazy',
|
||||
loadChildren: () => import('./components/lazy-loading/lazy-loading.module').then(m => m.LazyLoadingModule)
|
||||
|
@@ -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(['/']);
|
||||
}
|
||||
|
@@ -1,9 +0,0 @@
|
||||
<div class="app-report-issue">
|
||||
<h1>Report Issue</h1>
|
||||
<form class="app-report-issue-form">
|
||||
<mat-form-field>
|
||||
<textarea matInput placeholder="Leave a comment" class="app-report-issue-form-textarea"></textarea>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
<button mat-raised-button>Submit</button>
|
||||
</div>
|
@@ -1,24 +0,0 @@
|
||||
.app-report-issue {
|
||||
margin: 50px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&-form {
|
||||
|
||||
width: 50%;
|
||||
min-width: 250px;
|
||||
margin-bottom: 50px;
|
||||
|
||||
& mat-form-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-textarea {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* 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 } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: './report-issue.component.html',
|
||||
styleUrls: [`./report-issue.component.scss`]
|
||||
})
|
||||
export class ReportIssueComponent {
|
||||
|
||||
}
|
Reference in New Issue
Block a user