Compare commits
2 Commits
4d12b615c8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cfbf4ad2b4 | |||
| a48e601ed3 |
@@ -34,8 +34,7 @@ function fmtTime(s) {
|
||||
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`
|
||||
}
|
||||
|
||||
async function onDelete(job) {
|
||||
if (!confirm(t('job.deleteConfirm', { name: job.source_filename }))) return
|
||||
function onDelete(job) {
|
||||
emit('delete', job)
|
||||
}
|
||||
</script>
|
||||
@@ -67,7 +66,7 @@ async function onDelete(job) {
|
||||
<tbody>
|
||||
<tr v-for="j in items" :key="j.id">
|
||||
<td class="col-name">{{ j.source_filename }}</td>
|
||||
<td class="col-size zpdf-mono">{{ fmtBytes(j.source_size) }}</td>
|
||||
<td class="col-size zpdf-mono" :data-label="t('job.size')">{{ fmtBytes(j.source_size) }}</td>
|
||||
<td class="col-status">
|
||||
<span v-if="j.status === 'done' || j.status === 'failed'" :class="statusClass(j)">
|
||||
{{ statusText(j) }}
|
||||
@@ -79,7 +78,7 @@ async function onDelete(job) {
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class="col-time zpdf-muted">{{ fmtTime(j.created_at) }}</td>
|
||||
<td class="col-time zpdf-muted" :data-label="t('job.created')">{{ fmtTime(j.created_at) }}</td>
|
||||
<td class="col-act">
|
||||
<a
|
||||
v-if="j.status === 'done'"
|
||||
@@ -158,8 +157,27 @@ async function onDelete(job) {
|
||||
}
|
||||
.zpdf-bar--sm { display: inline-block; width: 90px; vertical-align: middle; height: 6px; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.zpdf-table th, .zpdf-table td { padding: 8px 6px; }
|
||||
.zpdf-table .col-time { font-size: 0.78em; }
|
||||
@media (max-width: 768px) {
|
||||
/* 窄屏:表格转卡片式,避免横向滚动。每行展示文件名(主)+ 状态(次)+ 操作 */
|
||||
.zpdf-table, .zpdf-table thead, .zpdf-table tbody, .zpdf-table tr, .zpdf-table th, .zpdf-table td {
|
||||
display: block; width: 100%;
|
||||
}
|
||||
.zpdf-table thead { display: none; } /* 卡片模式无需表头 */
|
||||
.zpdf-table tr {
|
||||
padding: 12px; border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.zpdf-table tbody tr:hover td { background: transparent; }
|
||||
.zpdf-table td {
|
||||
padding: 4px 0; border-bottom: none; text-align: left;
|
||||
}
|
||||
/* 文件名为卡片标题,其余为次要行 */
|
||||
.zpdf-table .col-name { font-size: 1em; margin-bottom: 4px; }
|
||||
.zpdf-table .col-size::before { content: attr(data-label) " "; color: var(--text-tertiary); font-size: 0.82em; }
|
||||
.zpdf-table .col-time::before { content: attr(data-label) " "; color: var(--text-tertiary); font-size: 0.82em; }
|
||||
.zpdf-table .col-status { margin: 6px 0; }
|
||||
.zpdf-table .col-act { margin-top: 8px; text-align: left; }
|
||||
.zpdf-table .col-act .zpdf-btn { margin-left: 0; margin-right: 8px; }
|
||||
/* 移动端触控目标加大 */
|
||||
.zpdf-btn--sm { padding: 8px 16px; font-size: 0.9em; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -128,4 +128,12 @@ async function handle(file) {
|
||||
margin-top: 10px; padding: 8px 12px; border-radius: var(--radius-sm);
|
||||
background: var(--danger-weak); color: var(--danger); font-size: 0.88em;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
/* 移动端无拖拽语义,缩小拖拽区节省首屏;触控目标加大 */
|
||||
.zpdf-dropzone { padding: 24px 16px; min-height: 120px; gap: 8px; }
|
||||
.zpdf-dropzone__hint { font-size: 0.9em; }
|
||||
.zpdf-btn { padding: 10px 22px; font-size: 1em; }
|
||||
.zpdf-upload-progress__name { font-size: 0.85em; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -32,10 +32,7 @@ export default {
|
||||
statusConverting: 'Converting',
|
||||
statusPending: 'Queued',
|
||||
download: 'Download',
|
||||
delete: 'Delete',
|
||||
deleteConfirm: 'Delete "{name}"?\nIt will no longer be shown to you (admin can still see it; only admin hard-delete truly removes it).',
|
||||
deleted: 'Deleted',
|
||||
deleteFailed: 'Delete failed: {msg}'
|
||||
delete: 'Delete'
|
||||
},
|
||||
refresh: 'Refresh'
|
||||
}
|
||||
|
||||
@@ -31,10 +31,7 @@ export default {
|
||||
statusConverting: '转换中',
|
||||
statusPending: '排队中',
|
||||
download: '下载',
|
||||
delete: '删除',
|
||||
deleteConfirm: '确定删除「{name}」?\n删除后将不再显示(管理员仍可见,需管理员彻底删除才会清除)。',
|
||||
deleted: '已删除',
|
||||
deleteFailed: '删除失败:{msg}'
|
||||
delete: '删除'
|
||||
},
|
||||
refresh: '刷新'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user