mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-27 13:47:50 +02:00
Fix config change lost when reloading page
This commit is contained in:
parent
ad21061e16
commit
4a52ff30ac
@ -122,7 +122,9 @@ export default function FrigatePlusSettingsView({
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.put(`config/set?model.path=plus://${frigatePlusSettings.model.id}`, {})
|
.put(`config/set?model.path=plus://${frigatePlusSettings.model.id}`, {
|
||||||
|
requires_restart: 0,
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
toast.success(t("frigatePlus.toast.success"), {
|
toast.success(t("frigatePlus.toast.success"), {
|
||||||
@ -321,15 +323,14 @@ export default function FrigatePlusSettingsView({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
{(() => {
|
{frigatePlusSettings.model.id &&
|
||||||
const modelId = frigatePlusSettings?.model?.id;
|
availableModels?.[frigatePlusSettings.model.id]
|
||||||
return modelId &&
|
? new Date(
|
||||||
availableModels?.[modelId]?.trainDate
|
availableModels[
|
||||||
? new Date(
|
frigatePlusSettings.model.id
|
||||||
availableModels[modelId].trainDate,
|
].trainDate,
|
||||||
).toLocaleString()
|
).toLocaleString()
|
||||||
: "Retrieving models...";
|
: "Retrieving models..."}
|
||||||
})()}
|
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user