Clarify proxy HTTP/HTTPS setting

This commit is contained in:
Gregory Schier
2025-06-06 20:34:23 -07:00
parent 1d9d80319b
commit 27901231dc
2 changed files with 20 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ import { patchModel, settingsAtom } from '@yaakapp-internal/models';
import { useAtomValue } from 'jotai';
import React from 'react';
import { Checkbox } from '../core/Checkbox';
import { InlineCode } from '../core/InlineCode';
import { PlainInput } from '../core/PlainInput';
import { Select } from '../core/Select';
import { Separator } from '../core/Separator';
@@ -62,7 +63,11 @@ export function SettingsProxy() {
<HStack space={1.5}>
<PlainInput
size="sm"
label="HTTP"
label={
<>
Proxy for <InlineCode>http://</InlineCode> traffic
</>
}
placeholder="localhost:9090"
defaultValue={settings.proxy?.http}
onChange={async (http) => {
@@ -83,7 +88,11 @@ export function SettingsProxy() {
/>
<PlainInput
size="sm"
label="HTTPS"
label={
<>
Proxy for <InlineCode>https://</InlineCode> traffic
</>
}
placeholder="localhost:9090"
defaultValue={settings.proxy?.https}
onChange={async (https) => {

View File

@@ -16,11 +16,15 @@ export type PlainInputProps = Omit<InputProps, 'wrapLines' | 'onKeyDown' | 'type
};
export function PlainInput({
autoFocus,
autoSelect,
className,
containerClassName,
defaultValue,
forceUpdateKey,
help,
hideLabel,
hideObscureToggle,
label,
labelClassName,
labelPosition = 'top',
@@ -29,19 +33,16 @@ export function PlainInput({
onBlur,
onChange,
onFocus,
onFocusRaw,
onKeyDownCapture,
onPaste,
placeholder,
required,
rightSlot,
hideObscureToggle,
size = 'md',
type = 'text',
tint,
type = 'text',
validate,
autoSelect,
placeholder,
autoFocus,
onKeyDownCapture,
onFocusRaw,
}: PlainInputProps) {
const [obscured, setObscured] = useStateWithDeps(type === 'password', [type]);
const [focused, setFocused] = useState(false);
@@ -101,7 +102,7 @@ export function PlainInput({
labelPosition === 'top' && 'flex-row gap-0.5',
)}
>
<Label htmlFor={id} className={labelClassName} visuallyHidden={hideLabel} required={required}>
<Label htmlFor={id} className={labelClassName} visuallyHidden={hideLabel} required={required} help={help}>
{label}
</Label>
<HStack