mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-20 03:51:00 +00:00
update status list template and add flex box
This commit is contained in:
parent
063951cffa
commit
e0d9542bfe
@ -6,7 +6,7 @@ import { MatTable } from '@angular/material/table';
|
||||
import { DeviceListDataSource } from './device-list-datasource';
|
||||
import { Device } from '../../device';
|
||||
import { SystemConfigService } from '../../system-config.service';
|
||||
import { cardElevation } from '../../style';
|
||||
import { dataTableElevation } from '../../style';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ export class DeviceListComponent implements AfterViewInit, OnInit {
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
@ViewChild(MatTable) table: MatTable<Device>;
|
||||
dataSource: DeviceListDataSource;
|
||||
elevation: string = cardElevation;
|
||||
elevation: string = dataTableElevation;
|
||||
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['id', 'name'];
|
||||
|
@ -6,7 +6,7 @@ import { MatTable } from '@angular/material/table';
|
||||
import { FolderListDataSource } from './folder-list-datasource';
|
||||
import { Folder } from '../../folder';
|
||||
import { SystemConfigService } from '../../system-config.service';
|
||||
import { cardElevation } from '../../style';
|
||||
import { dataTableElevation } from '../../style';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
@ -19,7 +19,7 @@ export class FolderListComponent implements AfterViewInit, OnInit {
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
@ViewChild(MatTable) table: MatTable<Folder>;
|
||||
dataSource: FolderListDataSource;
|
||||
elevation: string = cardElevation;
|
||||
elevation: string = dataTableElevation;
|
||||
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['id', 'label'];
|
||||
|
@ -1,3 +1,10 @@
|
||||
<app-status-toggle (statusEvent)="onToggle($event)"></app-status-toggle>
|
||||
<app-folder-list *ngIf="currentStatus===status.Folders"></app-folder-list>
|
||||
<app-device-list *ngIf="currentStatus===status.Devices"></app-device-list>
|
||||
<mat-card class="{{elevation}}">
|
||||
<div fxLayout="row" fxLayoutAlign="space-between start">
|
||||
<mat-card-title>Status</mat-card-title>
|
||||
<app-status-toggle (statusEvent)="onToggle($event)"></app-status-toggle>
|
||||
</div>
|
||||
<mat-card-content>
|
||||
<app-folder-list *ngIf="currentStatus===status.Folders"></app-folder-list>
|
||||
<app-device-list *ngIf="currentStatus===status.Devices"></app-device-list>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Status } from '../../status';
|
||||
import { cardElevation } from '../../style';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -8,8 +9,9 @@ import { Status } from '../../status';
|
||||
styleUrls: ['./status-list.component.scss']
|
||||
})
|
||||
export class StatusListComponent implements OnInit {
|
||||
public currentStatus: Status = Status.Folders;
|
||||
public status = Status;
|
||||
currentStatus: Status = Status.Folders;
|
||||
status = Status; // used in html
|
||||
elevation: string = cardElevation;
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
// material design elevation for all dashboard components
|
||||
export const cardElevation: string = "mat-elevation-z2";
|
||||
export const cardElevation: string = "mat-elevation-z2";
|
||||
export const dataTableElevation: string = "mat-elevation-z0";
|
Loading…
Reference in New Issue
Block a user