v3: added localization, use global player for uploaded audio/video files
This commit is contained in:
142
src/App.css
142
src/App.css
@@ -511,6 +511,85 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.file-preview-play-btn {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: #000;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.file-preview-video-thumb {
|
||||
width: 100%;
|
||||
max-height: 480px;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.file-preview-play-btn .rich-content-play-overlay {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.audio-file-preview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 1rem;
|
||||
background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface) 92%);
|
||||
border: 2px solid var(--color-border);
|
||||
border-radius: 0 0 12px 12px;
|
||||
}
|
||||
|
||||
.audio-file-preview--active .waveform-bar {
|
||||
fill: var(--color-accent);
|
||||
}
|
||||
|
||||
.audio-file-preview--active .audio-player-btn {
|
||||
background: var(--color-accent-hover);
|
||||
}
|
||||
|
||||
.file-preview-audio-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem 1.25rem;
|
||||
border: 2px solid var(--color-border);
|
||||
border-radius: 10px;
|
||||
background: var(--color-bg);
|
||||
cursor: pointer;
|
||||
color: var(--color-text);
|
||||
width: 100%;
|
||||
font-size: 0.95rem;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.file-preview-audio-btn:hover {
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
|
||||
.file-preview-audio-icon {
|
||||
font-size: 1.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.file-preview-audio-label {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.file-preview-audio-play {
|
||||
flex-shrink: 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* ── Video player ── */
|
||||
.video-player {
|
||||
width: 100%;
|
||||
@@ -639,6 +718,42 @@
|
||||
);
|
||||
}
|
||||
|
||||
/* ── Waveform ── */
|
||||
.waveform-svg {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 48px;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.waveform-bar {
|
||||
fill: color-mix(in srgb, var(--color-accent) 25%, var(--color-border) 75%);
|
||||
}
|
||||
|
||||
.waveform-bar--played {
|
||||
fill: var(--color-accent);
|
||||
}
|
||||
|
||||
.waveform-skeleton {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 48px;
|
||||
border-radius: 3px;
|
||||
background: color-mix(in srgb, var(--color-accent) 12%, var(--color-border) 88%);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.waveform-skeleton-fill {
|
||||
position: absolute;
|
||||
inset: 0 auto 0 0;
|
||||
background: var(--color-accent);
|
||||
opacity: 0.45;
|
||||
transition: width 0.1s linear;
|
||||
}
|
||||
|
||||
.audio-player-track--volume {
|
||||
flex: 1 1 100px;
|
||||
max-width: 120px;
|
||||
@@ -824,7 +939,8 @@
|
||||
.global-player--reduced .global-player-body {
|
||||
grid-template-rows: 0fr;
|
||||
}
|
||||
.global-player-iframe-wrap {
|
||||
.global-player-iframe-wrap,
|
||||
.global-player-media-wrap {
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
border-radius: 0 0 8px 8px;
|
||||
@@ -1567,10 +1683,10 @@ body.has-player .fab-new {
|
||||
margin: 1rem auto 0 auto;
|
||||
max-width: 860px;
|
||||
padding: 0.75rem 1rem;
|
||||
border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background: color-mix(in srgb, var(--color-danger-bg) 92%, white 8%);
|
||||
color: var(--color-text);
|
||||
background: var(--color-danger-bg);
|
||||
color: var(--color-on-accent);
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
@@ -2256,6 +2372,22 @@ body.has-player .fab-new {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* Fill the 48×48 preview box and center content for media buttons */
|
||||
.dump-card-preview .rich-content-thumbnail-btn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.dump-card-preview .rich-content-compact-thumbnail {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* ── Shared card body ── */
|
||||
.dump-card-body,
|
||||
.playlist-card-body {
|
||||
@@ -2494,6 +2626,8 @@ body.has-player .fab-new {
|
||||
.modal-body {
|
||||
padding: 1rem 1.25rem;
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
|
||||
Reference in New Issue
Block a user