同步功能更新

This commit is contained in:
Yeomai committed 2026-10-18 16:50:55 +08:00
1 parent 21f0dc2830
commit 1d2d16e710
11 files changed
+268 -2

No files matched your search

+15
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { ImageItem } from '~/types/image'
import SiteSyncSelectedDialog from '~/components/storage/SiteSyncSelectedDialog.vue'
interface StatsResponse {
uploadToday: number
@@ -74,6 +75,7 @@ const previewOpen = ref(false)
const previewImage = ref<ImageItem | null>(null)
const { viewMode } = useLibraryView('image')
const batchTagOpen = ref(false)
const syncOpen = ref(false)
const currentUploadSource = ref('all')
const currentStorageBackend = ref('all')
@@ -93,6 +95,7 @@ const storageBackendItems = computed(() => [
])
const selectedCount = computed(() => selectedKeys.value.size)
const syncKeys = computed(() => [...selectedKeys.value])
function onWindowScroll() {
showScrollTop.value = window.scrollY > 400
@@ -266,6 +269,10 @@ function goToTagSettings() {
void navigateTo({ path: '/settings', query: { tab: 'tags' } })
}
function openSync() {
syncOpen.value = true
}
function updateSelectedKeys(keys: Set<string>) {
selectedKeys.value = keys
}
@@ -495,6 +502,7 @@ watch(isAuthenticated, async (authed, prev) => {
:loading="galleryLoading"
:show-batch-delete="true"
:show-batch-tags="selectedCount > 0"
:show-batch-sync="selectedCount > 0"
@update:storage-backend="handleStorageBackendChange"
@update:upload-source="handleUploadSourceChange"
@update:tag-ids="handleTagIdsChange"
@@ -505,6 +513,7 @@ watch(isAuthenticated, async (authed, prev) => {
@reset="handleResetFilters"
@batch-delete="requestBatchDelete"
@batch-tags="batchTagOpen = true"
@batch-sync="openSync"
@manage-tags="goToTagSettings"
/>
</div>
@@ -591,6 +600,12 @@ watch(isAuthenticated, async (authed, prev) => {
@confirm="confirmBatchTags"
/>
<SiteSyncSelectedDialog
v-model:open="syncOpen"
:keys="syncKeys"
scope="image"
/>
<UButton
v-show="showScrollTop"
icon="i-lucide-arrow-up"