From 33820da590928ff638ef345a5000e05eb1f5bd40 Mon Sep 17 00:00:00 2001 From: nayonnii Date: Thu, 14 Sep 2023 01:56:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20fix:=20=EB=B0=A9=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=20=ED=8C=9D=EC=97=85=20=EA=B8=B0=EC=A1=B4=20=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/chat-room.html | 88 +++++++++++++++++---- 1 file changed, 73 insertions(+), 15 deletions(-) diff --git a/src/main/resources/templates/chat-room.html b/src/main/resources/templates/chat-room.html index 44058e2..872635c 100644 --- a/src/main/resources/templates/chat-room.html +++ b/src/main/resources/templates/chat-room.html @@ -17,6 +17,8 @@ 방정보 아이콘 + +
-
+
- -
-
-
+ + + +
@@ -784,6 +786,7 @@ } } + // // $.get(`/v1/chatrooms/${roomId}/${nickname}`, // function (result) { @@ -816,10 +819,62 @@ // // }); + // 방 정보 모달 열기 function openRoomDetail() { - $('#roomDetailModal').modal('show'); // 모달 열기 + $('#roomDetailModal').modal('show'); + + $.get(`/v1/chatroom/${roomId}`, + function (response) { + + const rawRoomInfo = response.data + $('#room-name').attr('value', rawRoomInfo.title) + $('#room-capacity').attr('value', rawRoomInfo.capacity) + $('#room-password').attr('value', rawRoomInfo.password) + if (rawRoomInfo.close === true) { + $("#room-close").attr('style', "font-weight: bold; border: 2px solid #495057;") + } else { + $("#room-open").attr('style', "font-weight: bold; border: 2px solid #495057;") + } + }) + } + + + /* 방 정보 모달 닫기 */ + function roomInfoClose() { + $('#roomDetailModal').modal('hide'); + event.preventDefault(); + } + + /* 방 정보 모달 > 비밀방 클릭 시 */ + function roomCloseBtnPressed() { + $("#room-close").attr('style', "font-weight: bold; border: 2px solid #495057;") + $("#room-open").attr('style', "font-weight: normal;") + $("#room-password").attr('disabled', false) + + } + + /* 방 정보 모달 > 공개방 클릭 시 */ + function roomOpenBtnPressed() { + $("#room-close").attr('style', "font-weight: normal;") + $("#room-open").attr('style', "font-weight: bold; border: 2px solid #495057;") + $("#room-password").attr('disabled', true) } + + // 채팅방 타이틀 가져오기 + $.get(`/v1/chatroom/${roomId}`, + function (result) { + // 채팅방 타이틀 + $("#chatroomTitle").text(result.data.title); + + // // +채팅방 정보 로그 + // console.log("title" + result.data.title) + // console.log("capacity" + result.data.capacity) + // console.log("roomPassword" + result.data.password) + // console.log("isClose" + result.data.close) // boolean + }); + + // 나가기 버튼 function leave() { const leave = document.getElementById('leave-btn'); @@ -842,6 +897,8 @@ $('#gameRuleDetailModal').modal('hide'); } + + /* 내 직업 설명 모달 열기 */ function myRoleOpen() { $('#myRoleDetailModal').modal('show'); @@ -872,6 +929,7 @@ $('#myRoleDetailModal').modal('hide'); } + From 1a9c9bd40f40c7fd25535facb4105e56c164c044 Mon Sep 17 00:00:00 2001 From: nayonnii Date: Thu, 14 Sep 2023 02:16:04 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:bug:=20fix:=20=EB=B0=A9=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=20=ED=8C=9D=EC=97=85=20=EA=B3=B5=EC=9C=A0=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=20ui=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/css/basic.css | 29 +++++++++++++++++++++ src/main/resources/templates/chat-room.html | 22 +++++++--------- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/src/main/resources/static/css/basic.css b/src/main/resources/static/css/basic.css index 478a238..98913dc 100644 --- a/src/main/resources/static/css/basic.css +++ b/src/main/resources/static/css/basic.css @@ -724,3 +724,32 @@ body { top: -2px; } +.hr-sect { + display: flex; + flex-basis: 100%; + align-items: center; + color: rgba(0, 0, 0, 0.65); + font-size: 16px; + margin: 36px 0px 8px 0px; +} + +.hr-sect::before, +.hr-sect::after { + content: ""; + flex-grow: 1; + background: rgba(0, 0, 0, 0.35); + height: 1px; + font-size: 0px; + line-height: 0px; + margin: 0px 16px; +} + +.sns-btn { + border: #ced4da solid 1px; + background-color: #ffffff; + color: #666666; + font-size: 14px; + border-radius: 30px; + width: 84px; +} + diff --git a/src/main/resources/templates/chat-room.html b/src/main/resources/templates/chat-room.html index 872635c..e0b04a1 100644 --- a/src/main/resources/templates/chat-room.html +++ b/src/main/resources/templates/chat-room.html @@ -61,22 +61,20 @@ -
-
- +
+
+ +
-
- -
+