fix: resolve TypeScript compilation errors

Fixes:
- VideoPlayer.vue: restore allTags, filteredMarks, marksByTag (removed by mistake)
- PeopleView.vue: fix frameTime scope in playFaceDetailVideo catch block
- Both errors caused white screen on build failure

Root cause:
1. visibleTags duplicate declaration (old + new logic)
2. frameTime undefined in catch block (scope issue)

Solution:
1. Keep allTags/filteredMarks/marksByTag (needed in template)
2. Keep visibleTags (new logic for processor toggles)
3. Move frameTime calculation to correct scope in catch block
This commit is contained in:
2026-07-24 23:33:40 +08:00
parent 48975ef247
commit cb7e1ba0ba
37 changed files with 6875 additions and 205 deletions

48
src/stores/agentStore.ts Normal file
View File

@@ -0,0 +1,48 @@
import { ref } from 'vue'
export const agentTip = ref<string>('')
export const showAgentTip = ref(false)
export const agentSuggestions = ref<string[]>([])
export const discoveryTip = ref<string>('')
export const userBehavior = ref({
hasUsedKeywordSearch: false,
hasUsedSemanticSearch: false,
hasUsedPeopleSearch: false,
hasUsedFileFilter: false,
hasUsedContextMenu: false,
hasViewedPersonDetails: false,
hasBindedFace: false,
hasUsedSearchHistory: false,
hasUsedBookmark: false
})
export function showTip(message: string, duration = 5000) {
agentTip.value = message
showAgentTip.value = true
setTimeout(() => {
showAgentTip.value = false
}, duration)
}
export function showDiscovery(message: string, duration = 8000) {
discoveryTip.value = message
setTimeout(() => {
discoveryTip.value = ''
}, duration)
}
export function trackBehavior(action: keyof typeof userBehavior.value) {
userBehavior.value[action] = true
localStorage.setItem('momentry_user_behavior', JSON.stringify(userBehavior.value))
}
export function loadUserBehavior() {
const saved = localStorage.getItem('momentry_user_behavior')
if (saved) {
try {
userBehavior.value = JSON.parse(saved)
} catch (e) {
console.error('Failed to load user behavior:', e)
}
}
}