From b7cb785ab50e4aea0399be6133deaf46a44b63e7 Mon Sep 17 00:00:00 2001 From: cussle Date: Fri, 15 Nov 2024 12:59:37 +0900 Subject: [PATCH 1/3] feat: Set initial lastMessageTime to prioritize new chat rooms --- .../java/com/devcard/devcard/auth/config/SecurityConfig.java | 3 ++- src/main/java/com/devcard/devcard/chat/model/ChatRoom.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/devcard/devcard/auth/config/SecurityConfig.java b/src/main/java/com/devcard/devcard/auth/config/SecurityConfig.java index b8e6ee3..c8be8f5 100644 --- a/src/main/java/com/devcard/devcard/auth/config/SecurityConfig.java +++ b/src/main/java/com/devcard/devcard/auth/config/SecurityConfig.java @@ -38,7 +38,8 @@ SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { "/notice", "/notice/**", "/qna", - "/qna/**" + "/qna/**", + "/api/**" // 테스트용 임시 ).permitAll(); // 그 외의 모든 요청은 인증 필요 auth.anyRequest().authenticated(); diff --git a/src/main/java/com/devcard/devcard/chat/model/ChatRoom.java b/src/main/java/com/devcard/devcard/chat/model/ChatRoom.java index d215518..8a6faec 100644 --- a/src/main/java/com/devcard/devcard/chat/model/ChatRoom.java +++ b/src/main/java/com/devcard/devcard/chat/model/ChatRoom.java @@ -22,12 +22,13 @@ public class ChatRoom { @JoinTable(name = "chat_room_participants") private List participants; private LocalDateTime createdAt; - private String lastMessage = "메세지를 보내보세요."; // 기본값 설정 + private String lastMessage = "메세지를 보내보세요."; // 기본값 설정 private LocalDateTime lastMessageTime; public ChatRoom(List participants, LocalDateTime createdAt) { this.participants = participants; this.createdAt = createdAt; + this.lastMessageTime = createdAt; // 초기 시간 설정 } protected ChatRoom() { From 1fdfe4a1d2044d308b134b4f0c039e217c2578ca Mon Sep 17 00:00:00 2001 From: cussle Date: Fri, 15 Nov 2024 13:15:27 +0900 Subject: [PATCH 2/3] fix: Replace vh/vw with dvh/dvw for improved viewport handling --- src/main/resources/static/css/card/card-detail.css | 4 ++-- src/main/resources/static/css/chat/room.css | 2 +- src/main/resources/static/css/global.css | 2 +- src/main/resources/static/css/oauth/login.css | 2 +- src/main/resources/templates/redirect.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/static/css/card/card-detail.css b/src/main/resources/static/css/card/card-detail.css index 415cd35..b7fc4e2 100644 --- a/src/main/resources/static/css/card/card-detail.css +++ b/src/main/resources/static/css/card/card-detail.css @@ -81,8 +81,8 @@ position: fixed; top: 0; left: 0; - width: 100vw; - height: 100vh; + width: 100dvw; + height: 100dvh; background-color: rgba(0, 0, 0, 0.3); z-index: 1000; /* 배경이 페이지 전체를 덮도록 설정 */ display: none; /* 기본적으로 숨김 */ diff --git a/src/main/resources/static/css/chat/room.css b/src/main/resources/static/css/chat/room.css index 68c9aa5..baa8884 100644 --- a/src/main/resources/static/css/chat/room.css +++ b/src/main/resources/static/css/chat/room.css @@ -1,5 +1,5 @@ .container { - height: 100vh; + height: 100dvh; overflow: hidden; display: flex; flex-direction: column; diff --git a/src/main/resources/static/css/global.css b/src/main/resources/static/css/global.css index df7b829..7ff7567 100644 --- a/src/main/resources/static/css/global.css +++ b/src/main/resources/static/css/global.css @@ -27,7 +27,7 @@ body { display: flex; flex-direction: column; justify-content: space-between; - height: 100vh; + height: 100dvh; background-color: var(--background); } diff --git a/src/main/resources/static/css/oauth/login.css b/src/main/resources/static/css/oauth/login.css index 0873953..9851b59 100644 --- a/src/main/resources/static/css/oauth/login.css +++ b/src/main/resources/static/css/oauth/login.css @@ -34,7 +34,7 @@ body { display: flex; justify-content: center; align-items: center; - height: 100vh; + height: 100dvh; background-color: var(--background); } diff --git a/src/main/resources/templates/redirect.html b/src/main/resources/templates/redirect.html index 6994abe..0d51267 100644 --- a/src/main/resources/templates/redirect.html +++ b/src/main/resources/templates/redirect.html @@ -15,7 +15,7 @@ display: flex; justify-content: center; align-items: center; - height: 100vh; + height: 100dvh; background-color: #f5f5f5; } From da4c06bb6576a623bdfc9192c19ea7f9c6d47e96 Mon Sep 17 00:00:00 2001 From: cussle Date: Fri, 15 Nov 2024 13:32:39 +0900 Subject: [PATCH 3/3] feat: Fix header and navbar position in card-manage --- .../resources/static/css/card/card-manage.css | 8 +++++ src/main/resources/templates/card-manage.html | 36 ++++++++++--------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/main/resources/static/css/card/card-manage.css b/src/main/resources/static/css/card/card-manage.css index 3206b35..0f68789 100644 --- a/src/main/resources/static/css/card/card-manage.css +++ b/src/main/resources/static/css/card/card-manage.css @@ -1,3 +1,10 @@ +.container { + height: 100dvh; + overflow: hidden; + display: flex; + flex-direction: column; +} + .header { display: flex; justify-content: center; @@ -34,6 +41,7 @@ /* 명함 리스트 섹션 */ .card-list-section { + overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); diff --git a/src/main/resources/templates/card-manage.html b/src/main/resources/templates/card-manage.html index cc89007..09cd3ec 100644 --- a/src/main/resources/templates/card-manage.html +++ b/src/main/resources/templates/card-manage.html @@ -19,25 +19,27 @@ - -
- arrow_back_ios -

명함 관리

+
+ +
+ arrow_back_ios +

명함 관리

+
+ + +
+ +
+ + +
+ +
+ + +
- -
- -
- - -
- -
- - -
-