Core Changes: - Fix SearchView to use start_frame/end_frame directly (no time*fps conversion) - Add hard_delete support to delete_trace API - VideoPlayer: Main timeline + Mark system foundation - Proxy: Add local routes for auth, media, identity-matches, cluster-results - Add .gitignore to exclude build artifacts and dependencies Design Documents: - Multi-track Mark system design (.opencode/plans/) - Video editing positioning standards research Files Modified: - src/views/SearchView.vue: Frame positioning, ensureMinDuration (240 frames) - src/views/PeopleView.vue: batchDeleteGroups with hard_delete - src/api/index.ts: delete_trace with hard_delete body - src/components/VideoPlayer.vue: Timeline + Mark UI - src-tauri/src/proxy.rs: New local routes - AGENTS.md: Update documentation
11 lines
500 B
TypeScript
11 lines
500 B
TypeScript
export const isTauri = typeof window !== 'undefined' && !!(window as any).__TAURI__
|
|
|
|
export function getApiBase(): string {
|
|
if (isTauri) return 'http://localhost:8888'
|
|
const stored = localStorage.getItem('proxy_url')
|
|
if (stored) return stored
|
|
const hostname = typeof window !== 'undefined' ? window.location.hostname : ''
|
|
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1'
|
|
if (isLocal) return '' // 走 Vite proxy → Rust proxy (8888)
|
|
return window.location.origin
|
|
} |