revert: Dev/Compose/Frontend auf Stand ceef6f0 (07.05.2026 22:02)
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Successful in 23s

Alle Änderungen nach dem letzten verifizierten Deploy (ceef6f0) für
docker-compose.dev-env.yml, docker-compose.yml, .env.example sowie
main.jsx, MediaLibraryPage, ExerciseFormPage zurückgesetzt;
ErrorBoundary entfernt. Entspricht dem funktionierenden develop-Stand
von Gitea an diesem Zeitpunkt.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-05-08 09:18:07 +02:00
1 parent d758de3852
commit f8a7247ccc
7 files changed
+24 -109

No files matched your search

-71
View File
@@ -1,71 +0,0 @@
import React from 'react'
/**
* Fängt Render-Fehler ab — verhindert „weißen Bildschirm“ ohne Hinweis (z. B. nach Deploy/Chaches).
*/
export default class ErrorBoundary extends React.Component {
constructor(props) {
super(props)
this.state = { error: null }
}
static getDerivedStateFromError(error) {
return { error }
}
componentDidCatch(error, info) {
console.error('ErrorBoundary:', error, info?.componentStack)
}
render() {
if (this.state.error) {
const msg = this.state.error?.message || String(this.state.error)
return (
<div
style={{
minHeight: '100vh',
padding: '24px',
fontFamily: 'system-ui, sans-serif',
background: '#f8fafc',
color: '#0f172a',
}}
>
<h1 style={{ fontSize: '1.25rem', marginBottom: '12px' }}>Ein Fehler ist aufgetreten</h1>
<p style={{ marginBottom: '16px', maxWidth: '40rem', lineHeight: 1.5 }}>
Die Oberfläche konnte nicht geladen werden. Details siehe unten oder in der
Browser-Konsole (F12). Nach einem Deploy einen <strong>harten Reload</strong> (Cache leeren)
versuchen.
</p>
<pre
style={{
padding: '12px',
background: '#fff',
border: '1px solid #e2e8f0',
borderRadius: 8,
overflow: 'auto',
fontSize: '0.85rem',
}}
>
{msg}
</pre>
<p style={{ marginTop: '20px' }}>
<button
type="button"
style={{
padding: '10px 16px',
borderRadius: 8,
border: '1px solid #cbd5e1',
background: '#fff',
cursor: 'pointer',
}}
onClick={() => window.location.reload()}
>
Seite neu laden
</button>
</p>
</div>
)
}
return this.props.children
}
}
+1 -4
View File
@@ -1,13 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import ErrorBoundary from './ErrorBoundary.jsx'
import './app.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<ErrorBoundary>
<App />
</ErrorBoundary>
<App />
</React.StrictMode>,
)
+1 -5
View File
@@ -6,10 +6,6 @@ import RichTextEditor from '../components/RichTextEditor'
import ExerciseProgressionGraphPanel from '../components/ExerciseProgressionGraphPanel'
import { SKILL_LEVEL_OPTIONS, normalizeSkillLevelSlug } from '../constants/skillLevels'
/** Kein image/*/video/* — WebKit (iOS) ist damit oft kaputt. */
const EXERCISE_MEDIA_UPLOAD_ACCEPT =
'image/jpeg,image/png,image/gif,image/heic,image/heif,video/mp4,video/quicktime,application/pdf,.jpg,.jpeg,.png,.gif,.heic,.heif,.mp4,.mov,.pdf'
/** Kachelvorschau: Video nutzt ersten Frame (metadata), Bild = img. */
function ExerciseMediaThumbTile({ exerciseId, media, onOpenPreview }) {
const src = !media.embed_url ? resolveExerciseMediaFileUrl(exerciseId, media) : null
@@ -1464,7 +1460,7 @@ function ExerciseFormPage() {
<label className="form-label">Datei</label>
<input
type="file"
accept={EXERCISE_MEDIA_UPLOAD_ACCEPT}
accept="image/*,video/*,application/pdf"
onChange={(e) => setMediaFile(e.target.files?.[0] || null)}
/>
<div className="form-row" style={{ marginTop: '8px' }}>
+7 -13
View File
@@ -13,8 +13,8 @@ import {
CircleDot,
FilePenLine,
Copyright,
Image as LucideImage,
Video as LucideVideo,
Image,
Video,
FileText,
File,
Upload,
@@ -45,10 +45,6 @@ const MEDIA_KIND_OPTIONS = [
{ value: 'other', label: 'Sonstiges' },
]
/** Kein image/*/video/* — WebKit (iOS Safari) ist damit oft kaputt; alles explizit. */
const MEDIA_UPLOAD_ACCEPT =
'image/jpeg,image/png,image/gif,image/heic,image/heif,video/mp4,video/quicktime,application/pdf,.jpg,.jpeg,.png,.gif,.heic,.heif,.mp4,.mov,.pdf'
const LC_STATUS_LABELS = {
active: 'Aktiv',
trash_soft: 'Papierkorb (1)',
@@ -219,8 +215,8 @@ function MediaTypeGlyph({ mimeType, compact }) {
const kind = previewDisplayKind(mimeType)
const label = MEDIA_KIND_LABELS[kind] || 'Medium'
let Icon = File
if (kind === 'image') Icon = LucideImage
else if (kind === 'video') Icon = LucideVideo
if (kind === 'image') Icon = Image
else if (kind === 'video') Icon = Video
else if (kind === 'pdf') Icon = FileText
const sz = compact ? 12 : 14
return (
@@ -478,13 +474,12 @@ export default function MediaLibraryPage() {
const selCount = selected.size
const onBulkArchiveFiles = async (e) => {
const input = e.target
const fl = input.files
const fl = e.target.files
if (!fl?.length) return
const list = Array.from(fl)
e.target.value = ''
if (uploadVis === 'club' && !Number(uploadClubId)) {
window.alert('Bitte einen Verein für die Sichtbarkeit „Verein“ wählen.')
input.value = ''
return
}
setUploadBusy(true)
@@ -507,7 +502,6 @@ export default function MediaLibraryPage() {
} catch (err) {
window.alert(err.message || String(err))
} finally {
input.value = ''
setUploadBusy(false)
}
}
@@ -630,7 +624,7 @@ export default function MediaLibraryPage() {
ref={bulkFileInputRef}
type="file"
className="media-library__sr-file"
accept={MEDIA_UPLOAD_ACCEPT}
accept="image/*,video/*,application/pdf"
multiple
onChange={onBulkArchiveFiles}
/>