添加预览图片功能
This commit is contained in:
@@ -142,11 +142,9 @@ const syncTargetDescription = computed(() => {
|
||||
});
|
||||
const syncFileDetails = computed(() => {
|
||||
const files = syncFeedback.value?.result?.files || [];
|
||||
return [...files].sort((left, right) => {
|
||||
if (left.action === "skip" && right.action !== "skip") return 1;
|
||||
if (left.action !== "skip" && right.action === "skip") return -1;
|
||||
return left.path.localeCompare(right.path);
|
||||
});
|
||||
return files
|
||||
.filter((file) => file.action !== "skip")
|
||||
.sort((left, right) => left.path.localeCompare(right.path));
|
||||
});
|
||||
|
||||
const menuItems: Array<{
|
||||
@@ -875,7 +873,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
<div class="settings-sync-file-section">
|
||||
<div class="settings-sync-file-heading">
|
||||
<strong>文件明细</strong>
|
||||
<strong>变更文件</strong>
|
||||
<span>{{ syncFileDetails.length }} 个文件</span>
|
||||
</div>
|
||||
<div v-if="syncFileDetails.length" class="settings-sync-file-list">
|
||||
@@ -887,7 +885,7 @@ onBeforeUnmount(() => {
|
||||
<span class="settings-sync-file-size">{{ formatFileSize(file.size) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p v-else class="settings-sync-file-empty">工作目录与远端都没有文件。</p>
|
||||
<p v-else class="settings-sync-file-empty">本次同步没有文件变更。</p>
|
||||
</div>
|
||||
</template>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user