create folder and device list components

refactor status-list to contain device and folder list
This commit is contained in:
Jesse Lucas
2020-03-11 21:24:02 -04:00
parent 031fd72dfd
commit 61b4de581d
19 changed files with 2045 additions and 153 deletions
@@ -1,4 +1,4 @@
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
<mat-button-toggle value="folders">Folders</mat-button-toggle>
<mat-button-toggle value="devices">Devices</mat-button-toggle>
<mat-button-toggle value="folders" (click)="onSelect(toggleAction.Folders)">Folders</mat-button-toggle>
<mat-button-toggle value=" devices" (click)="onSelect(toggleAction.Devices)">Devices</mat-button-toggle>
</mat-button-toggle-group>
@@ -1,15 +1,33 @@
import { Component, OnInit } from '@angular/core';
export enum ToggleAction {
Folders = 1,
Devices,
}
@Component({
selector: 'app-status-toggle',
templateUrl: './status-toggle.component.html',
styleUrls: ['./status-toggle.component.scss']
})
export class StatusToggleComponent implements OnInit {
export class StatusToggleComponent implements OnInit {
public toggleAction = ToggleAction
constructor() { }
ngOnInit(): void {
}
onSelect(label: ToggleAction): void {
console.log("here?");
switch (label) {
case ToggleAction.Folders:
console.log("folder action");
break;
case ToggleAction.Devices:
console.log("Device action");
break;
}
}
}