chore: refine media path configuration in environment files
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Failing after 1m43s
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Failing after 1m43s
- Updated .env.example to clarify SHINKAN_MEDIA_HOST usage for different environments. - Modified docker-compose files to set default values for SHINKAN_MEDIA_HOST, ensuring consistent media path handling in development and production. - Enhanced comments for better understanding of media path configurations.
This commit is contained in:
1 parent
c921f0dd8f
commit
5b13a0a526
5 files changed
+80
-6
No files matched your search
@@ -0,0 +1,71 @@
|
||||
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,10 +1,13 @@
|
||||
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>
|
||||
<App />
|
||||
<ErrorBoundary>
|
||||
<App />
|
||||
</ErrorBoundary>
|
||||
</React.StrictMode>,
|
||||
)
|
||||
Reference in new issue
Block a user