From 9a6abcbdcb9e42374b7a98181ceb2f35c1ef612c Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Mon, 15 Jun 2026 01:09:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20=E5=BE=85=E5=AE=9A=E4=BA=BA?= =?UTF-8?q?=E8=87=89=20section=20with=20face=20candidates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/PeopleView.vue | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/views/PeopleView.vue b/src/views/PeopleView.vue index 8cb5a32..f8058bf 100644 --- a/src/views/PeopleView.vue +++ b/src/views/PeopleView.vue @@ -82,6 +82,24 @@ + +
+ + +
+
+
待定人臉:
+
+
+
+
+ +
{{ Math.round(c.confidence * 100) }}%
+
+ {{ c.file_uuid.slice(0, 8) }}... #{{ c.frame_number }} +
+
+
@@ -207,6 +225,7 @@ const showMerge = ref(false) const mergeTarget = ref('') const candidates = ref([]) const candidateThumbs = ref>({}) +const faceCandidates = ref([]) const ctxMenu = ref({ show: false, x: 0, y: 0, person: null as any }) const confirmedPeople = computed(() => { @@ -239,6 +258,12 @@ onMounted(async () => { } finally { loading.value = false } + try { + const fc: any = await invoke('getFaceCandidates', { page: 1, perPage: 100 }) + faceCandidates.value = Array.isArray(fc) ? fc : [] + } catch (e) { + console.error('Failed to load face candidates:', e) + } document.addEventListener('click', closeCtxMenu) }) @@ -309,7 +334,7 @@ async function confirmDelete() { async function loadCandidates() { try { - const result: any = await invoke('get_face_candidates', { page: 1, perPage: 50 }) + const result: any = await invoke('getFaceCandidates', { page: 1, perPage: 50 }) candidates.value = Array.isArray(result) ? result : [] } catch (e) { console.error('Failed to load candidates:', e) } } @@ -333,6 +358,10 @@ async function confirmMerge() { } catch (e) { console.error('Merge failed:', e) } } +function showAssignModal(c: any) { + alert(`Assign face ${c.id} to existing person - not yet implemented`) +} + function formatTime(sec: number): string { const m = Math.floor(sec / 60); const s = Math.floor(sec % 60) return `${m}:${s.toString().padStart(2, '0')}` @@ -416,6 +445,8 @@ h1 { margin: 0; } .ms-ppl-strip-face { position: relative; flex-shrink: 0; cursor: pointer; } .ms-ppl-strip-face-img { width: 52px; height: 52px; border-radius: 12px; border: 2px solid transparent; background: #e8eaed; overflow: hidden; transition: border-color .15s; } .ms-ppl-strip-face:hover .ms-ppl-strip-face-img { border-color: #202124; } +.ms-uface-grid .ms-ppl-face-card { width: 120px; } +.ms-uface-grid .ms-ppl-face-img-wrap { width: 120px; height: 120px; border-radius: 20px; } .ms-ppl-media-label { font-size: 13px; color: #5f6368; margin-bottom: 16px; } .close-btn { position: absolute; top: 16px; right: 16px; } .detail-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }