Files
DPM/src/styles/mediascreen.css
T
Pine 29bdad316f feat: 播放控制移入页眉 + 媒体铺满智能裁切
页眉播放控制(仅媒体轮播页):
- 新增 MediaHeaderControls:播放/暂停、上一段/下一段、序号、当前文件名(点击进后台)、声音解锁
- 新增 mediaControl 共享状态桥:媒体页同步播放状态,页眉订阅渲染并下发指令
- 移除媒体页底部控制区,媒体区保持纯净全屏

媒体展示:
- .ms-media 改为 object-fit: cover,填满整个容器并智能居中裁切(原 contain 留黑边)

修复:
- MediaScreen useEffect 依赖数组引用后声明函数导致的 TDZ 崩溃
- 清理 MediaScreen 中不再使用的 Icon/cleanName/togglePlayPause
2026-08-17 22:45:46 +08:00

244 lines
5.7 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =========================================================
MediaScreen —— 大屏媒体轮播(与数据大屏统一浅色科技风)
配色沿用 datascreen 的 bd- 变量体系
========================================================= */
.ms-page {
flex: 1;
min-height: 0;
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
color: var(--bd-ink, #1d2c44);
font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
-webkit-font-smoothing: antialiased;
user-select: none;
-webkit-user-select: none;
}
/* 背景网格(与主体一致) */
.ms-page::before {
content: '';
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
opacity: 0.5;
background-image:
repeating-linear-gradient(to right, rgba(47, 107, 255, 0.045) 0 1px, transparent 1px 52px),
repeating-linear-gradient(to bottom, rgba(47, 107, 255, 0.045) 0 1px, transparent 1px 52px);
}
.ms-orb {
position: fixed;
border-radius: 50%;
pointer-events: none;
z-index: 0;
filter: blur(90px);
}
.ms-orb.orb-1 {
width: 420px; height: 420px;
top: -120px; right: -100px;
background: rgba(76, 194, 255, 0.14);
}
.ms-orb.orb-2 {
width: 380px; height: 380px;
bottom: -120px; left: -80px;
background: rgba(47, 107, 255, 0.10);
}
/* 顶栏与页脚沿用 datascreen 的 bd-header / bd-strip */
.ms-page .bd-header { z-index: 10; }
/* 主体:媒体区 */
.ms-main {
position: relative;
flex: 1;
min-height: 0;
z-index: 3;
margin: clamp(10px, 1.4vw, 20px);
border-radius: 16px;
overflow: hidden;
background: rgba(255, 255, 255, 0.5);
border: 1px solid rgba(120, 160, 220, 0.14);
box-shadow:
0 10px 30px rgba(56, 100, 170, 0.07),
0 1px 0 rgba(255, 255, 255, 0.9) inset;
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
}
/* 媒体播放器(填满整个媒体区,等比裁切铺满) */
.ms-media {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
background: transparent;
}
/* 加载中 */
.ms-loader {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 26px;
background: rgba(247, 251, 255, 0.6);
}
.ms-loader-ring {
width: 64px;
height: 64px;
border-radius: 50%;
border: 2px solid rgba(47, 107, 255, 0.2);
border-top-color: var(--bd-blue, #2f6bff);
animation: msSpin 1s linear infinite;
box-shadow: 0 0 30px rgba(47, 107, 255, 0.15);
}
@keyframes msSpin { to { transform: rotate(360deg); } }
.ms-loader-text {
font-size: 13px;
color: var(--bd-sub, #7d8fa9);
letter-spacing: 0.1em;
}
.ms-loader-text a {
color: var(--bd-blue, #2f6bff);
text-decoration: none;
border-bottom: 1px solid rgba(47, 107, 255, 0.3);
}
/* 播放控制已上移页眉(见 datascreen.css .bd-hd-media */
/* 页脚 */
.ms-page .bd-strip { z-index: 10; position: relative; }
/* ============ 登录弹窗(浅色) ============ */
.ms-login-overlay {
position: fixed;
inset: 0;
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
background: rgba(29, 44, 68, 0.55);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
}
.ms-login-overlay.visible {
opacity: 1;
visibility: visible;
}
.ms-login-modal {
position: relative;
width: 100%;
max-width: 380px;
padding: 38px 34px 32px;
background: linear-gradient(180deg, #ffffff, #f4f8fd);
border: 1px solid rgba(120, 160, 220, 0.25);
border-radius: 18px;
text-align: center;
box-shadow: 0 24px 80px rgba(29, 44, 68, 0.25);
}
.ms-login-close {
position: absolute;
top: 14px;
right: 14px;
width: 34px;
height: 34px;
border-radius: 50%;
border: 1px solid rgba(120, 160, 220, 0.2);
background: rgba(255, 255, 255, 0.7);
color: #7d8fa9;
font-size: 20px;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.ms-login-close:hover {
background: rgba(47, 107, 255, 0.08);
color: #2f6bff;
}
.ms-login-brand { margin-bottom: 26px; }
.ms-login-brand h2 {
font-size: 21px;
font-weight: 700;
color: #1d2c44;
letter-spacing: 0.04em;
margin-bottom: 6px;
}
.ms-login-brand p {
font-size: 12.5px;
color: #7d8fa9;
letter-spacing: 0.06em;
}
.ms-login-field {
margin-bottom: 16px;
text-align: left;
}
.ms-login-field label {
display: block;
font-size: 11px;
font-weight: 600;
color: #7d8fa9;
margin-bottom: 7px;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.ms-login-field input {
width: 100%;
padding: 12px 16px;
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(47, 107, 255, 0.2);
border-radius: 10px;
font-size: 14px;
font-family: inherit;
color: #1d2c44;
outline: none;
transition: all 0.2s;
box-sizing: border-box;
}
.ms-login-field input::placeholder {
color: rgba(125, 147, 169, 0.5);
}
.ms-login-field input:focus {
border-color: rgba(47, 107, 255, 0.6);
box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}
.ms-login-error {
font-size: 12.5px;
color: #f04438;
margin-bottom: 12px;
text-align: center;
}
.ms-login-btn {
width: 100%;
padding: 13px;
background: linear-gradient(140deg, #2f6bff, #4cc2ff);
border: none;
border-radius: 10px;
color: #fff;
font-size: 15px;
font-weight: 600;
font-family: inherit;
letter-spacing: 0.08em;
cursor: pointer;
transition: all 0.2s;
box-shadow: 0 6px 20px rgba(47, 107, 255, 0.35);
}
.ms-login-btn:hover {
transform: translateY(-1px);
box-shadow: 0 10px 28px rgba(47, 107, 255, 0.45);
}
.ms-login-btn:active {
transform: translateY(0);
}