mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-24 17:18:23 +03:00
add undo all button
This commit is contained in:
parent
f0bd84bf63
commit
a779016f2c
@ -158,7 +158,8 @@
|
|||||||
"resetToGlobal": "Reset to Global",
|
"resetToGlobal": "Reset to Global",
|
||||||
"resetToDefault": "Reset to Default",
|
"resetToDefault": "Reset to Default",
|
||||||
"saveAll": "Save All",
|
"saveAll": "Save All",
|
||||||
"savingAll": "Saving All…"
|
"savingAll": "Saving All…",
|
||||||
|
"undoAll": "Undo All"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"system": "System",
|
"system": "System",
|
||||||
|
|||||||
@ -824,7 +824,7 @@ export function ConfigSection({
|
|||||||
disabled={isSaving || disabled}
|
disabled={isSaving || disabled}
|
||||||
className="flex min-w-36 flex-1 gap-2"
|
className="flex min-w-36 flex-1 gap-2"
|
||||||
>
|
>
|
||||||
{t("undo", { ns: "common", defaultValue: "Undo" })}
|
{t("button.undo", { ns: "common", defaultValue: "Undo" })}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@ -1048,7 +1048,10 @@ export default function Settings() {
|
|||||||
disabled={isSavingAll}
|
disabled={isSavingAll}
|
||||||
className="flex w-full items-center justify-center gap-2"
|
className="flex w-full items-center justify-center gap-2"
|
||||||
>
|
>
|
||||||
{t("undo", { ns: "common", defaultValue: "Undo" })}
|
{t("button.undoAll", {
|
||||||
|
ns: "common",
|
||||||
|
defaultValue: "Undo All",
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleSaveAll}
|
onClick={handleSaveAll}
|
||||||
@ -1164,18 +1167,36 @@ export default function Settings() {
|
|||||||
<Heading as="h3" className="mb-0">
|
<Heading as="h3" className="mb-0">
|
||||||
{t("menu.settings", { ns: "common" })}
|
{t("menu.settings", { ns: "common" })}
|
||||||
</Heading>
|
</Heading>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-5">
|
||||||
{hasPendingChanges && (
|
{hasPendingChanges && (
|
||||||
<Button size="sm" onClick={handleSaveAll} disabled={isSavingAll}>
|
<div className="flex flex-row gap-2 border-r border-secondary pr-5">
|
||||||
{isSavingAll ? (
|
<Button
|
||||||
<>
|
onClick={handleUndoAll}
|
||||||
<ActivityIndicator className="mr-2" />
|
variant="outline"
|
||||||
{t("button.savingAll", { ns: "common" })}
|
disabled={isSavingAll}
|
||||||
</>
|
className="flex w-full items-center justify-center gap-2"
|
||||||
) : (
|
>
|
||||||
t("button.saveAll", { ns: "common" })
|
{t("button.undoAll", {
|
||||||
)}
|
ns: "common",
|
||||||
</Button>
|
defaultValue: "Undo All",
|
||||||
|
})}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="select"
|
||||||
|
size="sm"
|
||||||
|
onClick={handleSaveAll}
|
||||||
|
disabled={isSavingAll}
|
||||||
|
>
|
||||||
|
{isSavingAll ? (
|
||||||
|
<>
|
||||||
|
<ActivityIndicator className="mr-2" />
|
||||||
|
{t("button.savingAll", { ns: "common" })}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
t("button.saveAll", { ns: "common" })
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{CAMERA_SELECT_BUTTON_PAGES.includes(page) && (
|
{CAMERA_SELECT_BUTTON_PAGES.includes(page) && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user