-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: trivernis <trivernis@protonmail.com>
- Loading branch information
Showing
9 changed files
with
107 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
mediarepo-ui/src/app/components/core/empty-tab/empty-tab.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
31 changes: 31 additions & 0 deletions
31
mediarepo-ui/src/app/components/core/empty-tab/empty-tab.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
mediarepo-ui/src/app/components/core/empty-tab/empty-tab.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
mediarepo-ui/src/app/components/core/empty-tab/empty-tab.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters