Add back button
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a082967c69
commit
ce9c72016d
@ -56,6 +56,7 @@ import { SecureOAuthStorage} from './shared/secureOAuthStorage';
|
|||||||
import { GradientComponent } from './components/gradient/gradient.component';
|
import { GradientComponent } from './components/gradient/gradient.component';
|
||||||
import { GradientSelectComponent } from './components/gradient-select/gradient-select.component';
|
import { GradientSelectComponent } from './components/gradient-select/gradient-select.component';
|
||||||
import { AppMenuComponent } from './components/app-menu/app-menu.component';
|
import { AppMenuComponent } from './components/app-menu/app-menu.component';
|
||||||
|
import { BackButtonComponent } from './components/back-button/back-button.component';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
SafePipe,
|
SafePipe,
|
||||||
@ -128,7 +129,8 @@ export {
|
|||||||
UserMenuComponent,
|
UserMenuComponent,
|
||||||
GradientComponent,
|
GradientComponent,
|
||||||
GradientSelectComponent,
|
GradientSelectComponent,
|
||||||
AppMenuComponent
|
AppMenuComponent,
|
||||||
|
BackButtonComponent
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
NgbModule,
|
NgbModule,
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
<div class="back-button">
|
||||||
|
<i class="fal fa-arrow-left"></i> <span i18n="@FmBackButton">Back</span>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
@import "../../../../node_modules/bootstrap";
|
||||||
|
|
||||||
|
.back-button {
|
||||||
|
cursor: default;
|
||||||
|
color: $primary;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
color: $secondary;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { BackButtonComponent } from './back-button.component';
|
||||||
|
|
||||||
|
describe('BackButtonComponent', () => {
|
||||||
|
let component: BackButtonComponent;
|
||||||
|
let fixture: ComponentFixture<BackButtonComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ BackButtonComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(BackButtonComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,18 @@
|
|||||||
|
import {Component, HostListener} from '@angular/core';
|
||||||
|
import {Location} from "@angular/common";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-back-button',
|
||||||
|
templateUrl: './back-button.component.html',
|
||||||
|
styleUrls: ['./back-button.component.scss']
|
||||||
|
})
|
||||||
|
export class BackButtonComponent {
|
||||||
|
|
||||||
|
@HostListener('click')
|
||||||
|
onBackClicked() {
|
||||||
|
this.location.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(private location: Location) { }
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user