feat: Add comprehensive system enhancements

- Add version display above storage consumption in admin sidebar
- Fix storage consumption to stick to bottom of window using flexbox
- Add user upload settings to events (allow uploads, category selection)
- Enhance disk space tab to comprehensive system status view
- Add localized date formatting for German/English language support
- Remove quick actions from dashboard for cleaner interface
- Create user photo upload functionality for galleries
- Add database migration for user upload settings
- Update all TypeScript types and interfaces

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-08 22:47:04 +02:00
parent 69b56ed582
commit 12ba91952e
24 changed files with 1210 additions and 128 deletions
@@ -11,8 +11,10 @@ import { ExpirationBanner } from './ExpirationBanner';
import { CountdownTimer } from './CountdownTimer';
import { GalleryLayout } from './GalleryLayout';
import { PhotoFilterBar } from './PhotoFilterBar';
import { UserPhotoUpload } from './UserPhotoUpload';
import { analyticsService } from '../../services/analytics.service';
import { api } from '../../config/api';
import { Upload } from 'lucide-react';
interface GalleryViewProps {
slug: string;
@@ -24,6 +26,8 @@ interface GalleryViewProps {
welcome_message?: string;
color_theme?: string;
expires_at: string;
allow_user_uploads?: boolean;
upload_category_id?: number | null;
};
}
@@ -35,6 +39,7 @@ export const GalleryView: React.FC<GalleryViewProps> = ({ slug, event }) => {
const [searchTerm, setSearchTerm] = useState('');
const [sortBy, setSortBy] = useState<'date' | 'name' | 'size'>('date');
const [brandingSettings, setBrandingSettings] = useState<any>(null);
const [showUploadModal, setShowUploadModal] = useState(false);
const themeAppliedRef = useRef(false);
// Fetch photos
@@ -221,9 +226,22 @@ export const GalleryView: React.FC<GalleryViewProps> = ({ slug, event }) => {
onDownloadAll={handleDownloadAll}
isDownloading={downloadAllMutation.isPending}
headerExtra={
daysUntilExpiration <= 1 && daysUntilExpiration > 0 ? (
<CountdownTimer expiresAt={event.expires_at} className="mr-4" />
) : null
<>
{daysUntilExpiration <= 1 && daysUntilExpiration > 0 && (
<CountdownTimer expiresAt={event.expires_at} className="mr-4" />
)}
{event.allow_user_uploads && (
<Button
variant="outline"
size="md"
leftIcon={<Upload className="w-4 h-4" />}
onClick={() => setShowUploadModal(true)}
className="mr-2"
>
{t('upload.uploadPhotos')}
</Button>
)}
</>
}
>
{/* Expiration Banner */}
@@ -251,6 +269,20 @@ export const GalleryView: React.FC<GalleryViewProps> = ({ slug, event }) => {
<PhotoGrid photos={filteredPhotos} slug={slug} categoryId={selectedCategoryId} />
</div>
</div>
{/* Upload Modal */}
{showUploadModal && (
<UserPhotoUpload
eventId={event.id}
categoryId={event.upload_category_id}
onUploadComplete={() => {
setShowUploadModal(false);
// Refetch photos after upload
window.location.reload(); // Simple reload for now
}}
onClose={() => setShowUploadModal(false)}
/>
)}
</GalleryLayout>
);
};