Searching wrolpi user's home directory for browser profiles.

This commit is contained in:
Roland 2025-04-17 17:02:39 -06:00
parent d8ccebf9bb
commit 00c86e1a1a
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
22 changed files with 472 additions and 138 deletions

View file

@ -185,7 +185,7 @@ export function useForm({
}
const value = _.get(formData, path); // Get a path, separated by .'s
if (value === undefined) {
patchFormData(_.set(formData, path, null));
patchFormData(_.set(formData, path, type === 'array' ? [] : null));
}
// Allow bypass of `handleInputEvent` which only handles an input event.
const setValue = newValue => {
@ -426,7 +426,7 @@ export function UrlsTextarea({name = 'urls', required, form}) {
</FormInput>
}
export function ToggleForm({form, name, label, path, icon = null, iconSize = 'big'}) {
export function ToggleForm({form, name, label, path, icon = null, iconSize = 'big', disabled=false}) {
const [inputProps, inputAttrs] = form.getCustomProps({name, path})
const iconElm = icon ? <Icon size={iconSize} name={icon}/> : null;
@ -434,7 +434,7 @@ export function ToggleForm({form, name, label, path, icon = null, iconSize = 'bi
label={label}>
{iconElm}
<Toggle
disabled={form.disabled}
disabled={disabled || form.disabled}
name={name}
checked={inputProps.value}
onChange={inputProps.onChange}