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
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
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)
|
|
}
|
|
}
|
|
} |