Skip to content

Commit 5a14f68

Browse files
feat: add Apps section with Screen Recorder and GLB Optimizer
- Implemented AppsSection to display available applications. - Added Screen Recorder and GLB Optimizer components with respective functionalities. - Updated SocialApp to handle navigation between sections and apps. - Enhanced SocialSidebar to include an entry for the Apps section. - Created UI components for file upload and optimization settings in GLBOptimizer. - Developed recording controls and settings for ScreenRecorder.
1 parent b9df06a commit 5a14f68

File tree

9 files changed

+1054
-1
lines changed

9 files changed

+1054
-1
lines changed

src/layouts/AppLayout.tsx

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import React from 'react';
2+
import { Button } from '@/components/ui/button';
3+
import { ArrowLeft, Home } from 'lucide-react';
4+
import { Link } from '@tanstack/react-router';
5+
6+
interface AppLayoutProps {
7+
children: React.ReactNode;
8+
title: string;
9+
description?: string;
10+
icon: React.ElementType;
11+
onBack?: () => void;
12+
backTo?: string;
13+
}
14+
15+
export default function AppLayout({
16+
children,
17+
title,
18+
description,
19+
icon: Icon,
20+
onBack,
21+
backTo = "/"
22+
}: AppLayoutProps) {
23+
return (
24+
<div className="flex h-screen flex-col">
25+
{/* App Header */}
26+
<div className="border-b border-border/30 bg-background">
27+
<div className="px-6 py-4">
28+
<div className="flex items-center gap-4">
29+
{onBack ? (
30+
<Button
31+
variant="ghost"
32+
size="sm"
33+
onClick={onBack}
34+
className="h-8 w-8 p-0"
35+
>
36+
<ArrowLeft className="h-4 w-4" />
37+
</Button>
38+
) : (
39+
<Link to={backTo}>
40+
<Button
41+
variant="ghost"
42+
size="sm"
43+
className="h-8 w-8 p-0"
44+
>
45+
<ArrowLeft className="h-4 w-4" />
46+
</Button>
47+
</Link>
48+
)}
49+
50+
<div className="flex items-center gap-3">
51+
<div className="p-2 rounded-lg bg-primary/10">
52+
<Icon className="h-5 w-5 text-primary" />
53+
</div>
54+
<div>
55+
<h1 className="text-xl font-bold">{title}</h1>
56+
{description && (
57+
<p className="text-sm text-muted-foreground">{description}</p>
58+
)}
59+
</div>
60+
</div>
61+
62+
<div className="ml-auto flex items-center gap-2">
63+
<Link to="/">
64+
<Button variant="outline" size="sm">
65+
<Home className="h-4 w-4 mr-2" />
66+
Home
67+
</Button>
68+
</Link>
69+
</div>
70+
</div>
71+
</div>
72+
</div>
73+
74+
{/* App Content */}
75+
<div className="flex-1 overflow-hidden">
76+
{children}
77+
</div>
78+
</div>
79+
);
80+
}

0 commit comments

Comments
 (0)