Skip to content

Commit f819a50

Browse files
committed
feat: mobile-responsive UI and fix VisualOrganizer reorder
- WorkspaceTopBar: hide page nav/zoom on mobile, compact download button - WorkspaceToolPanel: renders as a bottom sheet on mobile (<768px) - VisualOrganizer: add touch drag-and-drop for mobile reordering, fix Ctrl+A keyboard shortcut (case-insensitive), show rotate/delete buttons always on mobile, add visual drop-target indicator - WorkspacePage: default thumbnails hidden and scale=0.7 on mobile - DashboardHeader: hide email and admin link on small screens - Dashboard/MyFiles: responsive padding (px-4 sm:px-8) https://claude.ai/code/session_011m4Yrde3Ly93yU5NSy98iu
1 parent b3031c4 commit f819a50

7 files changed

Lines changed: 428 additions & 267 deletions

File tree

frontend/src/components/dashboard/Dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ export default function Dashboard() {
6262
: toolCategories
6363

6464
return (
65-
<div className="max-w-6xl mx-auto px-8 py-8 w-full">
65+
<div className="max-w-6xl mx-auto px-4 sm:px-8 py-4 sm:py-8 w-full">
6666

6767
{/* ── Hero upload zone ── */}
6868
<div
6969
onDragOver={(e) => { e.preventDefault(); setDragging(true) }}
7070
onDragLeave={() => setDragging(false)}
7171
onDrop={(e) => { e.preventDefault(); setDragging(false); uploadAndOpen(e.dataTransfer.files) }}
7272
onClick={() => { setPendingTool(null); inputRef.current?.click() }}
73-
className="mb-8 flex flex-col items-center justify-center gap-3 rounded-xl p-10 cursor-pointer transition-all"
73+
className="mb-8 flex flex-col items-center justify-center gap-3 rounded-xl p-6 sm:p-10 cursor-pointer transition-all"
7474
style={{
7575
border: `2px dashed ${dragging ? 'var(--color-accent)' : 'var(--color-border)'}`,
7676
background: dragging ? 'var(--color-accent-muted)' : 'var(--color-surface)',

frontend/src/components/dashboard/MyFiles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default function MyFiles() {
129129
: files
130130

131131
return (
132-
<div className="max-w-5xl mx-auto px-8 py-8 w-full space-y-6">
132+
<div className="max-w-5xl mx-auto px-4 sm:px-8 py-4 sm:py-8 w-full space-y-6">
133133

134134
{/* Header */}
135135
<div className="flex items-center justify-between gap-4">

frontend/src/components/layout/DashboardHeader.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export default function DashboardHeader() {
2626

2727
return (
2828
<header
29-
className="shrink-0 flex items-center px-5 border-b select-none"
29+
className="shrink-0 flex items-center px-4 sm:px-5 border-b select-none"
3030
style={{
3131
height: 56,
3232
background: 'var(--color-surface)',
3333
borderColor: 'var(--color-border)',
3434
}}
3535
>
3636
{/* ── Logo ── */}
37-
<NavLink to="/dashboard" className="flex items-center gap-2.5 mr-8">
37+
<NavLink to="/dashboard" className="flex items-center gap-2 sm:gap-2.5 mr-4 sm:mr-8 shrink-0">
3838
<div
3939
className="w-7 h-7 rounded-lg flex items-center justify-center shrink-0"
4040
style={{ background: 'var(--color-accent)', opacity: 0.9 }}
@@ -56,7 +56,7 @@ export default function DashboardHeader() {
5656
key={to}
5757
to={to}
5858
end={to === '/dashboard'}
59-
className="relative h-full flex items-center px-3 text-sm font-medium transition-colors"
59+
className="relative h-full flex items-center px-2 sm:px-3 text-xs sm:text-sm font-medium transition-colors"
6060
style={({ isActive }) => ({
6161
color: isActive ? 'var(--color-accent)' : 'var(--color-muted)',
6262
})}
@@ -66,7 +66,7 @@ export default function DashboardHeader() {
6666
{label}
6767
{isActive && (
6868
<span
69-
className="absolute bottom-0 left-3 right-3 h-[2px] rounded-full"
69+
className="absolute bottom-0 left-2 right-2 sm:left-3 sm:right-3 h-[2px] rounded-full"
7070
style={{ background: 'var(--color-accent)' }}
7171
/>
7272
)}
@@ -80,7 +80,7 @@ export default function DashboardHeader() {
8080
<div className="flex-1" />
8181

8282
{/* ── Right controls ── */}
83-
<div className="flex items-center gap-2">
83+
<div className="flex items-center gap-1 sm:gap-2">
8484
{/* Theme toggle */}
8585
<button
8686
onClick={toggleTheme}
@@ -103,7 +103,7 @@ export default function DashboardHeader() {
103103
{isAdmin && (
104104
<NavLink
105105
to="/admin"
106-
className="flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors"
106+
className="hidden sm:flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors"
107107
style={{ color: '#f59e0b' }}
108108
onMouseEnter={(e) => (e.currentTarget.style.background = 'rgba(245,158,11,0.1)')}
109109
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
@@ -114,17 +114,17 @@ export default function DashboardHeader() {
114114
)}
115115

116116
{/* Separator */}
117-
<div className="w-px h-5" style={{ background: 'var(--color-border)' }} />
117+
<div className="hidden sm:block w-px h-5" style={{ background: 'var(--color-border)' }} />
118118

119119
{/* User avatar + email */}
120-
<div className="flex items-center gap-2">
120+
<div className="flex items-center gap-1.5 sm:gap-2">
121121
<div
122122
className="w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold"
123123
style={{ background: 'var(--color-accent-muted)', color: 'var(--color-accent)' }}
124124
>
125125
{initial}
126126
</div>
127-
<span className="text-xs max-w-[140px] truncate" style={{ color: 'var(--color-muted)' }}>
127+
<span className="hidden sm:inline text-xs max-w-[120px] truncate" style={{ color: 'var(--color-muted)' }}>
128128
{userEmail}
129129
</span>
130130
</div>

0 commit comments

Comments
 (0)