대화방 검색( 디자인적용)

This commit is contained in:
khk 2020-01-07 19:30:58 +09:00
parent 2f0ab68f3e
commit a863e10685
4 changed files with 173 additions and 71 deletions

View File

@ -185,27 +185,19 @@
</mat-menu> </mat-menu>
</div> </div>
</div> </div>
</mat-toolbar> <div class="chat-search-frame">
<!-- / CHAT TOOLBAR --> <div *ngIf="(eventListProcessing$ | async) || isTranslationProcess" style="position: absolute; width: 100%;">
<div style="position: relative;">
<div
*ngIf="(eventListProcessing$ | async) || isTranslationProcess"
style="position: absolute; width: 100%;"
>
<mat-progress-bar mode="indeterminate"></mat-progress-bar> <mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div> </div>
<div *ngIf="isShowSearchArea" class="char-search"> <div *ngIf="isShowSearchArea" class="chat-search bg-accent-color">
<ucap-chat-search <ucap-chat-search [totalCount]="searchTotalCount" [curIndex]="searchCurrentIndex"
[totalCount]="searchTotalCount" (searchText)="onSearchChat($event)" (prevSearch)="onPrevSearch()" (nextSearch)="onNextSearch()"
[curIndex]="searchCurrentIndex" (searchAndPrev)="onSearchAndPrev()" (closeSearchArea)="onCloseSearchArea()"></ucap-chat-search>
(searchText)="onSearchChat($event)"
(prevSearch)="onPrevSearch()"
(nextSearch)="onNextSearch()"
(searchAndPrev)="onSearchAndPrev()"
(closeSearchArea)="onCloseSearchArea()"
></ucap-chat-search>
</div> </div>
</div> </div>
</mat-toolbar>
<!-- / CHAT TOOLBAR -->
<!-- CHAT CONTENT --> <!-- CHAT CONTENT -->
<div <div
fxFlex="1 1 auto" fxFlex="1 1 auto"

View File

@ -23,20 +23,27 @@
width: 100%; width: 100%;
} }
.chat-toolbar { .chat-toolbar {
position: relative;
display: flex;
flex-flow: column;
width: 100%; width: 100%;
height: 70px; height: auto;
min-height: 70px;
align-items: center; align-items: center;
background-color: #ffffff !important; background-color: #ffffff !important;
border-bottom: 1px solid #dddddd; border-bottom: 1px solid #dddddd;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
z-index: 1;
padding: 0;
.chat-header { .chat-header {
width: 100%; width: 100%;
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
justify-items: center;
padding: 10px 20px;
.profile-img { .profile-img {
margin-right: 16px; margin-right: 16px;
.responsive-chats-button { .responsive-chats-button {
display: none; display: none;
&:last-child { &:last-child {
@ -87,6 +94,13 @@
margin-left: auto; margin-left: auto;
} }
} }
.chat-search-frame {
position: relative;
width: 100%;
.chat-search {
margin: 0 4px 4px;
}
}
} }
.chat-content { .chat-content {
@ -152,12 +166,3 @@
} }
} }
} }
.char-search {
width: 100%;
height: 80px;
background-color: #ffffff;
padding: 20px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
border-bottom: 1px solid #dddddd;
}

View File

@ -1,6 +1,7 @@
<div fxFlex fxLayout="row" class="chatroom-search"> <div fxFlex fxLayout="row" class="chatroom-search">
<div fxLayout="row" fxLayoutAlign="start center" class="input search-form"> <div fxLayout="row" fxLayoutAlign="start center" class="input search-form">
<form [formGroup]="fgSearch" class="w-100-p"> <form [formGroup]="fgSearch" class="w-100-p">
<i class="material-icons icon-search"> </i>
<mat-form-field floatLabel="never"> <mat-form-field floatLabel="never">
<input <input
matInput matInput
@ -11,19 +12,29 @@
formControlName="searchInput" formControlName="searchInput"
(keydown.enter)="onKeyDownEnter($event, inputSearch.value)" (keydown.enter)="onKeyDownEnter($event, inputSearch.value)"
/> />
<button <!-- <button
mat-button mat-button
matSuffix matSuffix
mat-icon-button mat-icon-button
aria-label="Clear" aria-label="Clear"
(click)="inputSearch.value = ''; onClickSearchCancel()" (click)="inputSearch.value = ''; onClickSearchCancel()"
>
-->
<button
mat-button
matSuffix
mat-icon-button
aria-label="Clear"
*ngIf="inputSearch.value"
(click)="inputSearch.value = ''"
> >
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
</mat-form-field> </mat-form-field>
<span class="text-amount">{{ curIndex }} / {{ totalCount }}</span> <span class="stroke-bar"></span>
</form> </form>
</div> </div>
<div class="btns"> <div class="btns">
<button <button
mat-stroked-button mat-stroked-button
@ -81,6 +92,7 @@
<polyline class="st0" points="15.8,10 10,15.8 4.2,10 " /> <polyline class="st0" points="15.8,10 10,15.8 4.2,10 " />
</svg> </svg>
</button> </button>
<!--<mat-button-toggle-group> <!--<mat-button-toggle-group>
<mat-button-toggle></mat-button-toggle> <mat-button-toggle></mat-button-toggle>
<mat-button-toggle > <mat-button-toggle >
@ -103,4 +115,26 @@
<mat-button-toggle ></mat-button-toggle> <mat-button-toggle ></mat-button-toggle>
</mat-button-toggle-group>--> </mat-button-toggle-group>-->
</div> </div>
<span class="stroke-bar"></span>
<span class="text-amount">{{ curIndex }} / {{ totalCount }}</span>
<button
class="btn-close-searchbox bg-accent-dark"
(click)="inputSearch.value = ''; onClickSearchCancel()"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-x"
>
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div> </div>

