Skip to content

Commit 6df51e9

Browse files
committed
feat: enhance task management with subscription updates and error handling
- Added subscription update handling in TaskManager to refresh tasks on subscription changes. - Implemented due date validation to prevent past dates in task creation and editing. - Introduced a modal for upgrading subscription plans with a notice for refreshing after upgrade. - Enhanced UI with custom scrollbar styles for better user experience. - Created AgoraDebugOverlay and ChatPanel components for improved communication features. - Developed EmailCompose component for composing and sending emails with attachment support. - Implemented PricingPage with dynamic pricing plans fetched from the API and detailed comparison table.
1 parent 383b17a commit 6df51e9

24 files changed

Lines changed: 1433 additions & 209 deletions

File tree

‎.gitignore‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,12 @@ build/
4747
logs/
4848
*.log
4949

50-
51-
# Environment variables and sensitive config
50+
# Environment variables
51+
# .env
5252
*.env
5353
*.local
54-
**/.env
55-
**/application.properties
56-
**/application.yml
57-
58-
!application-local.properties
54+
!application.properties
55+
application-local.properties
5956

6057
# OS files
6158
.DS_Store
@@ -94,3 +91,4 @@ scripts/*.pyc
9491
# Zego token service
9592
zego-token-service/node_modules/
9693
zego-token-service/.env
94+
src/main/resources/application.yml

‎src/main/java/com/syncora/communication/chat/repository/ChatFileRepository.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.syncora.communication.chat.entity.ChatFile;
44
import org.springframework.data.jpa.repository.JpaRepository;
5+
import org.springframework.lang.NonNull;
56
import org.springframework.stereotype.Repository;
67

78
import java.util.List;
@@ -14,5 +15,6 @@ public interface ChatFileRepository extends JpaRepository<ChatFile, String> {
1415

1516
List<ChatFile> findByUploadedBy(String uploadedBy);
1617

17-
Optional<ChatFile> findById(String id);
18+
@NonNull
19+
Optional<ChatFile> findById(@NonNull String id);
1820
}

‎syncora_frontend/.env.example‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
VITE_API_URL=http://localhost:8081/api
2+
3+
VITE_ZEGO_APP_ID=your_app_id_here
4+
VITE_ZEGO_SERVER_SECRET=your_server_secret_here
5+
VITE_ZEGO_WS_URL=wss://your-websocket-url-here

‎syncora_frontend/src/components/common/Navbar.tsx‎

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,63 @@
1-
import { Bell, Search } from 'lucide-react';
1+
import { Bell, Search, LogOut } from 'lucide-react';
2+
import { useAuth } from '@/contexts/AuthContext';
3+
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
24
import { Button } from '@/components/ui/button';
35
import { Input } from '@/components/ui/input';
4-
import { Badge } from '@/components/ui/badge';
6+
import { SidebarTrigger } from '@/components/ui/sidebar';
57

68
export const Navbar = () => {
9+
const { user, logout } = useAuth();
10+
711
return (
8-
<header className="flex-1 flex items-center justify-between gap-4">
9-
{/* Search */}
10-
<div className="flex-1 max-w-md">
11-
<div className="relative group">
12-
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
13-
<input
14-
type="search"
15-
placeholder="Search anything..."
16-
className="w-full h-10 pl-10 pr-4 rounded-lg glass-card border border-border/50 focus:border-primary focus:shadow-glow transition-all outline-none text-sm hover:border-primary/50"
17-
/>
12+
<header className="sticky top-0 w-full flex items-center justify-between gap-4 px-4 py-2 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 z-50">
13+
{/* Left: Sidebar trigger */}
14+
<div className="flex items-center gap-3">
15+
<SidebarTrigger />
16+
<div className="hidden md:flex items-center gap-2 max-w-sm flex-1">
17+
<div className="relative w-full">
18+
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground" />
19+
<Input
20+
type="search"
21+
placeholder="Search..."
22+
className="pl-9 pr-4 h-9 bg-muted/50 border-muted-foreground/20 focus-visible:ring-primary"
23+
/>
24+
</div>
1825
</div>
1926
</div>
2027

21-
{/* Actions */}
22-
<div className="flex items-center gap-2">
23-
<Button variant="ghost" size="icon" className="relative hover-scale h-10 w-10 rounded-lg">
24-
<Bell className="h-5 w-5" />
25-
<span className="absolute top-2 right-2 h-2 w-2 bg-destructive rounded-full animate-pulse shadow-glow" />
28+
{/* Right: Notifications & User Profile */}
29+
<div className="flex items-center gap-3">
30+
{/* Notifications */}
31+
<Button
32+
variant="ghost"
33+
size="icon"
34+
className="relative h-9 w-9 text-muted-foreground hover:text-foreground"
35+
>
36+
<Bell className="w-4 h-4" />
37+
<span className="absolute top-1.5 right-1.5 w-2 h-2 bg-destructive rounded-full animate-pulse" />
2638
</Button>
39+
40+
{/* User Profile */}
41+
<div className="flex items-center gap-2 px-2 py-1.5 rounded-lg border bg-card hover:bg-accent/10 transition-colors cursor-pointer group">
42+
<Avatar className="w-8 h-8 border-2 border-primary/30 group-hover:border-primary transition-all">
43+
<AvatarImage src={user?.avatar} alt={user?.name} />
44+
<AvatarFallback className="bg-gradient-primary text-white text-xs">
45+
{user?.name?.charAt(0) || 'U'}
46+
</AvatarFallback>
47+
</Avatar>
48+
<div className="hidden md:flex flex-col min-w-0">
49+
<p className="text-xs font-medium text-foreground truncate">{user?.name || 'Guest User'}</p>
50+
<p className="text-[10px] text-muted-foreground truncate">{user?.email || 'guest@syncora.com'}</p>
51+
</div>
52+
<Button
53+
variant="ghost"
54+
size="icon"
55+
onClick={logout}
56+
className="h-6 w-6 text-muted-foreground hover:text-destructive hover:rotate-12 transition-all"
57+
>
58+
<LogOut className="w-3 h-3" />
59+
</Button>
60+
</div>
2761
</div>
2862
</header>
2963
);

0 commit comments

Comments
 (0)