Fix UI issues and add Pins and Templates
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m38s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m38s
This commit is contained in:
parent
a361848216
commit
617f8160b2
10 changed files with 281 additions and 59 deletions
|
|
@ -1578,7 +1578,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
<header
|
||||
className="flex items-center gap-4 px-6 py-3.5 border-b"
|
||||
style={{
|
||||
display: appMode === 'drive' ? 'flex' : 'none',
|
||||
display: editingFile ? 'none' : 'flex',
|
||||
backgroundColor: 'var(--color-bg-secondary)',
|
||||
borderColor: 'var(--color-border-subtle)',
|
||||
}}
|
||||
|
|
@ -1594,24 +1594,30 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
<Menu className="w-5 h-5" />
|
||||
</button>
|
||||
)}
|
||||
{pathSegments.map((seg, i) => (
|
||||
<div key={i} className="flex items-center gap-1">
|
||||
{i > 0 && <ChevronRight className="w-3.5 h-3.5" style={{ color: 'var(--color-text-tertiary)' }} />}
|
||||
<button
|
||||
onClick={() => navigateTo(pathSegments.slice(0, i + 1).join('/'))}
|
||||
className={`text-sm font-medium hover:opacity-80 transition-opacity truncate ${isMobile ? 'max-w-[60px]' : 'max-w-[150px]'}`}
|
||||
style={{
|
||||
color: i === pathSegments.length - 1 ? 'var(--color-text-primary)' : 'var(--color-text-secondary)',
|
||||
}}
|
||||
>
|
||||
{seg}
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
{appMode === 'drive' ? (
|
||||
pathSegments.map((seg, i) => (
|
||||
<div key={i} className="flex items-center gap-1">
|
||||
{i > 0 && <ChevronRight className="w-3.5 h-3.5" style={{ color: 'var(--color-text-tertiary)' }} />}
|
||||
<button
|
||||
onClick={() => navigateTo(pathSegments.slice(0, i + 1).join('/'))}
|
||||
className={`text-sm font-medium hover:opacity-80 transition-opacity truncate ${isMobile ? 'max-w-[60px]' : 'max-w-[150px]'}`}
|
||||
style={{
|
||||
color: i === pathSegments.length - 1 ? 'var(--color-text-primary)' : 'var(--color-text-secondary)',
|
||||
}}
|
||||
>
|
||||
{seg}
|
||||
</button>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<span className="text-lg font-semibold" style={{ color: 'var(--color-text-primary)' }}>
|
||||
{appMode === 'docs' ? 'Documents' : 'Presentations'}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeSection !== 'settings' && (
|
||||
{activeSection !== 'settings' && appMode === 'drive' && (
|
||||
<div className={`relative transition-all ${isMobile && mobileSearchOpen ? 'flex-1' : isMobile ? 'w-auto' : 'w-72'}`}>
|
||||
{!isMobile || mobileSearchOpen ? (
|
||||
<>
|
||||
|
|
@ -1799,31 +1805,35 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
|
||||
<div className="w-px h-5 mx-1" style={{ backgroundColor: 'var(--color-border-subtle)' }} />
|
||||
|
||||
<div className="relative group">
|
||||
<button className="flex items-center gap-1.5 p-2 rounded-lg transition-colors text-sm font-medium" style={{ color: 'var(--color-text-secondary)' }} title="Sort">
|
||||
Sort by: <span className="capitalize">{sortBy}</span>
|
||||
{sortAsc ? <ArrowUp className="w-3 h-3" /> : <ArrowUp className="w-3 h-3 rotate-180 transition-transform" />}
|
||||
</button>
|
||||
<div className="absolute right-0 top-full pt-1 w-40 opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-all z-50">
|
||||
<div className="w-full rounded-xl shadow-lg border overflow-hidden" style={{ backgroundColor: 'var(--color-bg-elevated)', borderColor: 'var(--color-border)' }}>
|
||||
{['name', 'size', 'date', 'type'].map(opt => (
|
||||
<button key={opt} onClick={() => { if (sortBy === opt) setSortAsc(!sortAsc); else setSortBy(opt as any); }} className="w-full text-left px-4 py-2 text-sm transition-colors hover:bg-white/5 capitalize" style={{ color: sortBy === opt ? 'var(--color-accent)' : 'var(--color-text-primary)' }}>
|
||||
{opt}
|
||||
</button>
|
||||
))}
|
||||
{appMode === 'drive' && (
|
||||
<>
|
||||
<div className="relative group">
|
||||
<button className="flex items-center gap-1.5 p-2 rounded-lg transition-colors text-sm font-medium" style={{ color: 'var(--color-text-secondary)' }} title="Sort">
|
||||
Sort by: <span className="capitalize">{sortBy}</span>
|
||||
{sortAsc ? <ArrowUp className="w-3 h-3" /> : <ArrowUp className="w-3 h-3 rotate-180 transition-transform" />}
|
||||
</button>
|
||||
<div className="absolute right-0 top-full pt-1 w-40 opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-all z-50">
|
||||
<div className="w-full rounded-xl shadow-lg border overflow-hidden" style={{ backgroundColor: 'var(--color-bg-elevated)', borderColor: 'var(--color-border)' }}>
|
||||
{['name', 'size', 'date', 'type'].map(opt => (
|
||||
<button key={opt} onClick={() => { if (sortBy === opt) setSortAsc(!sortAsc); else setSortBy(opt as any); }} className="w-full text-left px-4 py-2 text-sm transition-colors hover:bg-white/5 capitalize" style={{ color: sortBy === opt ? 'var(--color-accent)' : 'var(--color-text-primary)' }}>
|
||||
{opt}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
id="view-toggle"
|
||||
onClick={() => setViewMode(viewMode === 'grid' ? 'list' : 'grid')}
|
||||
className="p-2 rounded-lg transition-colors"
|
||||
style={{ color: 'var(--color-text-secondary)' }}
|
||||
title={viewMode === 'grid' ? 'Switch to list view' : 'Switch to grid view'}
|
||||
>
|
||||
{viewMode === 'grid' ? <List className="w-4.5 h-4.5" /> : <Grid3X3 className="w-4.5 h-4.5" />}
|
||||
</button>
|
||||
<button
|
||||
id="view-toggle"
|
||||
onClick={() => setViewMode(viewMode === 'grid' ? 'list' : 'grid')}
|
||||
className="p-2 rounded-lg transition-colors"
|
||||
style={{ color: 'var(--color-text-secondary)' }}
|
||||
title={viewMode === 'grid' ? 'Switch to list view' : 'Switch to grid view'}
|
||||
>
|
||||
{viewMode === 'grid' ? <List className="w-4.5 h-4.5" /> : <Grid3X3 className="w-4.5 h-4.5" />}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
||||
{activeSection === 'files' && (
|
||||
<button
|
||||
|
|
|
|||
Reference in a new issue