diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index 775087b0..8e82d750 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -153,19 +153,17 @@ export const VoidInputBox2 = forwardRef(fun }) -export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, className, disabled, ...inputProps }: { +export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, className, disabled, passwordBlur, ...inputProps }: { value: string; onChangeValue: (value: string) => void; placeholder: string; className?: string; disabled?: boolean; + passwordBlur?: boolean; } & React.InputHTMLAttributes) => { - const inputRef = useRef(null); return ( onChangeValue(e.target.value)} placeholder={placeholder} @@ -174,10 +172,12 @@ export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, classNam ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className}`} style={{ + ...passwordBlur && { WebkitTextSecurity: 'disc' }, background: asCssVariable(inputBackground), color: asCssVariable(inputForeground) }} {...inputProps} + type={undefined} // VS Code is doing some annoyingness that breaks paste if this is defined /> ); }; diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 3c6d2245..3b97463a 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -262,6 +262,7 @@ const ProviderSetting = ({ providerName, settingName }: { providerName: Provider const settingsState = useSettingsState() const settingValue = settingsState.settingsOfProvider[providerName][settingName] as string // this should always be a string in this component + console.log(`providerName:${providerName} settingName: ${settingName}, settingValue: ${settingValue}`) if (typeof settingValue !== 'string') { console.log('Error: Provider setting had a non-string value.') return @@ -274,11 +275,9 @@ const ProviderSetting = ({ providerName, settingName }: { providerName: Provider onChangeValue={useCallback((newVal) => { voidSettingsService.setSettingOfProvider(providerName, settingName, newVal) }, [voidSettingsService, providerName, settingName])} - // placeholder={`${providerTitle} ${settingTitle} (${placeholder})`} placeholder={`${settingTitle} (${placeholder})`} - - type={isPasswordField ? 'password' : 'text'} + passwordBlur={isPasswordField} /> {subTextMd === undefined ? null :