Refactor processing logic and enhance error handling

- Cleaned up code in processing.py by removing inline semicolons and improving readability.
- Updated upsert_file_relation calls to ensure consistent handling of file relations.
- Enhanced query_file_relations in db_schema.py to support filtering by file existence.
- Improved API error handling in index.ts with user-friendly messages for 401 and 403 errors.
- Added online/offline status tracking in Layout.vue.
- Implemented debounced search functionality across multiple views to optimize performance.
- Introduced loading skeletons in Dashboard.vue for better user experience during data fetching.
- Enhanced file preview cleanup logic in Images.vue, Orders.vue, and Tables.vue to prevent memory leaks.
- Updated global styles to include new loading and notification animations.
This commit is contained in:
2026-05-12 18:37:23 +08:00
parent 81bafaf557
commit e441ac82a8
20 changed files with 455 additions and 76 deletions
+6 -3
View File
@@ -98,7 +98,10 @@ const processingStore = useProcessingStore()
const syncing = ref(false)
const syncStatus = ref({ enabled: false, repo_url: '' })
const currentTask = computed(() => processingStore.currentTask)
const currentTask = computed(() => {
if (processingStore.taskSource === 'sync') return processingStore.currentTask
return null
})
const logs = computed(() => processingStore.logs)
const statusType = computed(() => {
@@ -240,7 +243,7 @@ onMounted(checkStatus)
.sync-btn:hover:not(:disabled) {
border-color: var(--amber-400);
box-shadow: 0 0 0 3px rgba(255,193,7,0.08);
box-shadow: 0 0 0 3px rgba(251,191,36,0.08);
transform: translateY(-1px);
}
@@ -312,7 +315,7 @@ onMounted(checkStatus)
.progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, var(--amber-400), var(--amber-600));
background: linear-gradient(90deg, var(--amber-400), var(--amber-600, #d97706));
border-radius: 3px;
transition: width 0.4s var(--ease-out);
}