right-drawer 수정중(임시)

This commit is contained in:
khk 2019-11-19 13:13:08 +09:00
parent 165ff91337
commit 8a7469cd5e
7 changed files with 274 additions and 71 deletions

View File

@ -1,5 +1,5 @@
<div> <div class="rightDrawer-title">
<span>{{ selectedRightDrawer }}</span> <h3>{{ selectedRightDrawer }}</h3>
<span> <span>
<button <button
mat-button mat-button

View File

@ -0,0 +1,12 @@
.rightDrawer-title{
height: 60px;
border-bottom: 1px solid #dddddd;
font-size: 16px;
align-items: center;
display: flex;
padding: 0 20px;
font-weight: 600;
span{
margin-left:auto;
}
}

View File

@ -1,15 +1,16 @@
<div fxLayout="column" style="width: 600px;" class="album-box"> <div fxLayout="column" class="album-box">
<div> <div>
<mat-tab-group (selectedIndexChange)="onSelectedIndexChange($event)"> <mat-tab-group (selectedIndexChange)="onSelectedIndexChange($event)">
<mat-tab label="Image"></mat-tab> <mat-tab label="Image"></mat-tab>
<mat-tab label="Video"></mat-tab> <mat-tab label="Video"></mat-tab>
</mat-tab-group> </mat-tab-group>
</div> </div>
<div fxFlex="0 0 400px"> <div fxFlex="1 1 240px" class="select-filebox bg-accent-brightest">
<ng-container *ngIf="!selectedFile"> <ng-container *ngIf="!selectedFile">
Select File. Select File.
</ng-container> </ng-container>
<ng-container *ngIf="selectedFile"> <ng-container *ngIf="selectedFile">
<div class="select-file">
<img <img
*ngIf="selectedFile.info.type === FileType.Image" *ngIf="selectedFile.info.type === FileType.Image"
[src]="getImageUrl(selectedFile)" [src]="getImageUrl(selectedFile)"
@ -18,10 +19,11 @@
<video <video
controls controls
*ngIf="selectedFile.info.type === FileType.Video" *ngIf="selectedFile.info.type === FileType.Video"
class="preview-image" class="preview-video"
> >
<source [src]="getImageUrl(selectedFile)" /> <source [src]="getImageUrl(selectedFile)" />
</video> </video>
</div>
<ul> <ul>
<li>name : {{ selectedFile.info.name }}</li> <li>name : {{ selectedFile.info.name }}</li>
<li>size : {{ selectedFile.info.size | ucapBytes }}</li> <li>size : {{ selectedFile.info.size | ucapBytes }}</li>
@ -66,7 +68,7 @@
</ng-template> </ng-template>
</dt> </dt>
<dd> <dd>
<span> <span class="checkbox">
<mat-checkbox <mat-checkbox
#checkbox #checkbox
[checked]="getCheckItem(fileInfo)" [checked]="getCheckItem(fileInfo)"
@ -75,7 +77,7 @@
> >
</mat-checkbox> </mat-checkbox>
</span> </span>
<span> <span class="btn-download">
<button mat-button (click)="onClickDownload(fileInfo)"> <button mat-button (click)="onClickDownload(fileInfo)">
<mat-icon>vertical_align_bottom</mat-icon> <mat-icon>vertical_align_bottom</mat-icon>
</button> </button>

View File

