feat: add media preview functionality to media library
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 28s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 39s
Test Suite / pytest-backend (pull_request) Failing after 1s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 6s
Test Suite / playwright-tests (pull_request) Successful in 24s

- Introduced a preview feature for media assets, allowing users to view images and videos in a modal overlay.
- Updated the MediaLibraryPage component to handle media selection and display previews based on the media type.
- Enhanced CSS styles for media cards and preview modals to improve user experience and accessibility.
- Updated instructional text to guide users on how to access media previews.
This commit is contained in:
Lars committed 2026-05-07 14:39:31 +02:00
1 parent b8453f3f07
commit 3d321857ec
2 files changed
+236 -8

No files matched your search

+102
View File
@@ -5628,6 +5628,22 @@ a.analysis-split__nav-item {
cursor: pointer;
color: var(--text1);
}
.media-library__card-thumb-hit {
display: block;
width: 100%;
margin: 0;
padding: 0;
border: none;
background: transparent;
cursor: zoom-in;
text-align: left;
font: inherit;
color: inherit;
-webkit-tap-highlight-color: transparent;
}
.media-library__card-thumb-hit:active {
opacity: 0.96;
}
.media-library__card-thumb-wrap {
aspect-ratio: 1;
background: var(--surface2);
@@ -5717,6 +5733,21 @@ a.analysis-split__nav-item {
overflow: hidden;
background: var(--surface2);
}
.media-library__table-thumb-hit {
display: block;
margin: 0;
padding: 0;
border: none;
background: transparent;
cursor: zoom-in;
font: inherit;
border-radius: 8px;
-webkit-tap-highlight-color: transparent;
}
.media-library__table-thumb-hit:focus-visible {
outline: 2px solid var(--accent, #3b82f6);
outline-offset: 2px;
}
.media-library__table-thumb .media-library__thumb-img,
.media-library__table-thumb .media-library__thumb-video {
width: 56px;
@@ -5865,3 +5896,74 @@ a.analysis-split__nav-item {
flex: 1 1 160px;
min-width: 0;
}
/* Vorschau-Modal (Vollbild nah) */
.media-library__overlay--preview {
background: rgba(0, 0, 0, 0.72);
z-index: 210;
}
.media-library__modal--preview {
max-width: min(92vw, 960px);
width: 100%;
max-height: min(94vh, 900px);
display: flex;
flex-direction: column;
overflow: hidden;
}
.media-library__modal--preview .media-library__modal-head {
flex-shrink: 0;
}
.media-library__preview-title {
flex: 1;
min-width: 0;
font-size: 1rem;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 8px;
}
.media-library__modal--preview .media-library__modal-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.media-library__preview-head-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.media-library__preview-body {
flex: 1;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 12px 16px 20px;
background: var(--surface2);
}
.media-library__preview-img {
max-width: 100%;
max-height: min(78vh, 720px);
width: auto;
height: auto;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.media-library__preview-video {
width: 100%;
max-height: min(78vh, 720px);
border-radius: 8px;
background: #000;
}
.media-library__preview-fallback {
text-align: center;
padding: 24px 16px;
max-width: 360px;
}
.media-library__preview-fallback .btn {
margin-top: 12px;
}