Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add links to documentation in delete images/camera alerts #269

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions src/features/cameras/DeleteCameraAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,29 @@ const DeleteCameraAlert = () => {
</SpinnerOverlay>
)}
<AlertTitle>Delete Camera</AlertTitle>
{/*TODO: Add a link to the documentation for more information on how to delete images.*/}
<div>
<Callout type="warning">
{imageCount > ASYNC_IMAGE_DELETE_BY_FILTER_LIMIT ? (
<p>
Due to the large number of images associated with this camera, we are unable to
delete Camera <strong>{selectedCamera}</strong> at this time. Please ensure that
the number of images associated with this camera do not exceed{' '}
{ASYNC_IMAGE_DELETE_BY_FILTER_LIMIT} before trying again. We apologize for the
inconvenience.
</p>
<>
<p>
Due to the large number of images associated with this camera, we are unable to
delete Camera <strong>{selectedCamera}</strong> at this time. Please ensure that
the number of images associated with this camera does not exceed{' '}
{ASYNC_IMAGE_DELETE_BY_FILTER_LIMIT.toLocaleString()} before trying again.
</p>
<p>
You can reduce the number images associated with this camera by using the{' '}
<a
href="https://docs.animl.camera/fundamentals/deleting-images#deleting-all-currently-filtered-images"
target="_blank"
rel="noopener noreferrer"
>
delete-images-by-filter
</a>{' '}
option to delete batches of images before fully deleting this Camera. We
apologize for the inconvenience.
</p>
</>
) : (
<div>
<p>
Expand All @@ -98,7 +110,7 @@ const DeleteCameraAlert = () => {
This will remove the Camera, its Deployments, and{' '}
{imageCount > 1 ? 'all' : 'the'}{' '}
<strong>
{imageCount} image{imageCount > 1 && 's'}
{imageCount.toLocaleString()} image{imageCount > 1 && 's'}
</strong>{' '}
</>
)}
Expand Down
13 changes: 10 additions & 3 deletions src/features/images/DeleteImagesAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,17 @@ const DeleteImagesAlert = () => {
{ASYNC_IMAGE_DELETE_BY_ID_LIMIT.toLocaleString()} image limit Animl supports when deleting
individually-selected images.
</p>
{/*TODO: Add a link to the documentation for more information on how to delete images.*/}
<p>
Please select fewer images, or use the delete-by-filter option, which can accommodate
deleting up to {ASYNC_IMAGE_DELETE_BY_FILTER_LIMIT.toLocaleString()} images at a time.
Please select fewer images, or use the{' '}
<a
href="https://docs.animl.camera/fundamentals/deleting-images#deleting-all-currently-filtered-images"
target="_blank"
rel="noopener noreferrer"
>
delete-images-by-filter
</a>{' '}
option, which can accommodate deleting up to{' '}
{ASYNC_IMAGE_DELETE_BY_FILTER_LIMIT.toLocaleString()} images at a time.
</p>
</div>
);
Expand Down
Loading