feat: media API (video/bbox/thumbnail), UUID unification, dot matrix text, portal fixes, API dictionary V1.3
This commit is contained in:
@@ -95,10 +95,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { listIdentities } from '@/api/client'
|
||||
import { listIdentities, httpFetch, getCurrentConfig } from '@/api/client'
|
||||
import { useRouter } from 'vue-router'
|
||||
import PersonThumbnail from '@/components/PersonThumbnail.vue'
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
|
||||
interface PersonProfile {
|
||||
name: string | null
|
||||
@@ -142,11 +141,12 @@ const loadPersons = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const registerPerson = async (personId: string, videoUuid: string) => {
|
||||
const registerPerson = async (personId: string, _videoUuid: string) => {
|
||||
try {
|
||||
await invoke('register_identity', {
|
||||
personId,
|
||||
videoUuid
|
||||
const config = getCurrentConfig()
|
||||
await httpFetch(`${config.api_base_url}/api/v1/identity`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ face_json_path: personId, identity_name: personId })
|
||||
})
|
||||
alert('註冊成功!')
|
||||
await loadPersons()
|
||||
|
||||
Reference in New Issue
Block a user