Files
Henry_Du d818819fff
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 1m24s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 4s
feat: 实现主题、黑名单、排程等14项功能迭代
- style(theme): 修复浅色模式不生效问题,为 ClassicLight 和 ModernLight 增加独立差异化 CSS 变量定义(主色/圆角/阴影/背景对比度)
- feat(blacklist): 后端放开 LANGUAGE/GENRE 类型校验;check API 新增语种(CJK/拉丁/假名/谚文/西里尔/阿拉伯)和曲风关键词匹配逻辑;前端 BlacklistManager UI 增加 语种/曲风 四类型切换、类型筛选、图标与标签颜色映射、输入提示
- fix(DataAnalysisPanel): 活跃用户列表容器加 max-h-[400px] + overflow-y-auto + 底部渐变遮罩;tooltip 加 max-height + truncate 防止超高;头像失败回退首字母
- feat(admin): 新增 user-avatar.ts 工具(OAuth→Gravatar→DiceBear 三级兜底);active-users/realtime/users 列表返回 avatarUrl;DataAnalysisPanel/UserManager 展示圆形头像;权限分级 ROLE_LEVELS,SUPER_ADMIN 全权限,ADMIN 仅可管理 ≤ USER 级用户的密码与角色,前端按钮联动禁用
- fix+style(schedule): ScheduleManager 标签页 sticky min-h 防抖、间距调优、表单分组、移动端 padding 统一
- feat(schedule): 自动排期新增「按投稿人数优先覆盖」策略(算法:requester + collaborators 总数降序),支持 CustomSelect 切换;新增 localStorage voicehub:schedule:auto-config 持久化 7 项配置(策略/时段/年级/排序/标签/搜索/学期)500ms debounce
- fix(schedule): songs/index.get 新增 usePool 参数,从 schedule_song_pool(status=PENDING,targetPlayDate IS NULL) 取歌并去重,排除已排期 songs.played=false;schedule.post 和 draft-bulk 分配后更新池状态为 ASSIGNED 避免重复分配
- feat(player): ScheduleManager 新增「构建播放队列」按钮,按 playDate→时段→sequence 排序后经 useAudioPlayer.playSong 整列载入并 toast 反馈
- fix(db): db.ts 检测 NETLIFY/VERCEL serverless 环境使用最小池 max=1 idle_timeout=1 keep_alive=false,Node Server 保持 max=10
- feat(site-config): site-config.get.ts 与 useSiteConfig.js 导出 statisticsCode 和 statisticsCodeEnabled;index.vue 挂载后解析 HTML 动态重插 script 元素确保第三方统计执行
- fix(schedule-printer): ScheduleItemPrint 封面 aspect-square object-cover;print-fix.css 打印时强制 48px×48px contain、去除圆角阴影
- fix(songRequest): 新增 server/utils/url.ts normalizeCoverUrl(trim/去零宽空格/相对协议补 https/非 http 丢弃/URL.parse 兜底);request.post/add.post/import.post 三处写入 cover/coverUrl 前统一规范化
2026-09-12 08:40:59 +08:00

285 lines
6.5 KiB
CSS

/* PDF导出宽度样式 */
@media print {
/* 重置所有可能影响宽度的样式 */
* {
box-sizing: border-box !important;
}
/* 强制覆盖移动端样式 */
.schedule-item-print .item-content {
flex-direction: row !important;
align-items: center !important;
gap: 12px !important;
}
.schedule-item-print .sequence-number {
align-self: center !important;
}
.schedule-item-print .cover-section {
width: 40px !important;
height: 40px !important;
}
.schedule-item-print .song-info {
width: auto !important;
flex: 1 !important;
}
.schedule-item-print .requester-info,
.schedule-item-print .votes-info,
.schedule-item-print .playtime-info {
width: auto !important;
justify-content: flex-end !important;
flex-shrink: 0 !important;
}
/* 确保页面容器宽度正确 */
html,
body {
width: 100% !important;
max-width: none !important;
margin: 0 !important;
padding: 0 !important;
}
/* 打印页面容器 - 固定合理宽度 */
.print-page {
width: 210mm !important;
max-width: 210mm !important;
min-width: auto !important;
box-sizing: border-box !important;
margin: 0 auto !important;
padding: 20mm !important;
background: white !important;
color: black !important;
}
/* 排期内容容器 */
.schedule-content {
width: 100% !important;
max-width: 170mm !important;
box-sizing: border-box !important;
}
/* 排期项目 */
.schedule-item-print {
width: 100% !important;
max-width: 170mm !important;
box-sizing: border-box !important;
margin-bottom: 8px !important;
page-break-inside: avoid !important;
}
/* 排期项目内容 */
.schedule-item-print .item-content {
display: flex !important;
flex-direction: row !important;
align-items: center !important;
width: 100% !important;
gap: 12px !important;
padding: 8px !important;
box-sizing: border-box !important;
}
/* 序号 */
.schedule-item-print .sequence-number {
width: 30px !important;
height: 30px !important;
flex-shrink: 0 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
background: #f0f0f0 !important;
border-radius: 50% !important;
font-weight: bold !important;
font-size: 14px !important;
}
/* 封面 - 打印模式下固定尺寸,移除圆角阴影,使用 contain 防止裁切 */
.schedule-item-print .cover-section {
width: 48px !important;
height: 48px !important;
aspect-ratio: 1 / 1 !important;
flex-shrink: 0 !important;
}
.schedule-item-print .song-cover {
width: 100% !important;
height: 100% !important;
object-fit: contain !important;
border-radius: 0 !important;
box-shadow: none !important;
}
.schedule-item-print .cover-placeholder {
width: 100% !important;
height: 100% !important;
aspect-ratio: 1 / 1 !important;
object-fit: contain !important;
border-radius: 0 !important;
box-shadow: none !important;
}
/* 歌曲信息 */
.schedule-item-print .song-info {
flex: 1 !important;
min-width: 0 !important;
margin-right: 12px !important;
}
.schedule-item-print .song-title {
font-size: 16px !important;
font-weight: 600 !important;
color: #000 !important;
margin-bottom: 2px !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.schedule-item-print .song-artist {
font-size: 14px !important;
color: #333 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
/* 附加信息 */
.schedule-item-print .requester-info,
.schedule-item-print .votes-info,
.schedule-item-print .playtime-info {
display: flex !important;
align-items: center !important;
font-size: 12px !important;
color: #666 !important;
white-space: nowrap !important;
flex-shrink: 0 !important;
margin-left: 8px !important;
}
.schedule-item-print .label {
font-weight: 500 !important;
margin-right: 4px !important;
}
.schedule-item-print .value {
color: #333 !important;
}
/* 页面头部和尾部 */
.page-header,
.page-footer {
width: 100% !important;
box-sizing: border-box !important;
color: #000 !important;
}
/* 学校Logo */
.school-logo-print {
object-fit: contain !important;
}
.logo {
object-fit: contain !important;
}
.page-header {
text-align: center !important;
margin-bottom: 20px !important;
padding-bottom: 10px !important;
border-bottom: 2px solid #000 !important;
}
.page-footer {
text-align: center !important;
margin-top: 20px !important;
padding-top: 10px !important;
border-top: 1px solid #ccc !important;
font-size: 12px !important;
color: #666 !important;
}
/* 隐藏不需要打印的元素 */
.settings-panel,
.preview-header,
.mobile-header,
.sidebar,
.mobile-overlay,
.back-to-top-btn {
display: none !important;
}
/* 确保主内容区域正确显示 */
.main-content {
margin-left: 0 !important;
padding: 0 !important;
width: 100% !important;
}
/* 移除所有阴影和边框效果 */
* {
box-shadow: none !important;
text-shadow: none !important;
}
/* 确保文字颜色正确 */
* {
color: inherit !important;
}
/* 页面分页控制 */
.print-page {
page-break-after: always !important;
}
.print-page:last-child {
page-break-after: auto !important;
}
/* 防止内容被截断 */
.schedule-item-print {
break-inside: avoid !important;
page-break-inside: avoid !important;
}
/* 优化分页效果 */
.page-header {
page-break-after: avoid !important;
}
.page-footer {
page-break-before: avoid !important;
}
/* 确保歌曲信息完整显示 */
.schedule-item-print .item-content {
page-break-inside: avoid !important;
}
/* 防止封面图片被截断 */
.schedule-item-print .cover-section {
page-break-inside: avoid !important;
}
/* 防止歌曲标题和艺术家信息被截断 */
.schedule-item-print .song-info {
page-break-inside: avoid !important;
}
/* 防止附加信息被截断 */
.schedule-item-print .requester-info,
.schedule-item-print .votes-info,
.schedule-item-print .playtime-info {
page-break-inside: avoid !important;
}
}
/* 专门针对PDF导出的样式 */
@page {
margin: 20mm;
size: A4;
}