mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Add shortcut key "r" to mark selected items as reviewed (#13087)
* Add shortcut key "r" to mark selected items as reviewed * unselect after keypress
This commit is contained in:
parent
2e724291db
commit
4dce8ff60a
@ -606,7 +606,7 @@ function DetectionReview({
|
|||||||
|
|
||||||
// keyboard
|
// keyboard
|
||||||
|
|
||||||
useKeyboardListener(["a"], (key, modifiers) => {
|
useKeyboardListener(["a", "r"], (key, modifiers) => {
|
||||||
if (modifiers.repeat || !modifiers.down) {
|
if (modifiers.repeat || !modifiers.down) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -614,6 +614,16 @@ function DetectionReview({
|
|||||||
if (key == "a" && modifiers.ctrl) {
|
if (key == "a" && modifiers.ctrl) {
|
||||||
onSelectAllReviews();
|
onSelectAllReviews();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (key == "r" && selectedReviews.length > 0) {
|
||||||
|
currentItems?.forEach((item) => {
|
||||||
|
if (selectedReviews.includes(item.id)) {
|
||||||
|
item.has_been_reviewed = true;
|
||||||
|
markItemAsReviewed(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setSelectedReviews([]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user