Merge pull request #121 from the-luap/feat/optional-event-date-expiration-beta

fix: mobile upload button visibility in gallery (#113)
This commit is contained in:
Paul Nothaft
2026-01-16 14:35:36 +01:00
committed by GitHub
2 changed files with 20 additions and 6 deletions
@@ -240,11 +240,7 @@ export const GalleryLayout: React.FC<GalleryLayoutProps> = ({
{/* Right side - Action buttons */} {/* Right side - Action buttons */}
<div className="flex items-center gap-2 sm:gap-3 flex-shrink-0"> <div className="flex items-center gap-2 sm:gap-3 flex-shrink-0">
{/* Extra header items (upload button, etc.) */} {/* Extra header items (upload button, etc.) */}
{headerExtra && ( {headerExtra}
<div className="hidden sm:block">
{headerExtra}
</div>
)}
{/* Download all button - hidden on mobile when sidebar is shown */} {/* Download all button - hidden on mobile when sidebar is shown */}
{showDownloadAll && onDownloadAll && ( {showDownloadAll && onDownloadAll && (
@@ -1,5 +1,5 @@
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
import { X, Download, Filter, SortAsc, Search, Calendar, Type, HardDrive, Check, Star } from 'lucide-react'; import { X, Download, Filter, SortAsc, Search, Calendar, Type, HardDrive, Check, Star, Upload } from 'lucide-react';
import { Button } from '../common'; import { Button } from '../common';
import { PhotoCategory } from '../../types'; import { PhotoCategory } from '../../types';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -139,6 +139,24 @@ export const GallerySidebar: React.FC<GallerySidebarProps> = ({
{/* Content */} {/* Content */}
<div className="gallery-sidebar-content flex-1 overflow-y-auto"> <div className="gallery-sidebar-content flex-1 overflow-y-auto">
{/* Upload Section - Show prominently at top for mobile users */}
{allowUploads && onUploadClick && (
<div className="gallery-sidebar-section gallery-sidebar-upload p-4 border-b border-neutral-200">
<Button
variant="outline"
size="sm"
leftIcon={<Upload className="w-4 h-4" />}
onClick={() => {
onUploadClick();
if (isMobile) onClose();
}}
className="gallery-btn w-full"
>
{t('upload.uploadPhotos')}
</Button>
</div>
)}
{/* Search Section - Hidden for carousel layout */} {/* Search Section - Hidden for carousel layout */}
{galleryLayout !== 'carousel' && ( {galleryLayout !== 'carousel' && (
<div className="gallery-sidebar-section gallery-sidebar-search p-4 border-b border-neutral-200"> <div className="gallery-sidebar-section gallery-sidebar-search p-4 border-b border-neutral-200">