mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
The batch delete goes through all the already displayed Events pages and deletes any Event that is not marked as favorite/saved. It doesn't query the database to get the full list of Events, as the user should be able to clearly understand which Events will be cleaned up. After the list of Events to be deleted is identified, it will prompt the user to confirm the deletion of the number of Events. It will then show a spinner until the Events are deleted and then show a feedback dialog mentioning the number of Events deleted. The button for the Cleanup operation is put on the same row as the filters as adding a new row for a single button seemed ugly. It's marked to be different with a border, since the Cleanup operation is not a filtering option. The SVG was downloaded from [1] and it's licensed as Public Domain [2]. 1 - https://www.svgrepo.com/svg/494112/clean-up 2 - https://www.svgrepo.com/page/licensing/#CC0
27 lines
1.7 KiB
JavaScript
27 lines
1.7 KiB
JavaScript
import { h } from 'preact';
|
|
import { memo } from 'preact/compat';
|
|
|
|
export function Cleanup({ className = 'h-6 w-6', stroke = 'currentColor', fill = 'none', title = "", onClick = () => {} }) {
|
|
return (
|
|
<svg
|
|
width="800px"
|
|
height="800px"
|
|
viewBox="0 0 1024 1024"
|
|
className={className}
|
|
version="1.1"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
fill={fill}
|
|
stroke={stroke}
|
|
onClick={onClick}
|
|
>
|
|
<path
|
|
d="M864.453 386.372H604.968V135.834c0-39.533-32.049-71.582-71.582-71.582h-35.791c-39.533 0-71.582 32.049-71.582 71.582v250.538H166.527c-34.592 0-62.634 28.042-62.634 62.634 0 30.327 21.556 55.617 50.181 61.392L85.997 833.761c0 49.417 35.791 90.596 89.478 89.478 53.687-1.118 85.893-53.687 156.91-53.687 172.801 0 397.852 53.687 397.852 53.687 49.417 0 89.478-40.061 89.478-89.478l68.827-326.927c22.634-9.439 38.547-31.772 38.547-57.828-0.001-34.591-28.043-62.634-62.636-62.634zM461.803 153.73c0-29.651 24.036-53.687 53.687-53.687 29.651 0 53.687 24.036 53.687 53.687v232.642H461.803V153.73z m319.456 662.753c-11.092 41.902-31.537 70.965-70.44 70.965 0 0-197.096-49.497-355.544-53.438l41.811-142.707c2.779-9.485-2.658-19.427-12.142-22.207-9.485-2.777-19.426 2.658-22.205 12.142l-45.103 153.939c-55.562 8.478-102.763 52.27-142.161 52.27-43.62 0-67.243-33.993-53.687-70.965 13.556-36.974 74.247-305.459 74.247-305.459l641.576 0.617c-0.001 0.001-45.261 262.941-56.352 304.843z m83.194-340.633H166.527c-14.825 0-26.843-12.019-26.843-26.843 0-14.825 12.019-26.843 26.843-26.843h697.927c14.825 0 26.843 12.019 26.843 26.843s-12.019 26.843-26.844 26.843z"
|
|
fill={fill}>
|
|
<title>{title}</title>
|
|
</path>
|
|
</svg>
|
|
);
|
|
}
|
|
|
|
export default memo(Cleanup);
|