Retention Editor added in UI

Time set in Schedular added
This commit is contained in:
Philipp
2026-05-21 09:05:43 +02:00
parent c272b00c81
commit 4af9f32c46
6 changed files with 86 additions and 9 deletions
+8 -1
View File
@@ -81,7 +81,8 @@ export function Settings({ onChanged }) {
<input
className="h-10 min-w-0 flex-1 bg-transparent px-3 text-zinc-100 outline-none"
onChange={(event) => setValues((current) => ({ ...current, [field.key]: event.target.value }))}
type={field.secret && !secretVisible ? 'password' : 'text'}
min={field.key.startsWith('RESTIC_KEEP_') ? '0' : undefined}
type={inputType(field, secretVisible)}
value={values[field.key] || ''}
/>
{field.secret ? (
@@ -113,6 +114,12 @@ export function Settings({ onChanged }) {
);
}
function inputType(field, secretVisible) {
if (field.secret && !secretVisible) return 'password';
if (field.key.startsWith('RESTIC_KEEP_')) return 'number';
return 'text';
}
function Notice({ text, tone }) {
const classes = {
bad: 'border-red-900 bg-red-950/50 text-red-200',