@ -7,10 +7,69 @@
} }
} }
::ng-deep .mat-tab-label{
width:50%;
}
.select-filebox{
display:flex;
flex-flow: column;
margin:10px;
padding:10px;
border:1px solid #cccccc;
.select-flie{
display: flex;
flex-flow: row;
align-items: center;
color: #212121;
align-items: center;
border-bottom: 1px dotted #dddddd;
text-align:center;
ul{
padding:0;
margin-top:10px;
.name{
font-weight:600;
}
}
}
}
.search-list{
display:flex;
padding:0 10px;
height: calc(100% - 450px);
overflow-y: auto;
flex-wrap: wrap;
justify-content: space-between;
.img-item { .img-item {
cursor: pointer; cursor: pointer;
max-width: 150px; margin-bottom:10px;
min-width: 150px; position: relative;
dl{
dt{
display: flex;
justify-content: center;
align-items: center;
width: 120px;
height: 120px;
background-color: #efefef;
border: 1px dotted #cccccc;
img{
width:100%;
height:100%;
}
}
dd{
.btn-download{
margin-left:auto;
}
}
}
& :nth-child(3n+0){
margin-right:0;
}
}
} }
.preview-image { .preview-image {
@ -18,6 +77,11 @@
} }
.btn-box { .btn-box {
position:absolute;
bottom:0;
height:50px;
margin-bottom:10px;
width:100%;
button { button {
margin: 5px; margin: 5px;
} }

View File

@ -1,15 +1,16 @@
<div fxLayout="column"> <div fxLayout="column" class="rightDrawer-filebox">
<div> <div class="rightDrawer-tab">
<mat-tab-group (selectedIndexChange)="onSelectedIndexChange($event)"> <mat-tab-group (selectedIndexChange)="onSelectedIndexChange($event)">
<mat-tab label="Receive"></mat-tab> <mat-tab label="Receive"></mat-tab>
<mat-tab label="Send"></mat-tab> <mat-tab label="Send"></mat-tab>
</mat-tab-group> </mat-tab-group>
</div> </div>
<div fxFlex="1 1 300px"> <div fxFlex="1 1 200px" class="select-filebox bg-accent-brightest">
<ng-container *ngIf="!selectedFile" > <ng-container *ngIf="!selectedFile" >
Select File. Select File.
</ng-container> </ng-container>
<ng-container *ngIf="selectedFile"> <ng-container *ngIf="selectedFile">
<div class="select-flie">
<div <div
[ngClass]="[ [ngClass]="[
'mime-icon', 'mime-icon',
@ -20,16 +21,20 @@
<div class="ico"></div> <div class="ico"></div>
</div> </div>
<ul> <ul>
<li>name : {{ selectedFile.info.name }}</li> <li class="name">name : {{ selectedFile.info.name }}</li>
<li>size : {{ selectedFile.info.size | ucapBytes }}</li> <li>size : {{ selectedFile.info.size | ucapBytes }}</li>
<li> <li>
date : date :
{{ selectedFile.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} {{ selectedFile.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }}
</li> </li>
</ul> </ul>
</div>
<div>
아이콘
</div>
</ng-container> </ng-container>
</div> </div>
<div fxFlex="1 1 auto"> <div fxFlex="0 0 auto" class="table-box">
<table mat-table [dataSource]="dataSource" matSort> <table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="check"> <ng-container matColumnDef="check">
<th mat-header-cell *matHeaderCellDef> <th mat-header-cell *matHeaderCellDef>
@ -55,19 +60,21 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header class="infos"> <th mat-header-cell *matHeaderCellDef mat-sort-header class="infos">
Name Name
</th> </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element" class="file-info">
<div> <div class="file-name">
{{ element.info.name }} {{ element.info.name }}
</div> </div>
<div> <div class="download-period text-accent-color">
{{ element.info.size | ucapBytes }} <!--{{ element.info.size | ucapBytes }}-->
{{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} ~ 2020.01.23
</div> </div>
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="sendDate" class="date"> <ng-container matColumnDef="sendDate" class="date">
<th mat-header-cell *matHeaderCellDef mat-sort-header>sendDate</th> <th mat-header-cell *matHeaderCellDef mat-sort-header>sendDate</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
{{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} <!--{{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }}-->
{{ element.info.size | ucapBytes }}
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
@ -77,13 +84,14 @@
(click)="onClickRow(row)" (click)="onClickRow(row)"
></tr> ></tr>
</table> </table>
</div>
<div class="footer-fix">
<mat-paginator <mat-paginator
[pageSize]="10" [pageSize]="10"
[pageSizeOptions]="[5, 10, 20]" [pageSizeOptions]="[5, 10, 20]"
showFirstLastButtons showFirstLastButtons
></mat-paginator> ></mat-paginator>
</div>
<div <div
fxFlex="1 1 50px" fxFlex="1 1 50px"
fxLayout="row" fxLayout="row"
@ -102,3 +110,4 @@
</button> </button>
</div> </div>
</div> </div>
</div>

View File

@ -1,5 +1,87 @@
table { @mixin ellipsis($row) {
overflow: hidden;
text-overflow: ellipsis;
@if $row == 1 {
display: block;
white-space: nowrap;
word-wrap: normal;
} @else if $row >= 2 {
display: -webkit-box;
-webkit-line-clamp: $row;
-webkit-box-orient: vertical;
word-wrap: break-word;
}
}
.rightDrawer-filebox {
width: 100%; width: 100%;
height: calc(100% - 60px);
.rightDrawer-tab {
.mat-tab-label {
width: 50%;
}
}
}
::ng-deep .mat-tab-label {
width: 50%;
}
.select-filebox {
display: flex;
flex-flow: column;
margin: 10px;
padding: 10px;
border: 1px solid #cccccc;
.select-flie {
display: flex;
flex-flow: row;
align-items: center;
color: #212121;
align-items: center;
border-bottom: 1px dotted #dddddd;
ul {
padding: 0;
.name {
font-weight: 600;
}
}
}
}
.mat-table {
width: 100%;
position: relative;
th.infos {
padding: 10px;
}
tr.mat-row {
height: 70px;
.file-info {
padding: 16px;
display: grid;
height: 70px;
.file-name {
font-weight: 600;
margin-bottom: 2px;
width: 100%;
@include ellipsis(1);
}
.download-period {
font-size: 12px;
width: 100%;
@include ellipsis(1);
}
}
}
}
.table-box{
height: calc(100% - 450px);
overflow-y: auto;
}
.mat-paginator-container {
display: flex;
flex-flow: column;
} }
.mat-row:hover { .mat-row:hover {
@ -7,8 +89,42 @@ table {
cursor: pointer; cursor: pointer;
} }
.footer-fix{
position: absolute;
bottom: 0;
height:160px;
flex-direction: column;
box-sizing: border-box;
display: flex;
.btn-box { .btn-box {
height: 50px;
padding-bottom: 10px;
width: 100%;
background-color: #ffffff;
button { button {
margin: 5px; margin: 5px;
} }
} }
}
::ng-deep .mat-paginator {
.mat-paginator-container {
justify-content: center;
}
.mat-paginator-navigation-first {
order: 1;
}
.mat-paginator-navigation-previous {
order: 2;
}
// override material paginator page switch
.mat-paginator-range-label {
order: 3;
}
.mat-paginator-navigation-next {
order: 4;
}
.mat-paginator-navigation-last {
order: 5;
}
}

View File

@ -1,5 +1,5 @@
.list { .list {
width: 300px; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;