View File

@ -4,6 +4,7 @@
justify-items: center; justify-items: center;
.search-form { .search-form {
flex-flow: row; flex-flow: row;
padding: 0 10px 0 20px;
flex: 1 1 auto; flex: 1 1 auto;
form { form {
display: flex; display: flex;
@ -17,40 +18,87 @@
color: rgba(0, 0, 0, 0.54); color: rgba(0, 0, 0, 0.54);
} }
} }
}
}
.text-amount { .text-amount {
display: inline-flex; display: inline-flex;
width: 80px; min-width: 80px;
padding: 0 10px;
align-self: center; align-self: center;
font-size: 0.7em;
justify-content: center;
border-radius: 50px;
margin-right: 10px;
}
}
::ng-deep .search-form {
.mat-form-field-appearance-legacy {
.mat-form-field-wrapper {
color: #ffffff;
padding-bottom: 0.8em;
.mat-form-field-infix {
.mat-input-element {
font-size: 1em;
}
}
.mat-form-field-suffix {
button {
position: relative;
transform: translateY(4px);
.mat-button-wrapper {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
font-size: 1.2em;
} }
} }
} }
.mat-form-field-label {
color: rgba(255, 255, 255, 0.7) !important;
}
.mat-form-field-underline {
height: 0;
.mat-form-field-ripple {
top: 6px;
height: 1px;
overflow: hidden;
display: none;
}
}
}
}
.icon-search {
height: 100%;
display: flex;
align-self: center;
color: #ffffff;
margin-right: 10px;
}
}
::ng-deep .chatroom-search {
position: relative;
.btns { .btns {
display: flex; display: flex;
flex: 0 0 0%; flex: 0 0 0%;
} height: 40px;
} margin-top: 10px;
//border: 1px solid #ffffff;
.mat-form-field-label, border-radius: 50px;
.mat-hint {
color: rgba(0, 0, 0, 0.54);
}
::ng-deep .btns {
border: 1px solid #dddddd;
border-radius: 4px;
height: 42px;
.mat-stroked-button { .mat-stroked-button {
border: none; border: none;
min-width: 40px; min-width: 40px;
height: 42px; height: 40px;
padding: 0 10px; padding: 0 10px;
overflow: hidden;
border-radius: 50%;
background-color: (0, 0, 0, 0.7);
&.btn-toggle { &.btn-toggle {
display: flex; display: flex;
border-right: 1px solid #dddddd; //border-right: 1px solid #ffffff;
justify-items: center; justify-items: center;
&:last-child {
border-right: none;
}
.mat-button-wrapper { .mat-button-wrapper {
display: flex; display: flex;
line-height: inherit; line-height: inherit;
@ -61,9 +109,32 @@
svg { svg {
width: 100%; width: 100%;
height: 100%; height: 100%;
stroke: #555555; stroke: #ffffff;
} }
} }
} }
} }
} }
.btn-close-searchbox {
width: 3em;
height: 100%;
//background: #0367a6;
stroke: #ffffff;
border: none;
display: flex;
justify-content: center;
justify-items: center;
svg {
stroke: #ffffff;
}
}
}
.stroke-bar {
width: 1px;
height: 20px;
background-color: rgba(255, 255, 255, 0.3);
margin: 0 10px;
display: inline-flex;
align-self: center;
}