mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-02 03:40:31 +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",
|
position: "top-center",
|
||||||
closeButton: true,
|
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",
|
position: "top-center",
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
});
|
},
|
||||||
}
|
);
|
||||||
} catch {
|
|
||||||
toast.error(t("maintenance.sync.error"), {
|
|
||||||
position: "top-center",
|
|
||||||
closeButton: true,
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
setIsSubmitting(false);
|
setIsSubmitting(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user