Skip to content

Commit 1130d9e

Browse files
authored
Merge pull request #36 from 8JP8/fix-friend-requests-badge-position-2067340501194718294
Fix: Friend Requests Badge, VoIP Logout, and Settings Menu Styling
2 parents 99ce01e + d59b2f1 commit 1130d9e

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

frontend/components/UI/FriendRequestsButton.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const FriendRequestsButton: React.FC<FriendRequestsButtonProps> = () => {
4646
<>
4747
<button
4848
onClick={() => setShowModal(true)}
49-
className="p-2 rounded-lg hover:theme-bg-tertiary transition-colors"
49+
className="relative p-2 rounded-lg hover:theme-bg-tertiary transition-colors"
5050
aria-label={t('privateMessages.friendRequests') || 'Friend Requests'}
5151
title={t('privateMessages.friendRequests') || 'Friend Requests'}
5252
>
@@ -73,4 +73,3 @@ const FriendRequestsButton: React.FC<FriendRequestsButtonProps> = () => {
7373
};
7474

7575
export default FriendRequestsButton;
76-

frontend/components/UI/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const UserMenu: React.FC<UserMenuProps> = ({ placement = 'bottom' }) => {
6464
<Link
6565
href="/settings"
6666
id="user-menu-item-settings"
67-
className="w-full flex items-center space-x-3 px-4 py-2 text-sm theme-text-primary hover:theme-bg-tertiary transition-colors"
67+
className="w-full flex items-center space-x-3 px-4 py-2 text-sm theme-text-primary hover:theme-bg-tertiary hover:no-underline hover:theme-text-primary transition-colors"
6868
onClick={() => setIsOpen(false)}
6969
>
7070
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">

frontend/contexts/VoipContext.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,14 @@ export const VoipProvider: React.FC<VoipProviderProps> = ({ children }) => {
927927
}
928928
}, [socket, connected, user, activeCall]);
929929

930+
// Handle user logout - ensure call is cleaned up
931+
useEffect(() => {
932+
if (!user && activeCall) {
933+
console.log('[VOIP] User logged out, cleaning up call');
934+
leaveCall();
935+
}
936+
}, [user, activeCall, leaveCall]);
937+
930938
// Handle socket disconnect - mark self as disconnected
931939
useEffect(() => {
932940
if (!socket) return;

0 commit comments

Comments
 (0)