Improve style of 'new tab'
Signed-off-by: trivernis <trivernis@protonmail.com>pull/14/head
parent
218f3bffb2
commit
ac6f6f7762
@ -0,0 +1,7 @@
|
||||
<app-middle-centered>
|
||||
<h1>What kind of tab do you want to open?</h1>
|
||||
<div class="button-container">
|
||||
<button (click)="this.addTab('files')" color="primary" mat-flat-button>Files</button>
|
||||
<button (click)="this.addTab('import')" color="primary" mat-flat-button>Import</button>
|
||||
</div>
|
||||
</app-middle-centered>
|
@ -0,0 +1,31 @@
|
||||
@import "src/colors";
|
||||
|
||||
:host {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
background: radial-gradient(circle, $background-darker-05 80%, $primary 200%);
|
||||
}
|
||||
|
||||
.button-container {
|
||||
height: 6em;
|
||||
display: block;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0.5em 1em;
|
||||
font-size: 1.5em;
|
||||
margin: 1em;
|
||||
border-radius: 0.5em;
|
||||
transition-duration: 0.25s;
|
||||
|
||||
&:hover {
|
||||
scale: 1.25;
|
||||
}
|
||||
|
||||
&:active {
|
||||
scale: 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import {ComponentFixture, TestBed} from "@angular/core/testing";
|
||||
|
||||
import {EmptyTabComponent} from "./empty-tab.component";
|
||||
|
||||
describe("EmptyTabComponent", () => {
|
||||
let component: EmptyTabComponent;
|
||||
let fixture: ComponentFixture<EmptyTabComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [EmptyTabComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EmptyTabComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it("should create", () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,29 @@
|
||||
import {ChangeDetectionStrategy, Component, EventEmitter, Output} from "@angular/core";
|
||||
import {TabCategory} from "../../../models/TabCategory";
|
||||
|
||||
type TabCategoryName = "files" | "import";
|
||||
|
||||
@Component({
|
||||
selector: "app-empty-tab",
|
||||
templateUrl: "./empty-tab.component.html",
|
||||
styleUrls: ["./empty-tab.component.scss"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class EmptyTabComponent {
|
||||
|
||||
@Output() tabCategorySelect = new EventEmitter<TabCategory>();
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
public addTab(category: TabCategoryName) {
|
||||
switch (category) {
|
||||
case "files":
|
||||
this.tabCategorySelect.emit(TabCategory.Files);
|
||||
break;
|
||||
case "import":
|
||||
this.tabCategorySelect.emit(TabCategory.Import);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue