feat: 文件搜索、视频续播与目录文件过滤

- 前端 Header 新增搜索栏,接入已有 SearchFiles API,结果支持列表/网格视图
- 新增 PlaybackPosition 数据库列与 /api/files/progress 端点,播放进度存服务端
- 播放中每 5 秒自动保存进度,再次打开视频时弹出"继续播放"提示
- 目录浏览新增媒体类型过滤条(全部/视频/音频/文本),前端即时过滤
- 新增 4 种数据库迁移(AddPlaybackPosition)
This commit is contained in:
2026-05-22 17:44:35 +08:00
parent ff19f4759f
commit 6ef410fdfa
22 changed files with 2386 additions and 14 deletions
+144
View File
@@ -392,6 +392,8 @@ a {
.mobile-header-actions {
display: flex;
align-items: center;
justify-content: flex-end;
min-width: 0;
gap: 8px;
}
@@ -944,6 +946,118 @@ a {
background: #111827;
}
/* Search */
.search-form {
display: flex;
align-items: center;
min-width: 0;
gap: 6px;
}
.search-input {
flex: 1 1 auto;
min-width: 0;
min-height: 34px;
border: 1px solid var(--line);
border-radius: 10px;
padding: 4px 12px;
font-size: 14px;
background: var(--panel);
color: var(--text);
outline: none;
width: 180px;
}
.search-input:focus {
border-color: var(--accent);
}
.search-submit {
flex: 0 0 auto;
min-height: 34px;
border-radius: 10px;
padding: 4px 11px;
color: #fff;
background: var(--accent);
font-size: 14px;
font-weight: 700;
}
.search-results-title {
min-width: 0;
margin: 0;
overflow-wrap: anywhere;
color: var(--muted);
font-size: 15px;
font-weight: 800;
}
/* Filter chips */
.filter-chips {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.filter-chips button {
min-height: 28px;
border: 1px solid var(--line);
border-radius: 8px;
padding: 2px 10px;
font-size: 13px;
font-weight: 600;
color: var(--muted);
background: transparent;
}
.filter-chips button.active {
color: #fff;
background: var(--accent);
border-color: var(--accent);
}
/* Resume banner */
.resume-banner {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
margin-top: 10px;
border: 1px solid var(--accent);
border-radius: 10px;
padding: 10px 14px;
background: #eef2ff;
font-size: 14px;
font-weight: 700;
color: var(--accent-strong);
}
.resume-banner-actions {
display: flex;
gap: 8px;
}
.resume-yes,
.resume-no {
min-height: 30px;
border: none;
border-radius: 8px;
padding: 4px 14px;
font-size: 13px;
font-weight: 700;
}
.resume-yes {
color: #fff;
background: var(--accent);
}
.resume-no {
color: var(--muted);
background: #f2f4f7;
}
/* Recent files section */
.recent-files {
margin-top: 4px;
@@ -988,6 +1102,36 @@ a {
.filter-row button {
width: 100%;
}
.mobile-header {
align-items: stretch;
flex-direction: column;
}
.mobile-header-actions {
justify-content: flex-start;
flex-wrap: wrap;
}
.search-form {
flex: 1 1 100%;
order: -1;
}
.search-input {
width: 100%;
}
.view-toggle-bar,
.section-header {
align-items: stretch;
flex-direction: column;
gap: 8px;
}
.view-toggle {
align-self: flex-start;
}
}
@media (min-width: 900px) {