修复后台最近传输记录的问题
This commit is contained in:
17
frontend/dist/assets/index-BoiTbES-.js
vendored
17
frontend/dist/assets/index-BoiTbES-.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
17
frontend/dist/assets/index-sgHRZUw3.js
vendored
Normal file
17
frontend/dist/assets/index-sgHRZUw3.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
frontend/dist/index.html
vendored
4
frontend/dist/index.html
vendored
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>AirShare Pro</title>
|
||||
<script type="module" crossorigin src="/assets/index-BoiTbES-.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-C-7tVt-S.css">
|
||||
<script type="module" crossorigin src="/assets/index-sgHRZUw3.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-qzWUgf-t.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -2863,6 +2863,24 @@ handleIncomingTransferFile = function handleIncomingTransferFileOverride(envelop
|
||||
item.progress = 100
|
||||
item.tone = 'success'
|
||||
}
|
||||
mapTransferRecord = function mapTransferRecordOverride(record) {
|
||||
const isCompleted = record.final_status === 'completed'
|
||||
const isFailed = record.final_status === 'failed' || record.final_status === 'cancelled'
|
||||
const displayName = normalizeDisplayName(record.name, 'file')
|
||||
|
||||
return {
|
||||
time: formatRelativeTime(record.created_at),
|
||||
peer: `${shortId(record.sender_device_id)} -> ${shortId(record.receiver_device_id)}`,
|
||||
type: record.kind === 'text' ? '鏂囨湰娑堟伅' : `鏂囦欢 ${displayName}`,
|
||||
size: formatFileSize(Number(record.size_bytes || 0)),
|
||||
status: isCompleted
|
||||
? `宸插畬鎴?(${record.current_channel || 'p2p'})`
|
||||
: isFailed
|
||||
? `宸茬粨鏉?(${record.final_status})`
|
||||
: `杩涜涓?(${record.final_status || 'pending'})`,
|
||||
tone: isCompleted ? 'success' : isFailed ? 'danger' : 'primary',
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -207,7 +207,9 @@ function getFluidStyle(percent) {
|
||||
<tr v-for="record in records" :key="`${record.time}-${record.peer}`">
|
||||
<td>{{ record.time }}</td>
|
||||
<td>{{ record.peer }}</td>
|
||||
<td>{{ record.type }}</td>
|
||||
<td class="admin-record-type-cell">
|
||||
<span class="admin-record-type" :title="record.type">{{ record.type }}</span>
|
||||
</td>
|
||||
<td>{{ record.size }}</td>
|
||||
<td :style="getRecordStyle(record.tone)">{{ record.status }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -1298,6 +1298,8 @@ body[data-theme="dark"] .batch-item:hover {
|
||||
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
table-layout: fixed;
|
||||
margin-top: 10px;
|
||||
border-collapse: collapse;
|
||||
font-size: 14px;
|
||||
@@ -1320,6 +1322,7 @@ body[data-theme="dark"] .batch-item:hover {
|
||||
padding: 14px 12px;
|
||||
color: var(--text-main);
|
||||
border-bottom: 1px solid var(--item-border);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-table tbody tr:last-child td {
|
||||
@@ -1330,6 +1333,22 @@ body[data-theme="dark"] .batch-item:hover {
|
||||
background-color: var(--item-bg-hover);
|
||||
}
|
||||
|
||||
.admin-record-type-cell {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
.admin-record-type {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 1.45;
|
||||
max-height: calc(1.45em * 2);
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user