This commit is contained in:
richard-loafle 2020-02-06 15:30:30 +09:00
commit 7308940001
7 changed files with 97 additions and 16 deletions

View File

@ -173,19 +173,42 @@
} }
} }
} }
//mat-snack-bar
::ng-deep .cdk-global-overlay-wrapper { ::ng-deep .cdk-global-overlay-wrapper {
.mat-snack-bar-container { .mat-snack-bar-container {
margin: 0; margin: 0;
padding: 30px; padding: 30px;
max-width: 60vw;
.mat-simple-snackbar { .mat-simple-snackbar {
display: flex;
justify-content: center; justify-content: center;
span { span {
@include ellipsis(1); @include ellipsis(3);
padding: 10px 40px; display: inline-block;
padding: 7px 20px;
border: 1px solid #ffffff; border: 1px solid #ffffff;
background-color: rgb(255, 255, 255, 0.2); background-color: rgb(255, 255, 255, 0.2);
color: #ffffff; color: #ffffff;
margin-right: 4px;
flex: 1 1 auto;
max-width: 40vw;
}
&-action {
display: inline-flex;
margin-left: auto;
flex: 0 0 auto;
height: 100%;
button {
//background-color: #00b6d5;
border-radius: 2px;
span {
padding: 0 20px;
color: #ffffff;
background: none;
border: none;
font-weight: 500;
}
}
} }
} }
} }

View File

@ -1511,6 +1511,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
break; break;
case 'ADD_MEMBER': case 'ADD_MEMBER':
{ {
const curRoomUser = this.userInfoListSubject.value.filter(
user =>
user.seq !== this.loginResSubject.value.userSeq && user.isJoinRoom
);
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -1520,15 +1525,27 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
data: { data: {
type: UserSelectDialogType.EditChatMember, type: UserSelectDialogType.EditChatMember,
title: this.translateService.instant('chat.modifyRoomMember'), title: this.translateService.instant('chat.modifyRoomMember'),
curRoomUser: this.userInfoListSubject.value.filter( curRoomUser
user =>
user.seq !== this.loginResSubject.value.userSeq &&
user.isJoinRoom
)
} }
}); });
if (!!result && !!result.choice && result.choice) { if (!!result && !!result.choice && result.choice) {
if (
!!result.selectedUserList &&
result.selectedUserList.length > 0 &&
curRoomUser
.map(user => user.seq)
.sort()
.join('|') ===
result.selectedUserList
.map(user => user.seq)
.sort()
.join('|')
) {
// 변경된 것이 없다면 중지.
return;
}
// include me here.. // include me here..
const userSeqs: number[] = this.userInfoListSubject.value const userSeqs: number[] = this.userInfoListSubject.value
.filter(userInfo => userInfo.isJoinRoom) .filter(userInfo => userInfo.isJoinRoom)

View File

@ -138,6 +138,10 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
} }
async onClickAddMember() { async onClickAddMember() {
const curRoomUser = this.userInfoList.filter(
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
);
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -147,18 +151,31 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
data: { data: {
type: UserSelectDialogType.EditChatMember, type: UserSelectDialogType.EditChatMember,
title: this.translateService.instant('chat.modifyRoomMember'), title: this.translateService.instant('chat.modifyRoomMember'),
curRoomUser: this.userInfoList.filter( curRoomUser
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
)
} }
}); });
if (!!result && !!result.choice && result.choice) { if (!!result && !!result.choice && result.choice) {
if (
!!result.selectedUserList &&
result.selectedUserList.length > 0 &&
curRoomUser
.map(user => user.seq)
.sort()
.join('|') ===
result.selectedUserList
.map(user => user.seq)
.sort()
.join('|')
) {
// 변경된 것이 없다면 중지.
return;
}
// include me here.. // include me here..
const userSeqs: number[] = this.userInfoList const userSeqs: number[] = this.userInfoList
.filter(userInfo => userInfo.isJoinRoom) .filter(userInfo => userInfo.isJoinRoom)
.map(userInfo => userInfo.seq); .map(userInfo => userInfo.seq);
if (!!result.selectedUserList && result.selectedUserList.length > 0) { if (!!result.selectedUserList && result.selectedUserList.length > 0) {
result.selectedUserList.forEach(user => { result.selectedUserList.forEach(user => {
if (userSeqs.indexOf(user.seq) < 0) { if (userSeqs.indexOf(user.seq) < 0) {

View File

@ -90,7 +90,7 @@ $ease-in-out: cubic-bezier(0.785, 0.135, 0.15, 0.86);
background-size: auto 133.3333%; background-size: auto 133.3333%;
background-position: center; background-position: center;
background-repeat: none; background-repeat: none;
transform: scale(0.70); transform: scale(0.7);
transition: transform $time/4 $ease-in-out, box-shadow $time/4 $ease-in-out, transition: transform $time/4 $ease-in-out, box-shadow $time/4 $ease-in-out,
opacity $time/4 step-end; opacity $time/4 step-end;
opacity: 0; opacity: 0;
@ -327,6 +327,15 @@ $ease-in-out: cubic-bezier(0.785, 0.135, 0.15, 0.86);
} }
} }
.mat-card-content {
.notice {
p {
line-height: 1.4em;
margin-bottom: 10px;
}
}
}
@media all and (max-width: 1400px) { @media all and (max-width: 1400px) {
.slider { .slider {
&_content { &_content {

View File

@ -103,6 +103,8 @@ export const reducer = createReducer(
}), }),
on(clearRoomUsers, (state, action) => { on(clearRoomUsers, (state, action) => {
const roomInfo = state.room.entities[action.roomSeq];
const roomUserList: RoomUserDetailData = { const roomUserList: RoomUserDetailData = {
...state.roomUser.entities[action.roomSeq] ...state.roomUser.entities[action.roomSeq]
}; };
@ -149,6 +151,15 @@ export const reducer = createReducer(
return { return {
...state, ...state,
room: adapterRoom.upsertOne(
{
...roomInfo,
joinUserCount: roomInfo.joinUserCount - action.userSeqs.length
},
{
...state.room
}
),
roomUser: !!trgtRoomUserList roomUser: !!trgtRoomUserList
? adapterRoomUser.upsertOne(trgtRoomUserList, { ? adapterRoomUser.upsertOne(trgtRoomUserList, {
...state.roomUser ...state.roomUser

View File

@ -446,6 +446,12 @@ $daesang-grey: (
.list-item { .list-item {
&.selected { &.selected {
background-color: mat-color($accent, 100); background-color: mat-color($accent, 100);
border-right: 2px solid mat-color($accent, 800);
}
}
.mat-simple-snackbar-action {
button {
background-color: mat-color($accent, 500);
} }
} }
} }

View File

@ -69,9 +69,7 @@
<i class="mdi mid-18 mdi-bell-off-outline text-primary-light"></i> <i class="mdi mid-18 mdi-bell-off-outline text-primary-light"></i>
</div> </div>
</div> </div>
<div class="final-message"> <div class="final-message" [innerHTML]="finalEventMessage"></div>
{{ finalEventMessage }}
</div>
</div> </div>
<div class="date"> <div class="date">