| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Update web readme (#12062) * Update web readme * Update /web readme * Apply suggestions from code review Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> --------- Co-authored-by: Sam Wright <sam@sams-mbp.lan> Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> | 2 年前 | |
Multi-export UI fixes (#23959) * multi export fixes * i18n * new tests | 23 天前 | |
llc to inc and 2025 to 2026 (#21484) | 7 个月前 | |
Replace react-tracked and react-use-websocket with useSyncExternalStore (#22386) * refactor websockets to remove react-tracked react 19 removed useReducer eager bailout, which broke react-tracked. react-tracked works by wrapping state in a JavaScript Proxy. When a component reads state.someField, the proxy records that access. On the next state update, it compares only the fields each component actually touched and skips re-renders if those fields are unchanged. Under the hood, this relies on useReducer — and in React 18, useReducer had an "eager bail-out" that short-circuited rendering when the new state was === to the old state. React 19 removed that optimization, so every dispatch now schedules a render regardless, and the proxy comparison runs too late to prevent it. useSyncExternalStore is a React primitive (added in 18, stable in 19) designed for exactly this pattern: subscribing to an external store: useSyncExternalStore( subscribe, // (listener) => unsubscribe — called when the store changes getSnapshot // () => value — returns the current value for this subscriber ) React calls getSnapshot during render and compares the result with Object.is. If the value is the same reference, the component bails out — no re-render. The key difference from react-tracked is that this bail-out is built into React's reconciler, not bolted on via proxy tricks and useReducer. The per-topic subscription model makes this efficient. Instead of one global store where every subscriber has to check if their fields changed, each useWs("some/topic", ...) call subscribes only to that topic's listener set. When a message arrives for front_door/detect/state, only components subscribed to that exact topic get their listener fired → React calls their getSnapshot → Object.is compares the value → bail-out if unchanged. Components watching back_yard/detect/state are never even notified. * remove react-tracked and react-use-websocket * refactor usePolygonStates to use ws topic subscription * fix TimeAgo refresh interval always returning 1s due to unit mismatch (seconds vs milliseconds) older events now correctly refresh every minute/hour instead of every second * simplify * clean up * don't resend onconnect * clean up * remove patch | 5 个月前 | |
Add more vehicle types to default attribute map (#24097) * run lpr on more vehicle types by default before, a config change to attribute_map was required * logging tweaks * remove arg * use attributes for frontend check * docs * only check thumbnail attributes the object can have | 8 天前 | |
Add more vehicle types to default attribute map (#24097) * run lpr on more vehicle types by default before, a config change to attribute_map was required * logging tweaks * remove arg * use attributes for frontend check * docs * only check thumbnail attributes the object can have | 8 天前 | |
UI tweaks (#23492) * slightly darken bg-card * change menu label * move snapshot retain out of advanced fields * add new ui options for collapsibles * backend title and description * remove unused snapshot retention field * update reference config * remove further references to snapshots retain.mode | 2 个月前 | |
Auth! (#11347) * reload the window on 401 * backend apis for auth * add login page * re-enable web linter * fix login page routing * bypass csrf for internal auth endpoint * disable healthcheck in devcontainer target * include login page in vite build * redirect to login page on 401 * implement config for users and settings * implement JWT actual secret * add brute force protection on login * add support for redirecting from auth failures on api calls * return location for redirect * default cookie name should pass regex test * set hash iterations to current OWASP recommendation * move users to database instead of config * config option to reset admin password on startup * user management UI * check for deleted user on refresh * validate username and fixes * remove password constraint * cleanup * fix user check on refresh * web fixes * implement auth via new external port * use x-forwarded-for to rate limit login attempts by ip * implement logout and profile * fixes * lint fixes * add support for user passthru from upstream proxies * add support for specifying a logout url * add documentation * Update docs/docs/configuration/authentication.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Update docs/docs/configuration/authentication.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> | 2 年前 | |
Fix chat tool calling and prompt breaking (#23457) * Implement tool call history keeping * Refactor to match single message implementation * Simplify data representation * Cleanup chat page rendering * Include system message to not break cache * Formatting * Update tests and update .gitignore | 2 个月前 | |
Use prettier-plugin-tailwindcss (#11373) * use prettier-plugin-tailwindcss to keep class names organized * use prettierrc file to ensure formatting on save works with vscode * classname reorder with prettier-plugin-tailwindcss | 2 年前 | |
Update web readme (#12062) * Update web readme * Update /web readme * Apply suggestions from code review Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> --------- Co-authored-by: Sam Wright <sam@sams-mbp.lan> Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> | 2 年前 | |
Add shadcn sidebar component (#20292) | 10 个月前 | |
i18n workflow improvements and tweaks (#22586) * mobile button spacing * prevent console warning about div being descendant of p * ensure consistent spacing * add missing i18n keys * i18n fixes - add missing translations - fix dot notation keys * use plain string * add missing key * add i18next-cli commands for extraction and status also add false positives removal for several keys * add i18n key check step to PR workflow * formatting | 5 个月前 | |
Mobile UI/UX improvements (#23402) * increase camera group icon size on mobile add an animated slider when there is not enough space for all defined camera groups * change desktop and mobile edit camera groups icon to pencil and add desktop tooltip * apply safe area insets to mobile layout in PWA mode using viewport-fit=cover * adaptively size bottom bar nav targets to 48px when they fit, else compact icon size now targets the standardized 48×48px mobile touch target (Material Design 3 / Android 48dp bottom-nav minimum) | 2 个月前 | |
Miscellaneous fixes (#23394) * serialize OpenVINO inference per process to prevent concurrent-inference segfault * clean up * add max scaling meta to login page * add more detect section field messages * fix icon layout in settings field messages * tweak edit icon color | 2 个月前 | |
pin react-zoom-pan-pinch to 3.4.4 (same as 0.17.x) (#23818) | 1 个月前 | |
pin react-zoom-pan-pinch to 3.4.4 (same as 0.17.x) (#23818) | 1 个月前 | |
Fix linter and fix lint issues (#10141) | 2 年前 | |
Update webmanifest to use /BASE_PATH/ (#17310) | 1 年前 | |
Tweaks (#22965) * use ffmpeg to probe rtsp urls instead of cv2 cv2 is faster (no subprocess launch) and will continue to be used for recording segments * tweak faq * change unsaved color to orange avoids confusion with validation errors (red) * don't use any variant of orange as a profile color avoids confusion with unsaved changes * more unsaved color tweaks | 4 个月前 | |
Use new UI (#8983) * fixup build * swap frontends | 2 年前 | |
Use new UI (#8983) * fixup build * swap frontends | 2 年前 | |
Miscellaneous fixes (0.18 beta) (#23898) * update homekit docs * update dictionary * preserve function names in production builds adds only 162kb gzipped/450k unzipped to the bundle * margin tweak * fix maximum update depth exceeded when dragging the timeline handlebar Dragging the handlebar, especially quickly or with fast direction changes, could exceed React's nested update limit and unmount the whole app, leaving a blank screen. Motion search was worst affected. The drag loop committed a new time into React state on every animation frame. Edge auto-scrolling mutates scrollTop each iteration, so the value always differed and React's same-value bail-out never engaged, letting the update chain run to the limit of 50. Pace those commits to one per 100ms and flush the pending value on release, so the drop position is still exact. The handlebar position and label are written to the DOM directly and remain at frame rate. useUserInteraction dispatched state on every scroll and touchmove event; only commit on the leading edge. Motion search also passed fresh array literals for the timeline's events, motion events and unavailable ranges, giving the segment memo and the drag effect new dependencies on every render. Both views also passed an inline arrow for onHandlebarDraggingChange, which is an effect dependency that calls setState. * Verify motion search jobs belong to the requested camera * Apply persisted profile and runtime overrides before workers start Worker processes are handed a copy of the config when they start and only learn about later changes from the config_updater broadcast, which is plain ZMQ PUB/SUB with no queue, ack, or retained value, so a message published before a subscriber has connected is dropped and never re-sent. The persisted profile and the runtime camera toggles were restored only by that broadcast, at the very end of startup, so a worker that lost the race kept its yaml values for the rest of the session: audio detection kept running on a camera whose audio had been toggled off, even though /api/config, the UI, and the runtime state file all showed it disabled. Split both restores into a config half and a publish half. ProfileManager.restore_persisted_profile_to_config() and Dispatcher.reapply_runtime_state_to_config() now run right after init_profile_manager(), before the first worker starts, so every worker is handed a config that already carries both layers. ProfileManager.restore_persisted_profile() and Dispatcher.restore_runtime_state() still run at the end of startup: the recording, review, and embeddings processes start before the dispatcher exists, so the broadcast remains their only channel, and MQTT needs the retained switch states. Both config passes have to stay after init_profile_manager(), which snapshots the config as the no-profile base that deactivation resets to. * End timeline drags on touchcancel | 29 天前 |
This is the Frigate frontend which connects to and provides a User Interface to the Python backend.
Web Development
Installing Web Dependencies Via NPM
Within /web, run:
npm install
Running development frontend
Within /web, run:
PROXY_HOST=<ip_address:port> npm run dev
The Proxy Host can point to your existing Frigate instance. Otherwise defaults to localhost:5000 if running Frigate on the same machine.
Extensions
Install these IDE extensions for an improved development experience:
- eslint