feat(P-13): add content reporting functionality with modal and update version to 0.8.88
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 10s
Test Suite / playwright-tests (push) Successful in 56s
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 10s
Test Suite / playwright-tests (push) Successful in 56s
This commit is contained in:
1 parent
60709df615
commit
2f7e1e50ad
5 files changed
+280
-4
No files matched your search
@@ -25,6 +25,7 @@ import api from '../utils/api'
|
||||
import { activeClubMemberships } from '../utils/activeClub'
|
||||
import { resolveMediaAssetFileUrl } from '../utils/exerciseMediaUrl'
|
||||
import RightsDeclarationDialog from '../components/RightsDeclarationDialog'
|
||||
import ReportContentModal from '../components/ReportContentModal'
|
||||
|
||||
const LC_OPTIONS = [
|
||||
{ value: 'active', label: 'Aktiv' },
|
||||
@@ -317,6 +318,7 @@ export default function MediaLibraryPage() {
|
||||
const [bulkApplyVis, setBulkApplyVis] = useState(false)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [preview, setPreview] = useState(null)
|
||||
const [reportTarget, setReportTarget] = useState(null)
|
||||
const [mediaKind, setMediaKind] = useState('all')
|
||||
const [filterClubId, setFilterClubId] = useState('')
|
||||
const [filterUploaderId, setFilterUploaderId] = useState('')
|
||||
@@ -986,6 +988,24 @@ export default function MediaLibraryPage() {
|
||||
</div>
|
||||
) : null}
|
||||
<MediaUsageBlock usage={it.usage} compact />
|
||||
{(it.lifecycle_state || 'active') === 'active' && !it.legal_hold_active && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setReportTarget(it)}
|
||||
style={{
|
||||
background: 'none',
|
||||
border: 'none',
|
||||
padding: '2px 0 0',
|
||||
cursor: 'pointer',
|
||||
fontSize: '0.72rem',
|
||||
color: 'var(--text3)',
|
||||
textDecoration: 'underline',
|
||||
textAlign: 'left',
|
||||
}}
|
||||
>
|
||||
Melden
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -1045,7 +1065,7 @@ export default function MediaLibraryPage() {
|
||||
{viewer?.show_uploader_meta ? (
|
||||
<td className="media-library__td-sub">{uploaderLabel(it, viewer) || '—'}</td>
|
||||
) : null}
|
||||
<td>
|
||||
<td style={{ whiteSpace: 'nowrap' }}>
|
||||
<button
|
||||
type="button"
|
||||
className="media-library__icon-btn"
|
||||
@@ -1054,6 +1074,18 @@ export default function MediaLibraryPage() {
|
||||
>
|
||||
<MoreVertical size={18} />
|
||||
</button>
|
||||
{(it.lifecycle_state || 'active') === 'active' && !it.legal_hold_active && (
|
||||
<button
|
||||
type="button"
|
||||
className="media-library__icon-btn"
|
||||
onClick={() => setReportTarget(it)}
|
||||
aria-label="Melden"
|
||||
title="Inhalt melden"
|
||||
style={{ color: 'var(--text3)', fontSize: '0.72rem', padding: '4px 6px' }}
|
||||
>
|
||||
Melden
|
||||
</button>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
@@ -2026,6 +2058,15 @@ export default function MediaLibraryPage() {
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{reportTarget && (
|
||||
<ReportContentModal
|
||||
targetType="media_asset"
|
||||
targetId={reportTarget.id}
|
||||
targetLabel={reportTarget.original_filename || `Medium #${reportTarget.id}`}
|
||||
onClose={() => setReportTarget(null)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user