Compare commits

...
21 Commits
Author SHA1 Message Date
Josh HawkinsandGitHub 4dcd2968b3 consolidate attribute filtering to match non-english and url encoded values (#22002)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
2026-02-14 08:33:17 -06:00
Nicolas MowenandGitHub 73c1e12faf Fix saving attributes for object to DB (#22000) 2026-02-14 07:40:08 -06:00
Josh HawkinsandGitHub 5f93cee732 fix tooltips (#21989)
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
2026-02-13 07:22:28 -06:00
67e3f8eefa Miscellaneous fixes (0.17 beta) (#21934)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
* improve chip tooltip display

- use formatList to use i18n separators instead of commas
- ensure the correct event type is used so sublabels are not run through normalization
- remove smart-capitalization classes as translated labels use i18n (which includes capitalization)
- give icons an optional key so that the console doesn't complain about duplication when rendering

* Add grace period for recording segment checks to prevent spurious ffmpeg restarts

* add admin precedence to proxy role_map resolution to prevent downgrade

* clean up

* formatting

* work around radix pointer events issue when dialog is opened from drawer

fixes https://github.com/blakeblackshear/frigate/discussions/21940

* prevent console warnings about missing titles and descriptions

make these invisible with sr-only

* remove duplicate language

* Adjust handling for device sizes

* Cleanup

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2026-02-12 13:42:08 -07:00
GuoQing LiuandGitHub e1005ac2a5 fix: fix object classification model not reload (#21982)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
2026-02-12 08:56:52 -07:00
6accc38275 Translated using Weblate (Norwegian Bokmål)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (651 of 651 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: OverTheHillsAndFarAway <prosjektx@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/nb_NO/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
ff20be58b4 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (54 of 54 strings)

Co-authored-by: GuoQing Liu <842607283@qq.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/zh_Hans/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
fc3f798bd6 Translated using Weblate (Swedish)
Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (217 of 217 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: bittin1ddc447d824349b2 <bittin@reimu.nl>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/sv/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
44e695362a Translated using Weblate (French)
Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (French)

Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (French)

Currently translated at 100.0% (217 of 217 strings)

Co-authored-by: Apocoloquintose <bertrand.moreux@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/fr/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
9fbc854bf5 Translated using Weblate (Polish)
Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (54 of 54 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kamil AvH <kamil.arszagi@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/pl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/pl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/pl/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
334acd6078 Translated using Weblate (Catalan)
Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (217 of 217 strings)

Co-authored-by: Eduardo Pastor Fernández <123eduardoneko123@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/ca/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/ca/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ca/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
Hosted WeblateNicolas MowenYusuke, Hirota <hirota.yusuke@jp.fujitsu.com>
92c503070c Translated using Weblate (Japanese)
Currently translated at 100.0% (98 of 98 strings)

Translated using Weblate (Japanese)

Currently translated at 99.2% (135 of 136 strings)

Translated using Weblate (Japanese)

Currently translated at 99.5% (216 of 217 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (54 of 54 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Yusuke, Hirota <hirota.yusuke@jp.fujitsu.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-live/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/ja/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-live
Translation: Frigate NVR/views-system
2026-02-07 10:42:52 -07:00
ecd7d04228 Translated using Weblate (Romanian)
Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (54 of 54 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: lukasig <lukasig@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/ro/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/ro/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ro/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
11576e9e68 Translated using Weblate (Estonian)
Currently translated at 29.4% (192 of 651 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Estonian)

Currently translated at 33.0% (45 of 136 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Priit Jõerüüt <jrthwlate@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/et/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/et/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/et/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
2cfb118981 Translated using Weblate (Danish)
Currently translated at 39.1% (196 of 501 strings)

Translated using Weblate (Danish)

Currently translated at 56.1% (55 of 98 strings)

Translated using Weblate (Danish)

Currently translated at 100.0% (217 of 217 strings)

Translated using Weblate (Danish)

Currently translated at 100.0% (25 of 25 strings)

Co-authored-by: Bjorn Jorgensen <github@bjornz.dk>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-player/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-live/da/
Translation: Frigate NVR/audio
Translation: Frigate NVR/common
Translation: Frigate NVR/components-player
Translation: Frigate NVR/views-live
2026-02-07 10:42:52 -07:00
e1c273be8d Translated using Weblate (German)
Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (German)

Currently translated at 100.0% (651 of 651 strings)

Translated using Weblate (German)

Currently translated at 100.0% (217 of 217 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Sebastian Sie <sebastian.neuplanitz@googlemail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/de/
Translation: Frigate NVR/common
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-02-07 10:42:52 -07:00
Josh HawkinsandGitHub ea1533f456 Miscellaneous Fixes (0.17 beta) (#21912)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / AMD64 Extra Build (push) Blocked by required conditions
* fix display of custom sublabels in review item chip

use "manual" as type so it's not run through translation and normalized, producing "Josh S Car" instead of "Josh's Car"

* use css instead of js for reviewed button hover state in filmstrip
2026-02-07 09:06:55 -07:00
Nicolas MowenandGitHub 41b983a133 Set log to debug (#21898)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
2026-02-05 12:31:07 -07:00
GuoQing LiuandGitHub c9055ea941 fix: fix delete zone type i18n (#21894)
CI / AMD64 Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / ARM Build (push) Waiting to run
2026-02-05 09:38:09 -06:00
Nicolas MowenandGitHub c9ba851f0d Fix event getting stuck due to only checking current clip / snapshot (#21893)
* Fix event getting stuck due to only checking current clip / snapshot

* formatting
2026-02-05 08:43:19 -06:00
Pops0nandGitHub a8ab82937b Update hailo installation instructions and script (#21882)
* Update installation.md for Raspberry Pi and Hailo

Updated Hailo installation instructions to cover both Bookworm and Trixie OS on Raspberry Pi. 


Referenced discussions: #21177, #20621, #20062, #19531

* Update user_installation.sh for Raspberry Pi (Bookworm and Trixie)

Simplified and improved the user installation script for  Hailo to support Raspberry Pi OS Bookworm, Trixie, and x86 platforms.

Referenced discussions: #21177, #20621, #20062, #19531

* Update installation.md

* Update user_installation.sh

* Update installation.md

* Update installation.md

Added optional fix for PCIe descriptor page size error.
Related discussion: #19481

* Update installation.md

Changed kernel driver version check from modinfo to /sys/module for correct post-reboot output
2026-02-05 06:38:34 -07:00
59 changed files with 956 additions and 250 deletions
+10 -5
View File
@@ -2,15 +2,19 @@
# Update package list and install dependencies
sudo apt-get update
sudo apt-get install -y build-essential cmake git wget
sudo apt-get install -y build-essential cmake git wget linux-headers-$(uname -r)
hailo_version="4.21.0"
arch=$(uname -m)
if [[ $arch == "x86_64" ]]; then
sudo apt install -y linux-headers-$(uname -r);
else
sudo apt install -y linux-modules-extra-$(uname -r);
if [[ $arch == "aarch64" ]]; then
source /etc/os-release
os_codename=$VERSION_CODENAME
echo "Detected OS codename: $os_codename"
fi
if [ "$os_codename" = "trixie" ]; then
sudo apt install -y dkms
fi
# Clone the HailoRT driver repository
@@ -47,3 +51,4 @@ sudo udevadm control --reload-rules && sudo udevadm trigger
echo "HailoRT driver installation complete."
echo "reboot your system to load the firmware!"
echo "Driver version: $(modinfo -F version hailo_pci)"
@@ -166,6 +166,10 @@ In this example:
- If no mapping matches, Frigate falls back to `default_role` if configured.
- If `role_map` is not defined, Frigate assumes the role header directly contains `admin`, `viewer`, or a custom role name.
**Note on matching semantics:**
- Admin precedence: if the `admin` mapping matches, Frigate resolves the session to `admin` to avoid accidental downgrade when a user belongs to multiple groups (for example both `admin` and `viewer` groups).
#### Port Considerations
**Authenticated Port (8971)**
+71 -16
View File
@@ -112,42 +112,65 @@ The Hailo-8 and Hailo-8L AI accelerators are available in both M.2 and HAT form
:::warning
The Raspberry Pi kernel includes an older version of the Hailo driver that is incompatible with Frigate. You **must** follow the installation steps below to install the correct driver version, and you **must** disable the built-in kernel driver as described in step 1.
On Raspberry Pi OS **Bookworm**, the kernel includes an older version of the Hailo driver that is incompatible with Frigate. You **must** follow the installation steps below to install the correct driver version, and you **must** disable the built-in kernel driver as described in step 1.
On Raspberry Pi OS **Trixie**, the Hailo driver is no longer shipped with the kernel. It is installed via DKMS, and the conflict described below does not apply. You can simply run the installation script.
:::
1. **Disable the built-in Hailo driver (Raspberry Pi only)**:
1. **Disable the built-in Hailo driver (Raspberry Pi Bookworm OS only)**:
:::note
If you are **not** using a Raspberry Pi, skip this step and proceed directly to step 2.
If you are **not** using a Raspberry Pi with **Bookworm OS**, skip this step and proceed directly to step 2.
If you are using Raspberry Pi with **Trixie OS**, also skip this step and proceed directly to step 2.
:::
If you are using a Raspberry Pi, you need to blacklist the built-in kernel Hailo driver to prevent conflicts. First, check if the driver is currently loaded:
First, check if the driver is currently loaded:
```bash
lsmod | grep hailo
```
If it shows `hailo_pci`, unload it:
```bash
sudo rmmod hailo_pci
sudo modprobe -r hailo_pci
```
Now blacklist the driver to prevent it from loading on boot:
Then locate the built-in kernel driver and rename it so it cannot be loaded.
Renaming allows the original driver to be restored later if needed.
First, locate the currently installed kernel module:
```bash
echo "blacklist hailo_pci" | sudo tee /etc/modprobe.d/blacklist-hailo_pci.conf
modinfo -n hailo_pci
```
Update initramfs to ensure the blacklist takes effect:
Example output:
```
/lib/modules/6.6.31+rpt-rpi-2712/kernel/drivers/media/pci/hailo/hailo_pci.ko.xz
```
Save the module path to a variable:
```bash
sudo update-initramfs -u
BUILTIN=$(modinfo -n hailo_pci)
```
And rename the module by appending .bak:
```bash
sudo mv "$BUILTIN" "${BUILTIN}.bak"
```
Now refresh the kernel module map so the system recognizes the change:
```bash
sudo depmod -a
```
Reboot your Raspberry Pi:
```bash
@@ -160,9 +183,9 @@ The Raspberry Pi kernel includes an older version of the Hailo driver that is in
lsmod | grep hailo
```
This command should return no results. If it still shows `hailo_pci`, the blacklist did not take effect properly and you may need to check for other Hailo packages installed via apt that are loading the driver.
This command should return no results.
2. **Run the installation script**:
3. **Run the installation script**:
Download the installation script:
@@ -190,7 +213,7 @@ The Raspberry Pi kernel includes an older version of the Hailo driver that is in
- Download and install the required firmware
- Set up udev rules
3. **Reboot your system**:
4. **Reboot your system**:
After the script completes successfully, reboot to load the firmware:
@@ -198,7 +221,7 @@ The Raspberry Pi kernel includes an older version of the Hailo driver that is in
sudo reboot
```
4. **Verify the installation**:
5. **Verify the installation**:
After rebooting, verify that the Hailo device is available:
@@ -212,6 +235,38 @@ The Raspberry Pi kernel includes an older version of the Hailo driver that is in
lsmod | grep hailo_pci
```
Verify the driver version:
```bash
cat /sys/module/hailo_pci/version
```
Verify that the firmware was installed correctly:
```bash
ls -l /lib/firmware/hailo/hailo8_fw.bin
```
**Optional: Fix PCIe descriptor page size error**
If you encounter the following error:
```
[HailoRT] [error] CHECK failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096
```
Create a configuration file to force the correct descriptor page size:
```bash
echo 'options hailo_pci force_desc_page_size=4096' | sudo tee /etc/modprobe.d/hailo_pci.conf
```
and reboot:
```bash
sudo reboot
```
#### Setup
To set up Frigate, follow the default installation instructions, for example: `ghcr.io/blakeblackshear/frigate:stable`
+11 -4
View File
@@ -439,10 +439,11 @@ def resolve_role(
Determine the effective role for a request based on proxy headers and configuration.
Order of resolution:
1. If a role header is defined in proxy_config.header_map.role:
- If a role_map is configured, treat the header as group claims
(split by proxy_config.separator) and map to roles.
- If no role_map is configured, treat the header as role names directly.
1. If a role header is defined in proxy_config.header_map.role:
- If a role_map is configured, treat the header as group claims
(split by proxy_config.separator) and map to roles.
Admin matches short-circuit to admin.
- If no role_map is configured, treat the header as role names directly.
2. If no valid role is found, return proxy_config.default_role if it's valid in config_roles, else 'viewer'.
Args:
@@ -492,6 +493,12 @@ def resolve_role(
}
logger.debug("Matched roles from role_map: %s", matched_roles)
# If admin matches, prioritize it to avoid accidental downgrade when
# users belong to both admin and lower-privilege groups.
if "admin" in matched_roles and "admin" in config_roles:
logger.debug("Resolved role (with role_map) to 'admin'.")
return "admin"
if matched_roles:
resolved = next(
(r for r in config_roles if r in matched_roles), validated_default
+26 -16
View File
@@ -69,6 +69,25 @@ logger = logging.getLogger(__name__)
router = APIRouter(tags=[Tags.events])
def _build_attribute_filter_clause(attributes: str):
filtered_attributes = [
attr.strip() for attr in attributes.split(",") if attr.strip()
]
attribute_clauses = []
for attr in filtered_attributes:
attribute_clauses.append(Event.data.cast("text") % f'*:"{attr}"*')
escaped_attr = json.dumps(attr, ensure_ascii=True)[1:-1]
if escaped_attr != attr:
attribute_clauses.append(Event.data.cast("text") % f'*:"{escaped_attr}"*')
if not attribute_clauses:
return None
return reduce(operator.or_, attribute_clauses)
@router.get(
"/events",
response_model=list[EventResponse],
@@ -193,14 +212,9 @@ def events(
if attributes != "all":
# Custom classification results are stored as data[model_name] = result_value
filtered_attributes = attributes.split(",")
attribute_clauses = []
for attr in filtered_attributes:
attribute_clauses.append(Event.data.cast("text") % f'*:"{attr}"*')
attribute_clause = reduce(operator.or_, attribute_clauses)
clauses.append(attribute_clause)
attribute_clause = _build_attribute_filter_clause(attributes)
if attribute_clause is not None:
clauses.append(attribute_clause)
if recognized_license_plate != "all":
filtered_recognized_license_plates = recognized_license_plate.split(",")
@@ -508,7 +522,7 @@ def events_search(
cameras = params.cameras
labels = params.labels
sub_labels = params.sub_labels
attributes = params.attributes
attributes = unquote(params.attributes)
zones = params.zones
after = params.after
before = params.before
@@ -607,13 +621,9 @@ def events_search(
if attributes != "all":
# Custom classification results are stored as data[model_name] = result_value
filtered_attributes = attributes.split(",")
attribute_clauses = []
for attr in filtered_attributes:
attribute_clauses.append(Event.data.cast("text") % f'*:"{attr}"*')
event_filters.append(reduce(operator.or_, attribute_clauses))
attribute_clause = _build_attribute_filter_clause(attributes)
if attribute_clause is not None:
event_filters.append(attribute_clause)
if zones != "all":
zone_clauses = []
@@ -601,7 +601,7 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
if consensus_label is not None:
camera = obj_data["camera"]
logger.info(
logger.debug(
f"{self.model_config.name}: Publishing sub_label={consensus_label} for {obj_data['label']} object {object_id} on {camera}"
)
@@ -658,6 +658,7 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
def handle_request(self, topic, request_data):
if topic == EmbeddingsRequestEnum.reload_classification_model.value:
if request_data.get("model_name") == self.model_config.name:
self.__build_detector()
logger.info(
f"Successfully loaded updated model for {self.model_config.name}"
)
+23
View File
@@ -6,6 +6,7 @@ from typing import Dict
from frigate.comms.events_updater import EventEndPublisher, EventUpdateSubscriber
from frigate.config import FrigateConfig
from frigate.config.classification import ObjectClassificationType
from frigate.events.types import EventStateEnum, EventTypeEnum
from frigate.models import Event
from frigate.util.builtin import to_relative_box
@@ -15,6 +16,16 @@ logger = logging.getLogger(__name__)
def should_update_db(prev_event: Event, current_event: Event) -> bool:
"""If current_event has updated fields and (clip or snapshot)."""
# If event is ending and was previously saved, always update to set end_time
# This ensures events are properly ended even when alerts/detections are disabled
# mid-event (which can cause has_clip/has_snapshot to become False)
if (
prev_event["end_time"] is None
and current_event["end_time"] is not None
and (prev_event["has_clip"] or prev_event["has_snapshot"])
):
return True
if current_event["has_clip"] or current_event["has_snapshot"]:
# if this is the first time has_clip or has_snapshot turned true
if not prev_event["has_clip"] and not prev_event["has_snapshot"]:
@@ -237,6 +248,18 @@ class EventProcessor(threading.Thread):
"recognized_license_plate"
][1]
# only overwrite attribute-type custom model fields in the database if they're set
for name, model_config in self.config.classification.custom.items():
if (
model_config.object_config
and model_config.object_config.classification_type
== ObjectClassificationType.attribute
):
value = event_data.get(name)
if value is not None:
event[Event.data][name] = value[0]
event[Event.data][f"{name}_score"] = value[1]
(
Event.insert(event)
.on_conflict(
+51
View File
@@ -168,6 +168,57 @@ class TestHttpApp(BaseTestHttp):
assert events[0]["id"] == id
assert events[1]["id"] == id2
def test_get_event_list_match_multilingual_attribute(self):
event_id = "123456.zh"
attribute = "中文标签"
with AuthTestClient(self.app) as client:
super().insert_mock_event(event_id, data={"custom_attr": attribute})
events = client.get("/events", params={"attributes": attribute}).json()
assert len(events) == 1
assert events[0]["id"] == event_id
events = client.get(
"/events", params={"attributes": "%E4%B8%AD%E6%96%87%E6%A0%87%E7%AD%BE"}
).json()
assert len(events) == 1
assert events[0]["id"] == event_id
def test_events_search_match_multilingual_attribute(self):
event_id = "123456.zh.search"
attribute = "中文标签"
mock_embeddings = Mock()
mock_embeddings.search_thumbnail.return_value = [(event_id, 0.05)]
self.app.frigate_config.semantic_search.enabled = True
self.app.embeddings = mock_embeddings
with AuthTestClient(self.app) as client:
super().insert_mock_event(event_id, data={"custom_attr": attribute})
events = client.get(
"/events/search",
params={
"search_type": "similarity",
"event_id": event_id,
"attributes": attribute,
},
).json()
assert len(events) == 1
assert events[0]["id"] == event_id
events = client.get(
"/events/search",
params={
"search_type": "similarity",
"event_id": event_id,
"attributes": "%E4%B8%AD%E6%96%87%E6%A0%87%E7%AD%BE",
},
).json()
assert len(events) == 1
assert events[0]["id"] == event_id
def test_get_good_event(self):
id = "123456.random"
+15
View File
@@ -31,6 +31,21 @@ class TestProxyRoleResolution(unittest.TestCase):
role = resolve_role(headers, self.proxy_config, self.config_roles)
self.assertEqual(role, "admin")
def test_role_map_or_matching(self):
config = self.proxy_config
config.header_map.role_map = {
"admin": ["group_admin", "group_privileged"],
}
# OR semantics: a single matching group should map to the role
headers = {"x-remote-role": "group_admin"}
role = resolve_role(headers, config, self.config_roles)
self.assertEqual(role, "admin")
headers = {"x-remote-role": "group_admin|group_privileged"}
role = resolve_role(headers, config, self.config_roles)
self.assertEqual(role, "admin")
def test_direct_role_header_with_separator(self):
config = self.proxy_config
config.header_map.role_map = None # disable role_map
+10 -1
View File
@@ -33,6 +33,7 @@ from frigate.config.camera.updater import (
CameraConfigUpdateEnum,
CameraConfigUpdateSubscriber,
)
from frigate.config.classification import ObjectClassificationType
from frigate.const import (
FAST_QUEUE_TIMEOUT,
UPDATE_CAMERA_ACTIVITY,
@@ -759,8 +760,16 @@ class TrackedObjectProcessor(threading.Thread):
self.update_mqtt_motion(camera, frame_time, motion_boxes)
attribute_model_names = [
name
for name, model_config in self.config.classification.custom.items()
if model_config.object_config
and model_config.object_config.classification_type
== ObjectClassificationType.attribute
]
tracked_objects = [
o.to_dict() for o in camera_state.tracked_objects.values()
o.to_dict(attribute_model_names=attribute_model_names)
for o in camera_state.tracked_objects.values()
]
# publish info on this frame
+9 -1
View File
@@ -376,7 +376,10 @@ class TrackedObject:
)
return (thumb_update, significant_change, path_update, autotracker_update)
def to_dict(self) -> dict[str, Any]:
def to_dict(
self,
attribute_model_names: list[str] | None = None,
) -> dict[str, Any]:
event = {
"id": self.obj_data["id"],
"camera": self.camera_config.name,
@@ -411,6 +414,11 @@ class TrackedObject:
"path_data": self.path_data.copy(),
"recognized_license_plate": self.obj_data.get("recognized_license_plate"),
}
if attribute_model_names is not None:
for name in attribute_model_names:
value = self.obj_data.get(name)
if value is not None:
event[name] = value
return event
+21 -3
View File
@@ -214,6 +214,7 @@ class CameraWatchdog(threading.Thread):
self.latest_valid_segment_time: float = 0
self.latest_invalid_segment_time: float = 0
self.latest_cache_segment_time: float = 0
self.record_enable_time: datetime | None = None
def _update_enabled_state(self) -> bool:
"""Fetch the latest config and update enabled state."""
@@ -261,6 +262,9 @@ class CameraWatchdog(threading.Thread):
def run(self) -> None:
if self._update_enabled_state():
self.start_all_ffmpeg()
# If recording is enabled at startup, set the grace period timer
if self.config.record.enabled:
self.record_enable_time = datetime.now().astimezone(timezone.utc)
time.sleep(self.sleeptime)
while not self.stop_event.wait(self.sleeptime):
@@ -270,13 +274,15 @@ class CameraWatchdog(threading.Thread):
self.logger.debug(f"Enabling camera {self.config.name}")
self.start_all_ffmpeg()
# reset all timestamps
# reset all timestamps and record the enable time for grace period
self.latest_valid_segment_time = 0
self.latest_invalid_segment_time = 0
self.latest_cache_segment_time = 0
self.record_enable_time = datetime.now().astimezone(timezone.utc)
else:
self.logger.debug(f"Disabling camera {self.config.name}")
self.stop_all_ffmpeg()
self.record_enable_time = None
# update camera status
self.requestor.send_data(
@@ -361,6 +367,12 @@ class CameraWatchdog(threading.Thread):
if self.config.record.enabled and "record" in p["roles"]:
now_utc = datetime.now().astimezone(timezone.utc)
# Check if we're within the grace period after enabling recording
# Grace period: 90 seconds allows time for ffmpeg to start and create first segment
in_grace_period = self.record_enable_time is not None and (
now_utc - self.record_enable_time
) < timedelta(seconds=90)
latest_cache_dt = (
datetime.fromtimestamp(
self.latest_cache_segment_time, tz=timezone.utc
@@ -386,10 +398,16 @@ class CameraWatchdog(threading.Thread):
)
# ensure segments are still being created and that they have valid video data
cache_stale = now_utc > (latest_cache_dt + timedelta(seconds=120))
valid_stale = now_utc > (latest_valid_dt + timedelta(seconds=120))
# Skip checks during grace period to allow segments to start being created
cache_stale = not in_grace_period and now_utc > (
latest_cache_dt + timedelta(seconds=120)
)
valid_stale = not in_grace_period and now_utc > (
latest_valid_dt + timedelta(seconds=120)
)
invalid_stale_condition = (
self.latest_invalid_segment_time > 0
and not in_grace_period
and now_utc > (latest_invalid_dt + timedelta(seconds=120))
and self.latest_valid_segment_time
<= self.latest_invalid_segment_time
+2 -1
View File
@@ -48,7 +48,8 @@
"bg": "Български (Búlgar)",
"gl": "Galego (Gallec)",
"id": "Bahasa Indonesia (Indonesi)",
"ur": "اردو (Urdú)"
"ur": "اردو (Urdú)",
"hr": "Hrvatski (croat)"
},
"system": "Sistema",
"systemMetrics": "Mètriques del sistema",
+2 -1
View File
@@ -19,7 +19,8 @@
"description": {
"addFace": "Afegiu una col·lecció nova a la biblioteca de cares pujant la vostra primera imatge.",
"placeholder": "Introduïu un nom per a aquesta col·lecció",
"invalidName": "Nom no vàlid. Els noms només poden incloure lletres, números, espais, apòstrofs, guions baixos i guions."
"invalidName": "Nom no vàlid. Els noms només poden incloure lletres, números, espais, apòstrofs, guions baixos i guions.",
"nameCannotContainHash": "El nom no pot contenir #."
},
"documentTitle": "Biblioteca de rostres - Frigate",
"uploadFaceImage": {
+1 -1
View File
@@ -532,7 +532,7 @@
"hide": "Amaga contrasenya",
"requirements": {
"title": "Requisits contrasenya:",
"length": "Com a mínim 8 carácters",
"length": "Com a mínim 12 carácters",
"uppercase": "Com a mínim una majúscula",
"digit": "Com a mínim un digit",
"special": "Com a mínim un carácter especial (!@#$%^&*(),.?\":{}|<>)"
+2 -2
View File
@@ -27,7 +27,7 @@
"harp": "Harpe",
"bell": "Klokke",
"harmonica": "Harmonika",
"bagpipes": "Sækkepibe",
"bagpipes": "Sækkepiber",
"didgeridoo": "Didgeridoo",
"jazz": "Jazz",
"opera": "Opera",
@@ -78,7 +78,7 @@
"camera": "Kamera",
"tools": "Værktøj",
"hammer": "Hammer",
"drill": "Bore",
"drill": "Boremaskine",
"explosion": "Eksplosion",
"fireworks": "Nytårskrudt",
"babbling": "Pludren",
+11 -10
View File
@@ -193,7 +193,8 @@
"bg": "Български (Bulgarsk)",
"gl": "Galego (Galisisk)",
"id": "Bahasa Indonesia (Indonesisk)",
"ur": "اردو (Urdu)"
"ur": "اردو (Urdu)",
"hr": "Hrvatski (Kroatisk)"
},
"appearance": "Udseende",
"darkMode": {
@@ -221,7 +222,7 @@
},
"restart": "Genstart Frigate",
"live": {
"title": "Live",
"title": "Direkte",
"allCameras": "Alle kameraer",
"cameras": {
"title": "Kameraer",
@@ -240,17 +241,17 @@
"current": "Aktiv bruger: {{user}}",
"anonymous": "anonym",
"logout": "Log ud",
"setPassword": "Set Password"
"setPassword": "Vælg kodeord"
},
"classification": "Kategorisering"
},
"toast": {
"copyUrlToClipboard": "Kopieret URL til klippebord.",
"copyUrlToClipboard": "Kopieret URL til udklipsholder.",
"save": {
"title": "Gem",
"error": {
"title": "Ændringer kan ikke gemmes: {{errorMessage}}",
"noMessage": "Kan ikke gemme konfigurationsændringer"
"title": "Ændringer kunne ikke gemmes: {{errorMessage}}",
"noMessage": "Kunne ikke gemme konfigurationsændringer"
}
}
},
@@ -261,7 +262,7 @@
"desc": "Admins har fuld adgang til Frigate UI. Viewers er begrænset til at se kameraer, gennemse items, og historik i UI."
},
"pagination": {
"label": "paginering",
"label": "sideinddeling",
"previous": {
"title": "Forrige",
"label": "Gå til forrige side"
@@ -273,9 +274,9 @@
"more": "Flere sider"
},
"accessDenied": {
"documentTitle": "Adgang forbudt - Frigate",
"title": "Adgang forbudt",
"desc": "Du har ikke tiiladelse til at se denne side."
"documentTitle": "Adgang nægtet - Frigate",
"title": "Adgang nægtet",
"desc": "Du har ikke rettigheder til at se denne side."
},
"notFound": {
"documentTitle": "Ikke fundet - Frigate",
+19 -6
View File
@@ -4,13 +4,13 @@
"cameraDisabled": "Kamera er deaktiveret",
"noPreviewFoundFor": "Ingen forhåndsvisning fundet for {{cameraName}}",
"submitFrigatePlus": {
"title": "Indsend denne frame til Frigate+?",
"title": "Indsend dette billede til Frigate+?",
"submit": "Indsend"
},
"livePlayerRequiredIOSVersion": "iOS 17.1 eller nyere kræves for denne type livestream.",
"streamOffline": {
"title": "Stream offline",
"desc": "Der er ikke modtaget nogen frames på {{cameraName}}-<code>detect</code>-streamen, tjek fejlloggene."
"desc": "Der er ikke modtaget nogen billeder på {{cameraName}}-<code>detect</code>-streamen, tjek fejllogs."
},
"stats": {
"streamType": {
@@ -18,8 +18,8 @@
"short": "Type"
},
"bandwidth": {
"title": "Bandbredde:",
"short": "Bandbredde"
"title": "Båndbredde:",
"short": "Båndbredde"
},
"latency": {
"title": "Latenstid:",
@@ -31,8 +31,21 @@
},
"droppedFrames": {
"short": {
"title": "Tabt"
}
"title": "Tabt",
"value": "{{droppedFrames}} billeder"
},
"title": "Tabte billeder:"
},
"totalFrames": "Antal billeder i alt:",
"decodedFrames": "Dekodede billeder:",
"droppedFrameRate": "Rate for tabte billeder:"
},
"toast": {
"success": {
"submittedFrigatePlus": "Billede sendt til Frigate+"
},
"error": {
"submitFrigatePlusFailed": "Kunne ikke sende billede til Frigate+"
}
}
}
+98 -2
View File
@@ -14,8 +14,104 @@
"move": {
"clickMove": {
"label": "Klik i billedrammen for at centrere kameraet",
"enable": "Aktivér klik for at flytte"
"enable": "Aktivér klik for at flytte",
"disable": "Deaktiver klik for at flytte"
},
"left": {
"label": "Flyt PTZ-kameraet til venstre"
},
"up": {
"label": "Flyt PTZ kamera op"
},
"down": {
"label": "Flyt PTZ-kameraet ned"
},
"right": {
"label": "Flyt PTZ-kameraet til højre"
}
}
},
"zoom": {
"in": {
"label": "Zoom PTZ-kamera ind"
},
"out": {
"label": "Zoom PTZ kamera ud"
}
},
"focus": {
"in": {
"label": "Focus PTZ kamera ind"
},
"out": {
"label": "Focus PTZ kamera ud"
}
},
"frame": {
"center": {
"label": "Klik på billedet for at centrere PTZ-kameraet"
}
},
"presets": "PTZ kamera forudindstillinger"
},
"camera": {
"enable": "Aktivér kamera",
"disable": "Deaktivér kamera"
},
"muteCameras": {
"enable": "Slå lyd på alle kameraer fra",
"disable": "Slå lyd på alle kameraer til"
},
"detect": {
"enable": "Aktiver detektering",
"disable": "Deaktiver detektering"
},
"recording": {
"enable": "Aktivér optagelse",
"disable": "Deaktiver optagelse"
},
"snapshots": {
"enable": "Aktivér Snapshots",
"disable": "Deaktivér Snapshots"
},
"snapshot": {
"takeSnapshot": "Hent instant snapshot",
"noVideoSource": "Ingen videokilde til snapshot.",
"captureFailed": "Kunne ikke tage snapshot.",
"downloadStarted": "Hentning af snapshot startet."
},
"audioDetect": {
"enable": "Aktiver lyddetektor",
"disable": "Deaktiver lyddetektor"
},
"transcription": {
"enable": "Aktiver Live Audio Transkription",
"disable": "Deaktiver Live Audio Transkription"
},
"autotracking": {
"enable": "Aktiver Autotracking",
"disable": "Deaktiver Autotracking"
},
"streamStats": {
"enable": "Vis Stream statistik",
"disable": "Skjul Stream statistik"
},
"manualRecording": {
"title": "Manuel optagelse",
"tips": "Hent et øjebliksbillede eller start en manuel begivenhed baseret på dette kameras indstillinger for optagelse af opbevaring.",
"playInBackground": {
"label": "Afspil i baggrunden",
"desc": "Aktiver denne mulighed for at fortsætte streaming, når afspilleren er skjult."
},
"showStats": {
"label": "Vis statistik",
"desc": "Aktiver denne mulighed for at vise streamstatistikker som en overlejring på kameraets feed."
},
"debugView": "Debug View",
"start": "Start on-demand optagelse",
"started": "Start manuel optagelse.",
"failedToStart": "Manuel optagelse fejlede.",
"recordDisabledTips": "Da optagelsen er deaktiveret eller begrænset i konfig for dette kamera, gemmes der kun et snapshot.",
"end": "Afslut manuel optagelse",
"ended": "Afsluttet manuel optagelse."
}
}
+2 -1
View File
@@ -179,7 +179,8 @@
"lt": "Lietuvių (Litauisch)",
"bg": "Български (bulgarisch)",
"gl": "Galego (Galicisch)",
"id": "Bahasa Indonesia (Indonesisch)"
"id": "Bahasa Indonesia (Indonesisch)",
"hr": "Hrvatski (Kroatisch)"
},
"appearance": "Erscheinung",
"theme": {
+2 -1
View File
@@ -2,7 +2,8 @@
"description": {
"placeholder": "Gib einen Name für diese Kollektion ein",
"addFace": "Füge der Gesichtsbibliothek eine neue Sammlung hinzu, indem du ein Bild hochlädst.",
"invalidName": "Ungültiger Name. Namen dürfen nur Buchstaben, Zahlen, Leerzeichen, Apostrophe, Unterstriche und Bindestriche enthalten."
"invalidName": "Ungültiger Name. Namen dürfen nur Buchstaben, Zahlen, Leerzeichen, Apostrophe, Unterstriche und Bindestriche enthalten.",
"nameCannotContainHash": "Der Name darf keine # enthalten."
},
"details": {
"person": "Person",
+1 -1
View File
@@ -544,7 +544,7 @@
"placeholder": "Passwort eingeben",
"requirements": {
"title": "Passwort Anforderungen:",
"length": "Mindestens 8 Zeichen",
"length": "Mindestens 12 Zeichen",
"uppercase": "Mindestens ein Großbuchstabe",
"digit": "Mindestens eine Ziffer",
"special": "Mindestens ein Sonderzeichen (!@#$%^&*(),.?\":{}|<>)"
@@ -1,6 +1,7 @@
{
"restart": {
"title": "Are you sure you want to restart Frigate?",
"description": "This will briefly stop Frigate while it restarts.",
"button": "Restart",
"restarting": {
"title": "Frigate is Restarting",
@@ -468,6 +468,11 @@
}
},
"polygonDrawing": {
"type": {
"zone": "zone",
"motion_mask": "motion mask",
"object_mask": "object mask"
},
"removeLastPoint": "Remove last point",
"reset": {
"label": "Clear all points"
+2 -1
View File
@@ -139,7 +139,8 @@
"bg": "Български (bulgaaria keel)",
"gl": "Galego (galeegi keel)",
"id": "Bahasa Indonesia (indoneesia keel)",
"ur": "اردو (urdu keel)"
"ur": "اردو (urdu keel)",
"hr": "Hrvatski (horvaadi keel)"
},
"system": "Süsteem",
"systemMetrics": "Süsteemi meetrika",
+17 -4
View File
@@ -30,11 +30,21 @@
"stationary": "{{label}} jäi paigale",
"active": "{{label}} muutus aktiivseks",
"entered_zone": "{{label}} sisenes tsooni {{zones}}",
"visible": "{{label}} on tuvastatud"
"visible": "{{label}} on tuvastatud",
"header": {
"zones": "Tsoonid",
"ratio": "Suhtarv",
"area": "Ala",
"score": "Punktiskoor"
}
},
"title": "Jälgimise üksikasjad",
"noImageFound": "Selle ajatempli kohta ei leidu pilti.",
"createObjectMask": "Loo objektimask"
"createObjectMask": "Loo objektimask",
"carousel": {
"previous": "Eelmine slaid",
"next": "Järgmine slaid"
}
},
"documentTitle": "Avasta - Frigate",
"generativeAI": "Generatiivne tehisaru",
@@ -63,12 +73,15 @@
"tips": {
"mismatch_one": "Tuvastasin {{count}} võõra objekti ja need on lisatud ülevaatamiseks. Need objektid kas ei ole piisavad häire või tuvastamise jaoks, aga ka võivad juba olla eemaldatud või kustutatud.",
"mismatch_other": "Tuvastasin {{count}} võõrast objekti ja need on lisatud ülevaatamiseks. Need objektid kas ei ole piisavad häire või tuvastamise jaoks, aga ka võivad juba olla eemaldatud või kustutatud."
}
},
"title": "Vaata objekti üksikasju",
"desc": "Vaata objekti üksikasju"
},
"snapshotScore": {
"label": "Hetkvõttete punktiskoor"
},
"regenerateFromSnapshot": "Loo uuesti hetkvõttest",
"timestamp": "Ajatampel"
}
},
"trackedObjectDetails": "Jälgitava objekti üksikasjad"
}
+241 -11
View File
@@ -4,10 +4,23 @@
"password": "Salasõna",
"passwordPlaceholder": "Valikuline",
"customUrlPlaceholder": "rtsp://kasutajanimi:salasõna@host:port/asukoht",
"connectionSettings": "Ühenduse seadistused"
"connectionSettings": "Ühenduse seadistused",
"port": "Port",
"username": "Kasutajanimi",
"usernamePlaceholder": "Valikuline"
},
"step3": {
"streamUrlPlaceholder": "rtsp://kasutajanimi:salasõna@host:port/asukoht"
"streamUrlPlaceholder": "rtsp://kasutajanimi:salasõna@host:port/asukoht",
"url": "Võrguaadress",
"resolution": "Resolutsioon",
"quality": "Kvaliteet",
"roles": "Rollid",
"roleLabels": {
"record": "Salvestamine",
"audio": "Heliriba"
},
"connected": "Ühendatud",
"featuresTitle": "Funktsionaalsused"
},
"steps": {
"probeOrSnapshot": "Võta proov või tee hetkvõte"
@@ -15,7 +28,34 @@
"step2": {
"testing": {
"fetchingSnapshot": "Laadin kaamera hetkvõtet alla..."
}
},
"retry": "Proovi uuesti",
"manufacturer": "Tootja",
"model": "Mudel",
"firmware": "Püsivara",
"profiles": "Profiilid",
"presets": "Eelseadistused",
"useCandidate": "Kasuta",
"uriCopy": "Kopeeri",
"connected": "Ühendatud"
},
"testResultLabels": {
"resolution": "Resolutsioon",
"video": "Video",
"audio": "Heliriba",
"fps": "Kaadrisagedus"
},
"step4": {
"reload": "Laadi uuesti",
"connecting": "Ühendan…",
"valid": "Kehtiv",
"failed": "Ebaõnnestunud",
"connectStream": "Ühenda",
"connectingStream": "Ühendan",
"disconnectStream": "Katkesta ühendus",
"roles": "Rollid",
"none": "Määramata",
"error": "Viga"
}
},
"users": {
@@ -29,7 +69,10 @@
}
},
"table": {
"password": "Lähtesta salasõna"
"password": "Lähtesta salasõna",
"username": "Kasutajanimi",
"actions": "Tegevused",
"role": "Roll"
},
"dialog": {
"form": {
@@ -53,7 +96,7 @@
"hide": "Peida salasõna",
"requirements": {
"title": "Salasõna reeglid:",
"length": "Vähemalt 8 tähemärki",
"length": "Vähemalt 12 tähemärki",
"uppercase": "Vähemalt üks suurtäht",
"digit": "Vähemalt üks number",
"special": "Vähemalt üks erimärk (!@#$%^&*(),.?\":{}|<>)"
@@ -70,6 +113,9 @@
"currentPassword": {
"title": "Senine salasõna",
"placeholder": "Sisesta oma senine salasõna"
},
"user": {
"title": "Kasutajanimi"
}
},
"createUser": {
@@ -84,12 +130,42 @@
"currentPasswordRequired": "Senine salasõna on vajalik",
"incorrectCurrentPassword": "Senine salasõna pole õige",
"passwordVerificationFailed": "Salasõna kontrollimine ei õnnestunud"
},
"changeRole": {
"roleInfo": {
"admin": "Peakasutaja",
"viewer": "Vaataja"
}
}
}
},
"title": "Kasutajad"
},
"debug": {
"boundingBoxes": {
"desc": "Näita jälgitavate objektide ümber märgiskaste"
},
"title": "Silumine ja veaotsing",
"debugging": "Veaotsing ja silumine",
"audio": {
"title": "Heliriba",
"score": "punktiskoor"
},
"timestamp": {
"title": "Ajatempel"
},
"zones": {
"title": "Tsoonid"
},
"regions": {
"title": "Alad"
},
"paths": {
"title": "Asukohad"
},
"objectShapeFilterDrawing": {
"score": "Punktiskoor",
"ratio": "Suhtarv",
"area": "Ala"
}
},
"documentTitle": {
@@ -113,10 +189,31 @@
"automaticLiveView": {
"label": "Automaatne otseülekande vaade"
}
},
"calendar": {
"title": "Kalender",
"firstWeekday": {
"sunday": "Pühapäev",
"monday": "Esmaspäev",
"label": "Esimene nädalapäev"
}
},
"storedLayouts": {
"title": "Salvestatud paigutused"
},
"recordingsViewer": {
"title": "Salvestuste vaataja"
}
},
"cameraManagement": {
"backToSettings": "Tagasi kaameraseadistuste juurde"
"backToSettings": "Tagasi kaameraseadistuste juurde",
"cameraConfig": {
"enabled": "Kasutusel",
"ffmpeg": {
"pathPlaceholder": "rtsp://...",
"roles": "Rollid"
}
}
},
"notification": {
"notificationSettings": {
@@ -130,6 +227,16 @@
"success": {
"settingSaved": "Teavituste seadistused on salvestatud."
}
},
"title": "Teavitused",
"email": {
"title": "E-post"
},
"cameras": {
"title": "Kaamerad"
},
"suspendTime": {
"suspend": "Peata arvuti töö"
}
},
"frigatePlus": {
@@ -145,20 +252,48 @@
"cleanCopySnapshots": "<code>clean_copy</code> Hetkvõtted",
"camera": "Kaamera"
}
},
"modelInfo": {
"plusModelType": {
"userModel": "Peenhäälestatud"
},
"cameras": "Kaamerad"
}
},
"masksAndZones": {
"zones": {
"point_one": "{{count}} punkt",
"point_other": "{{count}} punkti"
"point_other": "{{count}} punkti",
"label": "Tsoonid",
"desc": {
"documentation": "Dokumentatsioon"
},
"name": {
"title": "Nimi"
},
"inertia": {
"title": "Inerts"
},
"objects": {
"title": "Objektid"
}
},
"motionMasks": {
"point_one": "{{count}} punkt",
"point_other": "{{count}} punkti"
"point_other": "{{count}} punkti",
"desc": {
"documentation": "Dokumentatsioon"
}
},
"objectMasks": {
"point_one": "{{count}} punkt",
"point_other": "{{count}} punkti"
"point_other": "{{count}} punkti",
"desc": {
"documentation": "Dokumentatsioon"
},
"objects": {
"title": "Objektid"
}
}
},
"roles": {
@@ -167,6 +302,21 @@
"userRolesUpdated_one": "{{count}} selle rolliga kasutaja on nüüd määratud Vaatajaks, kellel on ligipääs kõikidele kaameratele.",
"userRolesUpdated_other": "{{count}} selle rolliga kasutajat on nüüd määratud Vaatajaks, kellel on ligipääs kõikidele kaameratele."
}
},
"table": {
"role": "Roll",
"cameras": "Kaamerad",
"actions": "Tegevused"
},
"dialog": {
"deleteRole": {
"deleting": "Kustutan..."
},
"form": {
"cameras": {
"title": "Kaamerad"
}
}
}
},
"menu": {
@@ -178,7 +328,8 @@
"users": "Kasutajad",
"roles": "Rollid",
"notifications": "Teavitused",
"frigateplus": "Frigate+"
"frigateplus": "Frigate+",
"cameraReview": "Ülevaatamine"
},
"dialog": {
"unsavedChanges": {
@@ -189,5 +340,84 @@
"cameraSetting": {
"camera": "Kaamera",
"noCamera": "Kaamerat pole"
},
"enrichments": {
"semanticSearch": {
"reindexNow": {
"confirmButton": "Indekseeri uuesti",
"label": "Indekseeri uuesti kohe"
},
"modelSize": {
"small": {
"title": "väike"
},
"large": {
"title": "suur"
}
},
"title": "Semantiline otsing"
},
"faceRecognition": {
"modelSize": {
"small": {
"title": "väike"
},
"large": {
"title": "suur"
}
}
},
"birdClassification": {
"title": "Lindude klassifikatsioon"
}
},
"cameraReview": {
"review": {
"title": "Ülevaatamine",
"alerts": "Hoiatused ",
"detections": "Tuvastamise tulemused "
}
},
"motionDetectionTuner": {
"Threshold": {
"title": "Lävi"
}
},
"triggers": {
"documentTitle": "Päästikud",
"management": {
"title": "Päästikud"
},
"table": {
"name": "Nimi",
"type": "Tüüp",
"content": "Sisu",
"threshold": "Lävi",
"actions": "Tegevused",
"edit": "Muuda"
},
"type": {
"thumbnail": "Pisipilt",
"description": "Kirjeldus"
},
"dialog": {
"form": {
"name": {
"title": "Nimi"
},
"type": {
"title": "Tüüp"
},
"content": {
"title": "Sisu"
},
"threshold": {
"title": "Lävi"
},
"actions": {
"title": "Tegevused"
}
}
}
}
}
+2 -1
View File
@@ -175,7 +175,8 @@
"bg": "Български (Bulgare)",
"gl": "Galego (Galicien)",
"id": "Bahasa Indonesia (Indonésien)",
"ur": "اردو (Ourdou)"
"ur": "اردو (Ourdou)",
"hr": "Hrvatski (Croate)"
},
"appearance": "Apparence",
"darkMode": {
+2 -1
View File
@@ -2,7 +2,8 @@
"description": {
"addFace": "Ajoutez une nouvelle collection à la bibliothèque de visages en téléversant votre première image.",
"placeholder": "Saisissez un nom pour cette collection.",
"invalidName": "Nom invalide. Les noms ne peuvent contenir que des lettres, des chiffres, des espaces, des apostrophes, des traits de soulignement et des tirets."
"invalidName": "Nom invalide. Les noms ne peuvent contenir que des lettres, des chiffres, des espaces, des apostrophes, des traits de soulignement et des tirets.",
"nameCannotContainHash": "Le nom ne peut pas contenir le caractère #."
},
"details": {
"person": "Personne",
+1 -1
View File
@@ -649,7 +649,7 @@
"hide": "Masquer le mot de passe",
"requirements": {
"title": "Critères du mot de passe :",
"length": "Au moins 8 caractères",
"length": "Au moins 12 caractères",
"uppercase": "Au moins une lettre majuscule",
"digit": "Au moins un chiffre",
"special": "Au moins un caractère spécial (!@#$%^&*(),.?\":{}|<>)"
+4 -2
View File
@@ -69,7 +69,8 @@
},
"inProgress": "処理中",
"invalidStartTime": "開始時刻が無効です",
"invalidEndTime": "終了時刻が無効です"
"invalidEndTime": "終了時刻が無効です",
"never": "なし"
},
"readTheDocumentation": "ドキュメントを見る",
"unit": {
@@ -232,7 +233,8 @@
"ur": "اردو (ウルドゥー語)",
"withSystem": {
"label": "システム設定に従う"
}
},
"hr": "Hrvatski (クロアチア語)"
},
"classification": "分類"
},
+2 -1
View File
@@ -2,7 +2,8 @@
"description": {
"placeholder": "このコレクションの名前を入力",
"addFace": "最初の画像をアップロードして、フェイスライブラリに新しいコレクションを追加してください。",
"invalidName": "無効な名前です。使用できるのは、英数字、空白、アポストロフィ、アンダースコア、ハイフンのみです。"
"invalidName": "無効な名前です。使用できるのは、英数字、空白、アポストロフィ、アンダースコア、ハイフンのみです。",
"nameCannotContainHash": "名前に # は使用できません。"
},
"details": {
"person": "人物",
+10
View File
@@ -176,6 +176,16 @@
"restricted": {
"title": "利用可能なカメラがありません",
"description": "このグループ内のカメラを表示する権限がありません。"
},
"default": {
"title": "設定済みのカメラがありません",
"description": "Frigate にカメラを接続して開始しましょう。",
"buttonText": "カメラを追加"
},
"group": {
"title": "このグループにカメラがありません",
"description": "このカメラグループには、割り当て済みまたは有効なカメラがありません。",
"buttonText": "グループを管理"
}
},
"snapshot": {
+7 -1
View File
@@ -86,7 +86,13 @@
"otherProcesses": {
"title": "その他のプロセス",
"processCpuUsage": "プロセスの CPU 使用率",
"processMemoryUsage": "プロセスのメモリ使用量"
"processMemoryUsage": "プロセスのメモリ使用量",
"series": {
"recording": "録画",
"review_segment": "レビューセグメント",
"audio_detector": "音声検知",
"go2rtc": "go2rtc"
}
}
},
"storage": {
+2 -1
View File
@@ -203,7 +203,8 @@
"bg": "Български (Bulgarsk)",
"gl": "Galego (Galisisk)",
"id": "Bahasa Indonesia (Indonesisk)",
"ur": "اردو (Urdu)"
"ur": "اردو (Urdu)",
"hr": "Hrvatski (Kroatisk)"
},
"appearance": "Utseende",
"darkMode": {
@@ -3,7 +3,8 @@
"description": {
"addFace": "Legg til en ny samling i ansiktsbiblioteket ved å laste opp ditt første bilde.",
"placeholder": "Skriv inn et navn for denne samlingen",
"invalidName": "Ugyldig navn. Navn kan kun inneholde bokstaver, tall, mellomrom, apostrof, understrek og bindestrek."
"invalidName": "Ugyldig navn. Navn kan kun inneholde bokstaver, tall, mellomrom, apostrof, understrek og bindestrek.",
"nameCannotContainHash": "Navn kan ikke inneholde #."
},
"details": {
"person": "Person",
+2 -2
View File
@@ -537,7 +537,7 @@
"hide": "Skjul passord",
"requirements": {
"title": "Passordkrav:",
"length": "Minst 8 tegn",
"length": "Minst 12 tegn",
"uppercase": "Minst en stor bokstav",
"digit": "Minst ett tall",
"special": "Minst ett spesialtegn (!@#$%^&*(),.?\":{}|<>)"
@@ -591,7 +591,7 @@
"incorrectCurrentPassword": "Nåværende passord er feil",
"passwordVerificationFailed": "Kunne ikke verifisere passord",
"multiDeviceWarning": "Andre enheter du er logget inn på vil kreve ny innlogging innen {{refresh_time}}.",
"multiDeviceAdmin": "Du kan også tvinge alle brukere til å logge inn på nytt umiddelbart ved å rotere JWT-hemmeligheten din."
"multiDeviceAdmin": "Du kan også tvinge alle brukere til å logge inn på nytt ved å endre JWT (JSON Web Token)-nøkkelen."
}
},
"table": {
+2 -1
View File
@@ -206,7 +206,8 @@
"bg": "Български (Bułgarski)",
"gl": "Galego (Galicyjski)",
"id": "Bahasa Indonesia (Indonezyjski)",
"ur": "اردو (Urdu)"
"ur": "اردو (Urdu)",
"hr": "Hrvatski (Chorwacki)"
},
"appearance": "Wygląd",
"darkMode": {
+2 -1
View File
@@ -3,7 +3,8 @@
"description": {
"addFace": "Dodaj nową kolekcję do biblioteki twarzy, przesyłając swoje pierwsze zdjęcie.",
"placeholder": "Wprowadź nazwę tej kolekcji",
"invalidName": "Niepoprawna nazwa. Nazwy mogą zawierać tylko: litery, cyfry, spacje, cudzysłowy, podkreślniniki i myślniki."
"invalidName": "Niepoprawna nazwa. Nazwy mogą zawierać tylko: litery, cyfry, spacje, cudzysłowy, podkreślniniki i myślniki.",
"nameCannotContainHash": "Nazwa nie może zawierać #."
},
"details": {
"person": "Osoba",
+1 -1
View File
@@ -543,7 +543,7 @@
"hide": "Ukryj hasło",
"requirements": {
"title": "Wymagania hasła:",
"length": "Co najmniej 8 znaków",
"length": "Co najmniej 12 znaków",
"uppercase": "Co najmniej jedna duża litera",
"digit": "Co najmniej jedna cyfra",
"special": "Co najmniej jeden znak specjalny (!@#$%^&*(),.?\":{}|<>)"
+2 -1
View File
@@ -135,7 +135,8 @@
"bg": "Български (Bulgară)",
"gl": "Galego (Galiciană)",
"id": "Bahasa Indonesia (Indoneziană)",
"ur": "اردو (Urdu)"
"ur": "اردو (Urdu)",
"hr": "Hrvatski (Croată)"
},
"theme": {
"default": "Implicit",
+2 -1
View File
@@ -2,7 +2,8 @@
"description": {
"addFace": "Adaugă o colecție nouă în Biblioteca de fețe încărcând prima ta imagine.",
"placeholder": "Introduceti un nume pentru aceasta colectie",
"invalidName": "Nume invalid. Numele pot include doar litere, cifre, spații, apostrofuri, underscore-uri și liniuțe."
"invalidName": "Nume invalid. Numele pot include doar litere, cifre, spații, apostrofuri, underscore-uri și liniuțe.",
"nameCannotContainHash": "Numele nu poate conține #."
},
"details": {
"person": "Persoană",
+1 -1
View File
@@ -508,7 +508,7 @@
"hide": "Ascunde parola",
"requirements": {
"title": "Cerințe parolă:",
"length": "Cel puțin 8 caracter",
"length": "Cel puțin 12 caractere",
"uppercase": "Cel puțin o literă majusculă",
"digit": "Cel puțin o cifră",
"special": "Cel puțin un caracter special (!@#$%^&*(),.?\":{}|<>)"
+2 -1
View File
@@ -159,7 +159,8 @@
"bg": "Български (Bulgariska)",
"gl": "Galego (Galiciska)",
"id": "Bahasa Indonesia (Indonesiska)",
"ur": "اردو (Urdu)"
"ur": "اردو (Urdu)",
"hr": "Hrvatski (kroatiska)"
},
"darkMode": {
"withSystem": {
+2 -1
View File
@@ -12,7 +12,8 @@
"description": {
"placeholder": "Ange ett namn för denna samling",
"addFace": "Lägg till en ny samling i ansiktsbiblioteket genom att ladda upp din första bild.",
"invalidName": "Ogiltigt namn. Namn får endast innehålla bokstäver, siffror, mellanslag, apostrofer, understreck och bindestreck."
"invalidName": "Ogiltigt namn. Namn får endast innehålla bokstäver, siffror, mellanslag, apostrofer, understreck och bindestreck.",
"nameCannotContainHash": "Namn får inte innehålla #."
},
"documentTitle": "Ansiktsbibliotek - Frigate",
"steps": {
+1 -1
View File
@@ -540,7 +540,7 @@
"hide": "Dölj lösenord",
"requirements": {
"title": "Lösenordskrav:",
"length": "Minst 8 tecken",
"length": "Minst 12 tecken",
"uppercase": "Minst en stor bokstav",
"digit": "Minst en siffra",
"special": "Minst ett specialtecken (!@#$%^&*(),.?\":{}|<>)"
+2 -1
View File
@@ -208,7 +208,8 @@
"bg": "保加利亚语 (Български)",
"gl": "加利西亚语 (Galego)",
"id": "印度尼西亚语 (Bahasa Indonesia)",
"ur": "乌尔都语 (اردو)"
"ur": "乌尔都语 (اردو)",
"hr": "克罗地亚语(Hrvatski"
},
"appearance": "外观",
"darkMode": {
@@ -2,7 +2,8 @@
"description": {
"addFace": "我们将引导你如何向人脸库中添加新的合集。",
"placeholder": "请输入此合集的名称",
"invalidName": "名称无效。名称只能包含字母、数字、空格、撇号、下划线和连字符。"
"invalidName": "名称无效。名称只能包含字母、数字、空格、撇号、下划线和连字符。",
"nameCannotContainHash": "名称中不允许包含“#”符号。"
},
"details": {
"person": "人",
+2 -2
View File
@@ -282,7 +282,7 @@
},
"delete": {
"title": "确认删除",
"desc": "你确定要删除{{type}} <em>{{name}}</em> 吗?",
"desc": "你确定要删除{{type}} “<strong>{{name}}</strong>” 吗?",
"success": "{{name}} 已被删除。"
},
"error": {
@@ -543,7 +543,7 @@
"hide": "隐藏密码",
"requirements": {
"title": "密码要求:",
"length": "至少8个字符",
"length": "至少需要 12 位字符",
"uppercase": "至少一个大写字母",
"digit": "至少一位数字",
"special": "至少一个特殊符号 (!@#$%^&*(),.?\":{}|<>)"
+42 -36
View File
@@ -12,13 +12,15 @@ import { useCameraPreviews } from "@/hooks/use-camera-previews";
import { baseUrl } from "@/api/baseUrl";
import { VideoPreview } from "../preview/ScrubbablePreview";
import { useApiHost } from "@/api";
import { isDesktop, isSafari } from "react-device-detect";
import { isSafari } from "react-device-detect";
import { useUserPersistence } from "@/hooks/use-user-persistence";
import { Skeleton } from "../ui/skeleton";
import { Button } from "../ui/button";
import { FaCircleCheck } from "react-icons/fa6";
import { cn } from "@/lib/utils";
import { useTranslation } from "react-i18next";
import { getTranslatedLabel } from "@/utils/i18n";
import { formatList } from "@/utils/stringUtil";
type AnimatedEventCardProps = {
event: ReviewSegment;
@@ -50,26 +52,35 @@ export function AnimatedEventCard({
fetchPreviews: !currentHour,
});
const getEventType = useCallback(
(text: string) => {
if (event.data.sub_labels?.includes(text)) return "manual";
if (event.data.audio.includes(text)) return "audio";
return "object";
},
[event],
);
const tooltipText = useMemo(() => {
if (event?.data?.metadata?.title) {
return event.data.metadata.title;
}
return (
`${[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter((item) => item !== undefined && !item.includes("-verified"))
.map((text) => text.charAt(0).toUpperCase() + text.substring(1))
.sort()
.join(", ")
.replaceAll("-verified", "")} ` + t("detected")
`${formatList(
[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter((item) => item !== undefined && !item.includes("-verified"))
.map((text) => getTranslatedLabel(text, getEventType(text)))
.sort(),
)} ` + t("detected")
);
}, [event, t]);
}, [event, getEventType, t]);
// visibility
@@ -87,7 +98,6 @@ export function AnimatedEventCard({
}, [visibilityListener]);
const [isLoaded, setIsLoaded] = useState(false);
const [isHovered, setIsHovered] = useState(false);
// interaction
@@ -134,31 +144,27 @@ export function AnimatedEventCard({
<Tooltip>
<TooltipTrigger asChild>
<div
className="relative h-24 flex-shrink-0 overflow-hidden rounded md:rounded-lg 4k:h-32"
className="group relative h-24 flex-shrink-0 overflow-hidden rounded md:rounded-lg 4k:h-32"
style={{
aspectRatio: alertVideos ? aspectRatio : undefined,
}}
onMouseEnter={isDesktop ? () => setIsHovered(true) : undefined}
onMouseLeave={isDesktop ? () => setIsHovered(false) : undefined}
>
{isHovered && (
<Tooltip>
<TooltipTrigger asChild>
<Button
className="absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500"
size="xs"
aria-label={t("markAsReviewed")}
onClick={async () => {
await axios.post(`reviews/viewed`, { ids: [event.id] });
updateEvents();
}}
>
<FaCircleCheck className="size-3 text-white" />
</Button>
</TooltipTrigger>
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
</Tooltip>
)}
<Tooltip>
<TooltipTrigger asChild>
<Button
className="pointer-events-none absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100"
size="xs"
aria-label={t("markAsReviewed")}
onClick={async () => {
await axios.post(`reviews/viewed`, { ids: [event.id] });
updateEvents();
}}
>
<FaCircleCheck className="size-3 text-white" />
</Button>
</TooltipTrigger>
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
</Tooltip>
{previews != undefined && alertVideosLoaded && (
<div
className="size-full cursor-pointer"
+22 -15
View File
@@ -33,13 +33,14 @@ import axios from "axios";
import { toast } from "sonner";
import useKeyboardListener from "@/hooks/use-keyboard-listener";
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
import { capitalizeFirstLetter } from "@/utils/stringUtil";
import { Button, buttonVariants } from "../ui/button";
import { Trans, useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import { LuCircle } from "react-icons/lu";
import { MdAutoAwesome } from "react-icons/md";
import { GenAISummaryDialog } from "../overlay/chip/GenAISummaryChip";
import { getTranslatedLabel } from "@/utils/i18n";
import { formatList } from "@/utils/stringUtil";
type ReviewCardProps = {
event: ReviewSegment;
@@ -123,6 +124,12 @@ export default function ReviewCard({
}
}, [bypassDialogRef, onDelete]);
const getEventType = (text: string) => {
if (event.data.sub_labels?.includes(text)) return "manual";
if (event.data.audio.includes(text)) return "audio";
return "object";
};
const content = (
<div
className="relative flex w-full cursor-pointer flex-col gap-1.5"
@@ -197,20 +204,20 @@ export default function ReviewCard({
</div>
</TooltipTrigger>
<TooltipContent className="smart-capitalize">
{[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter(
(item) => item !== undefined && !item.includes("-verified"),
)
.map((text) => capitalizeFirstLetter(text))
.sort()
.join(", ")
.replaceAll("-verified", "")}
{formatList(
[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter(
(item) => item !== undefined && !item.includes("-verified"),
)
.map((text) => getTranslatedLabel(text, getEventType(text)))
.sort(),
)}
</TooltipContent>
</Tooltip>
<TimeAgo
+49 -1
View File
@@ -42,12 +42,20 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { isDesktop, isMobile } from "react-device-detect";
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
import {
Drawer,
DrawerContent,
DrawerDescription,
DrawerTitle,
DrawerTrigger,
} from "../ui/drawer";
import {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogPortal,
DialogTitle,
DialogTrigger,
} from "../ui/dialog";
import { TooltipPortal } from "@radix-ui/react-tooltip";
@@ -194,6 +202,16 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
: "max-h-[75dvh] overflow-hidden p-2"
}
>
{!isDesktop && (
<>
<DrawerTitle className="sr-only">
{t("menu.settings")}
</DrawerTitle>
<DrawerDescription className="sr-only">
{t("menu.settings")}
</DrawerDescription>
</>
)}
<div className="scrollbar-container w-full flex-col overflow-y-auto overflow-x-hidden">
{isMobile && (
<div className="mb-2">
@@ -355,6 +373,16 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
: "scrollbar-container max-h-[75dvh] w-[92%] overflow-y-scroll rounded-lg md:rounded-2xl"
}
>
{!isDesktop && (
<>
<DialogTitle className="sr-only">
{t("menu.languages")}
</DialogTitle>
<DialogDescription className="sr-only">
{t("menu.languages")}
</DialogDescription>
</>
)}
<span tabIndex={0} className="sr-only" />
{languages.map(({ code, label }) => (
<MenuItem
@@ -395,6 +423,16 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
}
>
{!isDesktop && (
<>
<DialogTitle className="sr-only">
{t("menu.darkMode.label")}
</DialogTitle>
<DialogDescription className="sr-only">
{t("menu.darkMode.label")}
</DialogDescription>
</>
)}
<span tabIndex={0} className="sr-only" />
<MenuItem
className={
@@ -472,6 +510,16 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
}
>
{!isDesktop && (
<>
<DialogTitle className="sr-only">
{t("menu.theme.label")}
</DialogTitle>
<DialogDescription className="sr-only">
{t("menu.theme.label")}
</DialogDescription>
</>
)}
<span tabIndex={0} className="sr-only" />
{colorSchemes.map((scheme) => (
<MenuItem
@@ -4,6 +4,7 @@ import {
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
@@ -37,6 +38,12 @@ export default function RestartDialog({
const [restartingSheetOpen, setRestartingSheetOpen] = useState(false);
const [countdown, setCountdown] = useState(60);
const clearBodyPointerEvents = () => {
if (typeof document !== "undefined") {
document.body.style.pointerEvents = "";
}
};
useEffect(() => {
setRestartDialogOpen(isOpen);
}, [isOpen]);
@@ -74,14 +81,25 @@ export default function RestartDialog({
<>
<AlertDialog
open={restartDialogOpen}
onOpenChange={() => {
setRestartDialogOpen(false);
onClose();
onOpenChange={(open) => {
if (!open) {
setRestartDialogOpen(false);
onClose();
clearBodyPointerEvents();
}
}}
>
<AlertDialogContent>
<AlertDialogContent
onCloseAutoFocus={(event) => {
event.preventDefault();
clearBodyPointerEvents();
}}
>
<AlertDialogHeader>
<AlertDialogTitle>{t("restart.title")}</AlertDialogTitle>
<AlertDialogDescription className="sr-only">
{t("restart.description")}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>
+15 -14
View File
@@ -371,22 +371,23 @@ export default function LivePlayer({
</TooltipTrigger>
</div>
<TooltipPortal>
<TooltipContent className="smart-capitalize">
<TooltipContent>
{formatList(
[
...new Set([
...(objects || []).map(({ label, sub_label }) =>
label.endsWith("verified")
? sub_label
: label.replaceAll("_", " "),
),
]),
]
.filter((label) => label?.includes("-verified") == false)
.map((label) =>
getTranslatedLabel(label.replace("-verified", "")),
)
.sort(),
...new Set(
(objects || [])
.map(({ label, sub_label }) => {
const isManual = label.endsWith("verified");
const text = isManual ? sub_label : label;
const type = isManual ? "manual" : "object";
return getTranslatedLabel(text, type);
})
.filter(
(translated) =>
translated && !translated.includes("-verified"),
),
),
].sort(),
)}
</TooltipContent>
</TooltipPortal>
@@ -28,6 +28,7 @@ import { useTranslation } from "react-i18next";
import { FaExclamationTriangle } from "react-icons/fa";
import { MdOutlinePersonSearch } from "react-icons/md";
import { getTranslatedLabel } from "@/utils/i18n";
import { formatList } from "@/utils/stringUtil";
type PreviewPlayerProps = {
review: ReviewSegment;
@@ -181,6 +182,12 @@ export default function PreviewThumbnailPlayer({
config?.ui?.timezone,
);
const getEventType = (text: string) => {
if (review.data.sub_labels?.includes(text)) return "manual";
if (review.data.audio.includes(text)) return "audio";
return "object";
};
return (
<div
className="relative size-full cursor-pointer"
@@ -261,13 +268,16 @@ export default function PreviewThumbnailPlayer({
className={`flex items-start justify-between space-x-1 ${playingBack ? "hidden" : ""} bg-gradient-to-br ${review.has_been_reviewed ? "bg-green-600 from-green-600 to-green-700" : "bg-gray-500 from-gray-400 to-gray-500"} z-0`}
onClick={() => onClick(review, false, true)}
>
{review.data.objects.sort().map((object) => {
return getIconForLabel(
object,
"object",
"size-3 text-white",
);
})}
{review.data.objects
.sort()
.map((object, idx) =>
getIconForLabel(
object,
"object",
"size-3 text-white",
`${object}-${idx}`,
),
)}
{review.data.audio.map((audio) => {
return getIconForLabel(
audio,
@@ -281,23 +291,26 @@ export default function PreviewThumbnailPlayer({
</div>
</TooltipTrigger>
</div>
<TooltipContent className="smart-capitalize">
<TooltipContent>
{review.data.metadata
? review.data.metadata.title
: [
...new Set([
...(review.data.objects || []),
...(review.data.sub_labels || []),
...(review.data.audio || []),
]),
]
.filter(
(item) =>
item !== undefined && !item.includes("-verified"),
)
.map((text) => getTranslatedLabel(text))
.sort()
.join(", ")}
: formatList(
[
...new Set([
...(review.data.objects || []),
...(review.data.sub_labels || []),
...(review.data.audio || []),
]),
]
.filter(
(item) =>
item !== undefined && !item.includes("-verified"),
)
.map((text) =>
getTranslatedLabel(text, getEventType(text)),
)
.sort(),
)}
</TooltipContent>
</Tooltip>
{!!(
+4 -1
View File
@@ -283,7 +283,10 @@ export default function PolygonItem({
<Trans
ns="views/settings"
values={{
type: polygon.type.replace("_", " "),
type: t(
`masksAndZones.form.polygonDrawing.type.${polygon.type}`,
{ ns: "views/settings" },
),
name: polygon.friendly_name ?? polygon.name,
}}
>
-1
View File
@@ -26,6 +26,5 @@ export const supportedLanguageKeys = [
"lt",
"uk",
"cs",
"sk",
"hu",
];
+45 -40
View File
@@ -62,83 +62,86 @@ export function getIconForLabel(
label: string,
type: EventType = "object",
className?: string,
key?: string,
) {
const iconKey = key || label;
if (label.endsWith("-verified")) {
return getVerifiedIcon(label, className, type);
return getVerifiedIcon(label, className, type, iconKey);
} else if (label.endsWith("-plate")) {
return getRecognizedPlateIcon(label, className, type);
return getRecognizedPlateIcon(label, className, type, iconKey);
}
switch (label) {
// objects
case "bear":
return <GiPolarBear key={label} className={className} />;
return <GiPolarBear key={iconKey} className={className} />;
case "bicycle":
return <FaBicycle key={label} className={className} />;
return <FaBicycle key={iconKey} className={className} />;
case "bird":
return <PiBirdFill key={label} className={className} />;
return <PiBirdFill key={iconKey} className={className} />;
case "boat":
return <GiSailboat key={label} className={className} />;
return <GiSailboat key={iconKey} className={className} />;
case "bus":
case "school_bus":
return <FaBus key={label} className={className} />;
return <FaBus key={iconKey} className={className} />;
case "car":
case "vehicle":
return <FaCarSide key={label} className={className} />;
return <FaCarSide key={iconKey} className={className} />;
case "cat":
return <FaCat key={label} className={className} />;
return <FaCat key={iconKey} className={className} />;
case "deer":
return <GiDeer key={label} className={className} />;
return <GiDeer key={iconKey} className={className} />;
case "animal":
case "bark":
case "dog":
return <FaDog key={label} className={className} />;
return <FaDog key={iconKey} className={className} />;
case "fox":
return <GiFox key={label} className={className} />;
return <GiFox key={iconKey} className={className} />;
case "goat":
return <GiGoat key={label} className={className} />;
return <GiGoat key={iconKey} className={className} />;
case "horse":
return <FaHorse key={label} className={className} />;
return <FaHorse key={iconKey} className={className} />;
case "kangaroo":
return <GiKangaroo key={label} className={className} />;
return <GiKangaroo key={iconKey} className={className} />;
case "license_plate":
return <LuScanBarcode key={label} className={className} />;
return <LuScanBarcode key={iconKey} className={className} />;
case "motorcycle":
return <FaMotorcycle key={label} className={className} />;
return <FaMotorcycle key={iconKey} className={className} />;
case "mouse":
return <FaMouse key={label} className={className} />;
return <FaMouse key={iconKey} className={className} />;
case "package":
return <LuBox key={label} className={className} />;
return <LuBox key={iconKey} className={className} />;
case "person":
return <BsPersonWalking key={label} className={className} />;
return <BsPersonWalking key={iconKey} className={className} />;
case "rabbit":
return <GiRabbit key={label} className={className} />;
return <GiRabbit key={iconKey} className={className} />;
case "raccoon":
return <GiRaccoonHead key={label} className={className} />;
return <GiRaccoonHead key={iconKey} className={className} />;
case "robot_lawnmower":
return <FaHockeyPuck key={label} className={className} />;
return <FaHockeyPuck key={iconKey} className={className} />;
case "sports_ball":
return <FaFootballBall key={label} className={className} />;
return <FaFootballBall key={iconKey} className={className} />;
case "skunk":
return <GiSquirrel key={label} className={className} />;
return <GiSquirrel key={iconKey} className={className} />;
case "squirrel":
return <LuIcons.LuSquirrel key={label} className={className} />;
return <LuIcons.LuSquirrel key={iconKey} className={className} />;
case "umbrella":
return <FaUmbrella key={label} className={className} />;
return <FaUmbrella key={iconKey} className={className} />;
case "waste_bin":
return <FaRegTrashAlt key={label} className={className} />;
return <FaRegTrashAlt key={iconKey} className={className} />;
// audio
case "crying":
case "laughter":
case "scream":
case "speech":
case "yell":
return <MdRecordVoiceOver key={label} className={className} />;
return <MdRecordVoiceOver key={iconKey} className={className} />;
case "fire_alarm":
return <FaFire key={label} className={className} />;
return <FaFire key={iconKey} className={className} />;
// sub labels
case "amazon":
return <FaAmazon key={label} className={className} />;
return <FaAmazon key={iconKey} className={className} />;
case "an_post":
case "canada_post":
case "dpd":
@@ -148,20 +151,20 @@ export function getIconForLabel(
case "postnord":
case "purolator":
case "royal_mail":
return <GiPostStamp key={label} className={className} />;
return <GiPostStamp key={iconKey} className={className} />;
case "dhl":
return <FaDhl key={label} className={className} />;
return <FaDhl key={iconKey} className={className} />;
case "fedex":
return <FaFedex key={label} className={className} />;
return <FaFedex key={iconKey} className={className} />;
case "ups":
return <FaUps key={label} className={className} />;
return <FaUps key={iconKey} className={className} />;
case "usps":
return <FaUsps key={label} className={className} />;
return <FaUsps key={iconKey} className={className} />;
default:
if (type === "audio") {
return <GiSoundWaves key={label} className={className} />;
return <GiSoundWaves key={iconKey} className={className} />;
}
return <LuLassoSelect key={label} className={className} />;
return <LuLassoSelect key={iconKey} className={className} />;
}
}
@@ -169,11 +172,12 @@ function getVerifiedIcon(
label: string,
className?: string,
type: EventType = "object",
key?: string,
) {
const simpleLabel = label.substring(0, label.lastIndexOf("-"));
return (
<div key={label} className="relative flex items-center">
<div key={key} className="relative flex items-center">
{getIconForLabel(simpleLabel, type, className)}
<FaCheckCircle className="absolute -bottom-0.5 -right-0.5 size-2" />
</div>
@@ -184,11 +188,12 @@ function getRecognizedPlateIcon(
label: string,
className?: string,
type: EventType = "object",
key?: string,
) {
const simpleLabel = label.substring(0, label.lastIndexOf("-"));
return (
<div key={label} className="relative inline-flex items-center">
<div key={key} className="relative inline-flex items-center">
{getIconForLabel(simpleLabel, type, className)}
<LuScanBarcode className="absolute -bottom-0.5 -right-0.5 size-2" />
</div>
+8 -3
View File
@@ -33,7 +33,12 @@ import {
useRef,
useState,
} from "react";
import { isDesktop, isMobile } from "react-device-detect";
import {
isDesktop,
isMobile,
isMobileOnly,
isTablet,
} from "react-device-detect";
import { IoMdArrowRoundBack } from "react-icons/io";
import { useNavigate } from "react-router-dom";
import { Toaster } from "@/components/ui/sonner";
@@ -738,7 +743,7 @@ export function RecordingView({
aspectRatio: getCameraAspect(mainCamera),
}}
>
{isDesktop && (
{(isDesktop || isTablet) && (
<GenAISummaryDialog
review={activeReviewItem}
onOpen={onAnalysisOpen}
@@ -1001,7 +1006,7 @@ function Timeline({
),
)}
>
{isMobile && timelineType == "timeline" && (
{isMobileOnly && timelineType == "timeline" && (
<GenAISummaryDialog review={activeReviewItem} onOpen={onAnalysisOpen}>
<GenAISummaryChip review={activeReviewItem} />
</GenAISummaryDialog>