테마선택- tab으로 변경

This commit is contained in:
khk 2019-11-26 10:56:58 +09:00
parent 664a92781f
commit 7da4bfb5ee
5 changed files with 105 additions and 43 deletions

View File

@ -4,7 +4,7 @@
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<div fxFlex class="setting-tab"> <div fxFlex class="setting-tab">
<mat-tab-group animationDuration="0ms" vertical> <mat-tab-group animationDuration="0ms">
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<span class="mdi mdi-settings"></span> <span class="mdi mdi-settings"></span>

View File

@ -25,6 +25,24 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
.mat-tab-group {
flex-direction: row;
.mat-tab-header {
width: 160px;
.mat-tab-labels {
flex-direction: column;
.mat-tab-label {
padding: 0 10px;
align-content: flex-start;
text-align: left;
align-items: self-start;
justify-content: flex-start;
}
.mat-ink-bar {
display: none;
}
}
}
.mat-tab-body-wrapper { .mat-tab-body-wrapper {
border-left: 1px solid #dddddd; border-left: 1px solid #dddddd;
position: relative; position: relative;
@ -33,6 +51,7 @@
} }
} }
} }
}
.button-farm { .button-farm {
text-align: right; text-align: right;
@ -51,6 +70,8 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
.mat-tab-header { .mat-tab-header {
width: 160px;
flex-flow: column;
.mat-tab-label-container { .mat-tab-label-container {
.mat-tab-list { .mat-tab-list {
.mat-tab-labels { .mat-tab-labels {

View File

@ -320,7 +320,7 @@ $daesang-grey: (
mat-tab-group[vertical] { mat-tab-group[vertical] {
display: flex; display: flex;
flex-direction: row !important; flex-direction: row;
.mat-tab-labels { .mat-tab-labels {
display: flex; display: flex;

View File

@ -1,40 +1,43 @@
<div> <div>
<mat-list> <mat-list>
<h1 mat-subheader>테마</h1> <h1 mat-subheader>테마</h1>
<!--<ul class="theme-list">
<ul class="theme-list">
<li <li
class="theme-box default on" class="theme-box default"
(click)="onSelectedTabChange('theme-default')" (click)="onSelectedTabChange('theme-default')"
></li> ></li>
<li <li
class="theme-box lgRed" class="theme-box lgRed"
(click)="onSelectedTabChange('theme-lgRed')" (click)="onSelectedTabChange('theme-lgRed')"
></li> ></li>
</ul> </ul>-->
<mat-list-item> <mat-list-item class="theme-select">
<!-- <mat-tab-group <mat-tab-group
mat-stretch-tabs mat-stretch-tabs
animationDuration="0ms" animationDuration="0ms"
(selectedTabChange)="onSelectedTabChange($event)" (selectedTabChange)="onSelectedTabChange($event)"
fxLayout="row"
class="theme-list"
> >
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label class="theme-item">
<div class="theme-box default-theme"></div> <div class="theme-box default-theme"></div>
<div>기본값</div> <div class="theme-name">기본값</div>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label class="theme-item">
<div class="theme-box lg-red-theme"></div> <div class="theme-box lg-red-theme"></div>
<div>LG Red</div> <div class="theme-name">LG Red</div>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
</mat-tab-group> --> </mat-tab-group>
<!--
<div class="brightness">
<span>기본값</span> <span>기본값</span>
<span>어둡게</span> <span>어둡게</span>
<span>밝게</span> --> <span>밝게</span>
</div>
</mat-list-item> </mat-list-item>
<mat-divider></mat-divider> <mat-divider></mat-divider>

View File

@ -1,11 +1,47 @@
.theme-list { ::ng-deep .mat-list-base {
.theme-select.mat-list-item {
position: relative;
height: 200px;
.mat-list-item-content {
flex-direction: column;
}
}
}
::ng-deep .theme-list {
position: relative; position: relative;
display: flex; display: flex;
flex-flow: row; flex-flow: row;
width: 100%;
margin: 10px; margin: 10px;
height: auto !important;
.mat-tab-header {
position: relative;
width: 100% !important;
.mat-tab-labels {
position: relative;
width: 100%;
flex-flow: row !important;
.mat-tab-label {
width: 140px;
height: 120px; height: 120px;
.mat-tab-label-content {
position: relative;
flex-flow: column;
width: 100%;
}
}
}
.mat-ink-bar {
display: none;
}
}
.mat-tab-body-wrapper {
border-left: none;
}
}
.theme-box { .theme-item {
width: 140px; width: 140px;
height: 98px; height: 98px;
margin-right: 10px; margin-right: 10px;
@ -13,22 +49,24 @@
background-size: 100% auto; background-size: 100% auto;
background-repeat: no-repeat; background-repeat: no-repeat;
opacity: 0.7; opacity: 0.7;
&.default { }
.theme-box {
width: 140px;
height: 98px;
border: 1px solid #dddddd;
background-size: 100% auto;
background-repeat: no-repeat;
&.default-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-default.png'); background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-default.png');
} }
&.lgRed { &.lg-red-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-lgRed.png'); background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-lgRed.png');
} }
&.on {
border: 1px solid #333333;
opacity: 1;
}
} }
.default-theme { .brightness {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-default.png'); position: relative;
} width: 100%;
.lg-red-theme { display: flex;
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-lgRed.png'); flex-direction: row;
}
} }