mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-01 19:30:33 +03:00
show already running message when a media sync is in progress
This commit is contained in:
@@ -86,17 +86,21 @@ export default function MediaSyncSettingsView() {
|
||||
position: "top-center",
|
||||
closeButton: true,
|
||||
});
|
||||
} else if (response.status === 409) {
|
||||
toast.error(t("maintenance.sync.alreadyRunning"), {
|
||||
}
|
||||
} catch (error) {
|
||||
const alreadyRunning =
|
||||
axios.isAxiosError(error) && error.response?.status === 409;
|
||||
toast.error(
|
||||
t(
|
||||
alreadyRunning
|
||||
? "maintenance.sync.alreadyRunning"
|
||||
: "maintenance.sync.error",
|
||||
),
|
||||
{
|
||||
position: "top-center",
|
||||
closeButton: true,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
toast.error(t("maintenance.sync.error"), {
|
||||
position: "top-center",
|
||||
closeButton: true,
|
||||
});
|
||||
},
|
||||
);
|
||||
} finally {
|
||||
setIsSubmitting(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user