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:
@@ -287,14 +287,14 @@
|
|||||||
"GROUP-TITLE1-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION ONE",
|
"GROUP-TITLE1-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION ONE",
|
||||||
"GROUP-TITLE2-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION TWO",
|
"GROUP-TITLE2-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION TWO",
|
||||||
"ERROR_CONTENT": {
|
"ERROR_CONTENT": {
|
||||||
|
"RETURN_BUTTON": {
|
||||||
|
"TEXT": "Back to home"
|
||||||
|
},
|
||||||
"507": {
|
"507": {
|
||||||
"TITLE": "ACS Disk full",
|
"TITLE": "ACS Disk full",
|
||||||
"DESCRIPTION": "Content exceeds overall storage quota limit configured for the network or system",
|
"DESCRIPTION": "Content exceeds overall storage quota limit configured for the network or system",
|
||||||
"SECONDARY_BUTTON": {
|
"SECONDARY_BUTTON": {
|
||||||
"TEXT": ""
|
"TEXT": ""
|
||||||
},
|
|
||||||
"RETURN_BUTTON": {
|
|
||||||
"TEXT": "Back to home"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -53,7 +53,6 @@ import { TaskAttachmentsComponent } from './components/process-service/task-atta
|
|||||||
import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component';
|
import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component';
|
||||||
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
|
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
|
||||||
import { DemoPermissionComponent } from './components/permissions/demo-permissions.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 { MonacoEditorModule } from 'ngx-monaco-editor';
|
||||||
import { ContentModule } from '@alfresco/adf-content-services';
|
import { ContentModule } from '@alfresco/adf-content-services';
|
||||||
import { InsightsModule } from '@alfresco/adf-insights';
|
import { InsightsModule } from '@alfresco/adf-insights';
|
||||||
@@ -173,7 +172,6 @@ registerLocaleData(localeSv);
|
|||||||
DemoPermissionComponent,
|
DemoPermissionComponent,
|
||||||
DemoErrorComponent,
|
DemoErrorComponent,
|
||||||
FormLoadingComponent,
|
FormLoadingComponent,
|
||||||
ReportIssueComponent,
|
|
||||||
TreeViewSampleComponent,
|
TreeViewSampleComponent,
|
||||||
CloudLayoutComponent,
|
CloudLayoutComponent,
|
||||||
AppsCloudDemoComponent,
|
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 { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
|
||||||
import { FormLoadingComponent } from './components/form/form-loading.component';
|
import { FormLoadingComponent } from './components/form/form-loading.component';
|
||||||
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
|
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
|
||||||
import { ReportIssueComponent } from './components/report-issue/report-issue.component';
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
||||||
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
|
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
|
||||||
@@ -426,10 +425,6 @@ export const appRoutes: Routes = [
|
|||||||
component: OverlayViewerComponent,
|
component: OverlayViewerComponent,
|
||||||
canActivate: [AuthGuardEcm]
|
canActivate: [AuthGuardEcm]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'report-issue',
|
|
||||||
component: ReportIssueComponent
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'datatable-lazy',
|
path: 'datatable-lazy',
|
||||||
loadChildren: () => import('./components/lazy-loading/lazy-loading.module').then(m => m.LazyLoadingModule)
|
loadChildren: () => import('./components/lazy-loading/lazy-loading.module').then(m => m.LazyLoadingModule)
|
||||||
|
@@ -1,22 +1,7 @@
|
|||||||
<div fxLayout="column"
|
<adf-error-content [errorCode]="errorCode">
|
||||||
fxLayoutAlign="center center">
|
<div adf-error-content-actions>
|
||||||
<adf-error-content [errorCode]="errorCode">
|
<button mat-raised-button (click)="onReturnButton()">
|
||||||
<div adf-error-content-actions
|
{{ 'ERROR_CONTENT.RETURN_BUTTON.TEXT' | translate }}
|
||||||
class="app-error-content-buttons">
|
</button>
|
||||||
<a *ngIf="'ERROR_CONTENT.' + errorCode + '.SECONDARY_BUTTON.TEXT' | translate"
|
</div>
|
||||||
id="adf-secondary-button"
|
</adf-error-content>
|
||||||
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>
|
|
||||||
|
@@ -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({
|
@Component({
|
||||||
selector: 'app-demo-error',
|
selector: 'app-demo-error',
|
||||||
styleUrls: ['./demo-error.component.scss'],
|
|
||||||
templateUrl: './demo-error.component.html'
|
templateUrl: './demo-error.component.html'
|
||||||
})
|
})
|
||||||
export class DemoErrorComponent implements OnInit {
|
export class DemoErrorComponent implements OnInit {
|
||||||
@@ -32,7 +31,7 @@ export class DemoErrorComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.route) {
|
if (this.route) {
|
||||||
this.route.params.forEach((params: Params) => {
|
this.route.params.subscribe((params: Params) => {
|
||||||
if (params['id']) {
|
if (params['id']) {
|
||||||
this.errorCode = params['id'];
|
this.errorCode = params['id'];
|
||||||
}
|
}
|
||||||
@@ -40,10 +39,6 @@ export class DemoErrorComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onReportIssue() {
|
|
||||||
this.router.navigate(['/report-issue']);
|
|
||||||
}
|
|
||||||
|
|
||||||
onReturnButton() {
|
onReturnButton() {
|
||||||
this.router.navigate(['/']);
|
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