Move import sidebar to sidebar module
Signed-off-by: trivernis <trivernis@protonmail.com>pull/4/head
parent
62cba1ce56
commit
d7e477efb8
@ -1,21 +1,7 @@
|
||||
<div class="import-tab-inner">
|
||||
<mat-tab-group headerPosition="below">
|
||||
<mat-tab label="Import">
|
||||
<div class="import-sidebar-tab-inner" fxLayout="column">
|
||||
<div class="import-type-select-wrapper" fxFlex="6em">
|
||||
<mat-form-field class="import-type-select">
|
||||
<mat-label>Import Type</mat-label>
|
||||
<mat-select value="filesystem">
|
||||
<mat-option value="filesystem">Filesystem</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-divider></mat-divider>
|
||||
</div>
|
||||
<div class="import-configuration" fxFlex fxFlexFill>
|
||||
<app-filesystem-import (fileImported)="this.fileImported.emit($event)"
|
||||
(importFinished)="importFinished.emit()"></app-filesystem-import>
|
||||
</div>
|
||||
</div>
|
||||
<app-file-import (importFinished)="importFinished.emit($event)" (fileImported)="fileImported.emit($event)"></app-file-import>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
|
@ -0,0 +1,15 @@
|
||||
<div class="file-import-inner" fxLayout="column">
|
||||
<div class="import-type-select-wrapper" fxFlex="6em">
|
||||
<mat-form-field class="import-type-select">
|
||||
<mat-label>Import Type</mat-label>
|
||||
<mat-select value="filesystem">
|
||||
<mat-option value="filesystem">Filesystem</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-divider></mat-divider>
|
||||
</div>
|
||||
<div class="import-configuration" fxFlex fxFlexFill>
|
||||
<app-filesystem-import (fileImported)="this.fileImported.emit($event)"
|
||||
(importFinished)="importFinished.emit()"></app-filesystem-import>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,22 @@
|
||||
.import-type-select-wrapper {
|
||||
width: 100%;
|
||||
|
||||
.import-type-select {
|
||||
width: calc(100% - 2em);
|
||||
height: calc(100% - 2em);
|
||||
margin: 1em;
|
||||
|
||||
mat-select {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.file-import-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.import-configuration {
|
||||
padding: 1em;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FileImportComponent } from './file-import.component';
|
||||
|
||||
describe('FileImportComponent', () => {
|
||||
let component: FileImportComponent;
|
||||
let fixture: ComponentFixture<FileImportComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FileImportComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FileImportComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,16 @@
|
||||
import {Component, EventEmitter, OnInit, Output} from "@angular/core";
|
||||
import {File} from "../../../../models/File";
|
||||
|
||||
@Component({
|
||||
selector: "app-file-import",
|
||||
templateUrl: "./file-import.component.html",
|
||||
styleUrls: ["./file-import.component.scss"]
|
||||
})
|
||||
export class FileImportComponent {
|
||||
|
||||
@Output() fileImported = new EventEmitter<File>();
|
||||
@Output() importFinished = new EventEmitter<void>();
|
||||
|
||||
constructor() {
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue