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 <[email protected]>
This commit is contained in:
2025-07-08 22:47:04 +02:00
co-authored by Claude
parent 69b56ed582
commit 12ba91952e
24 changed files with 1210 additions and 128 deletions
@@ -48,6 +48,8 @@ export const EventDetailsPage: React.FC = () => {
welcome_message: '',
color_theme: '',
expires_at: '',
allow_user_uploads: false,
upload_category_id: null as number | null,
});
const [copiedLink, setCopiedLink] = useState(false);
const [showPhotoUpload, setShowPhotoUpload] = useState(false);
@@ -151,6 +153,8 @@ export const EventDetailsPage: React.FC = () => {
welcome_message: event.welcome_message || '',
color_theme: event.color_theme || '',
expires_at: format(parseISO(event.expires_at), 'yyyy-MM-dd'),
allow_user_uploads: event.allow_user_uploads || false,
upload_category_id: event.upload_category_id || null,
});
setIsEditing(true);
};
@@ -160,6 +164,8 @@ export const EventDetailsPage: React.FC = () => {
welcome_message: editForm.welcome_message || undefined,
color_theme: editForm.color_theme || undefined,
expires_at: editForm.expires_at,
allow_user_uploads: editForm.allow_user_uploads,
upload_category_id: editForm.upload_category_id,
});
};
@@ -368,6 +374,47 @@ export const EventDetailsPage: React.FC = () => {
min={format(new Date(), 'yyyy-MM-dd')}
/>
</div>
<div>
<label className="flex items-center">
<input
type="checkbox"
checked={editForm.allow_user_uploads}
onChange={(e) => setEditForm(prev => ({ ...prev, allow_user_uploads: e.target.checked }))}
className="w-4 h-4 text-primary-600 border-neutral-300 rounded focus:ring-primary-500"
/>
<span className="ml-2 text-sm text-neutral-700">{t('events.allowUserUploads')}</span>
</label>
<p className="text-xs text-neutral-500 mt-1 ml-6">
{t('events.allowUserUploadsHelp')}
</p>
</div>
{editForm.allow_user_uploads && (
<div>
<label className="block text-sm font-medium text-neutral-700 mb-1">
{t('events.uploadCategory')}
</label>
<select
value={editForm.upload_category_id || ''}
onChange={(e) => setEditForm(prev => ({
...prev,
upload_category_id: e.target.value ? parseInt(e.target.value) : null
}))}
className="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"
>
<option value="">{t('events.selectCategory')}</option>
{categories?.map(category => (
<option key={category.id} value={category.id}>
{category.name}
</option>
))}
</select>
<p className="text-xs text-neutral-500 mt-1">
{t('events.uploadCategoryHelp')}
</p>
</div>
)}
</div>
) : (
<dl className="space-y-4">
@@ -410,6 +457,28 @@ export const EventDetailsPage: React.FC = () => {
</dd>
</div>
</div>
<div>
<dt className="text-sm font-medium text-neutral-500">{t('events.userUploads')}</dt>
<dd className="mt-1 text-sm text-neutral-900">
{event.allow_user_uploads ? (
<div className="space-y-1">
<span className="inline-flex items-center px-2 py-1 text-xs font-medium text-green-700 bg-green-100 rounded">
{t('common.yes')}
</span>
{event.upload_category_id && (
<p className="text-xs text-neutral-600">
{t('events.uploadCategory')}: {categories.find(c => c.id === event.upload_category_id)?.name || 'N/A'}
</p>
)}
</div>
) : (
<span className="inline-flex items-center px-2 py-1 text-xs font-medium text-neutral-700 bg-neutral-100 rounded">
{t('common.no')}
</span>
)}
</dd>
</div>
</dl>
)}
</Card>