diff --git a/src/app/core/chat/discussion.service.ts b/src/app/core/chat/discussion.service.ts index 8dcf16a..d2c4f85 100644 --- a/src/app/core/chat/discussion.service.ts +++ b/src/app/core/chat/discussion.service.ts @@ -28,4 +28,8 @@ export class discussionsService { createPrivateDiscussion(username: string): Observable { return this.http.post(`${this.apiUrl}/discussions/private`, { username }); } + + createGroupDiscussion(groupName: string, usernames: string[]): Observable { + return this.http.post(`${this.apiUrl}/discussions/group`, { groupName, usernames }); + } } \ No newline at end of file diff --git a/src/app/pages/menu/menu-nav/menu-nav.component.css b/src/app/pages/menu/menu-nav/menu-nav.component.css index c24a21a..7a4309c 100644 --- a/src/app/pages/menu/menu-nav/menu-nav.component.css +++ b/src/app/pages/menu/menu-nav/menu-nav.component.css @@ -107,4 +107,159 @@ transform: scale(0.97); box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1); } +} + +.mode-switch { + margin-top: auto; + + display: flex; + align-items: center; + justify-content: space-between; + + padding: 14px 16px; + + background: rgba(255, 255, 255, 0.2); + border-radius: 16px; + + backdrop-filter: blur(8px); + box-shadow: 0 2px 12px rgba(122, 46, 46, 0.08); +} + +.switch-label { + color: #7a2e2e; + font-weight: 600; + font-size: 0.95rem; +} + +/* SWITCH */ + +.switch { + position: relative; + width: 58px; + height: 32px; +} + +.switch input { + display: none; +} + +.slider { + position: absolute; + inset: 0; + + cursor: pointer; + + background: rgba(255, 255, 255, 0.6); + border-radius: 999px; + + transition: all 0.25s ease; + + box-shadow: + inset 0 1px 3px rgba(0,0,0,0.08), + 0 2px 8px rgba(0,0,0,0.05); +} + +.slider::before { + content: ""; + + position: absolute; + top: 4px; + left: 4px; + + width: 24px; + height: 24px; + + border-radius: 50%; + background: white; + + transition: all 0.25s ease; + + box-shadow: + 0 2px 8px rgba(0,0,0,0.15); +} + +.switch input:checked + .slider { + background: #bd5a5a; +} + +.switch input:checked + .slider::before { + transform: translateX(26px); +} + +.mode-switch:hover .slider { + transform: scale(1.03); +} + +.add-member-btn { + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + + width: 100%; + + padding: 12px 16px; + + border: 2px dashed rgba(189, 90, 90, 0.35); + border-radius: 14px; + + background: rgba(255, 255, 255, 0.55); + + color: #bd5a5a; + font-size: 0.95rem; + font-weight: 600; + + cursor: pointer; + + transition: all 0.2s ease; + + ion-icon { + font-size: 1.2rem; + } + + &:hover { + background: rgba(255, 255, 255, 0.8); + border-color: #bd5a5a; + transform: translateY(-1px); + } + + &:active { + transform: scale(0.98); + } +} + +.remove-btn { + width: 26px; + height: 26px; + + flex-shrink: 0; + + display: flex; + align-items: center; + justify-content: center; + + border: none; + border-radius: 50%; + + background: white; + color: #bd5a5a; + + cursor: pointer; + + box-shadow: 0 2px 8px rgba(180, 80, 80, 0.12); + + transition: all 0.2s ease; + + ion-icon { + font-size: 1.1rem; + } + + &:hover { + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(180, 80, 80, 0.18); + } + + &:active { + transform: scale(0.92); + } } \ No newline at end of file diff --git a/src/app/pages/menu/menu-nav/menu-nav.component.html b/src/app/pages/menu/menu-nav/menu-nav.component.html index cda9904..d46da27 100644 --- a/src/app/pages/menu/menu-nav/menu-nav.component.html +++ b/src/app/pages/menu/menu-nav/menu-nav.component.html @@ -11,30 +11,91 @@