diff --git a/src/renderer/src/atoms/settings/integration.ts b/src/renderer/src/atoms/settings/integration.ts index c732f39ab..f8cee02bc 100644 --- a/src/renderer/src/atoms/settings/integration.ts +++ b/src/renderer/src/atoms/settings/integration.ts @@ -4,9 +4,9 @@ import { createSettingAtom } from "./helper" export const createDefaultSettings = (): IntegrationSettings => ({ enableEagle: true, - enableReadwise: true, + enableReadwise: false, readwiseToken: "", - enableInstapaper: true, + enableInstapaper: false, instapaperUsername: "", instapaperPassword: "", }) diff --git a/src/renderer/src/hooks/common/useInputComposition.ts b/src/renderer/src/hooks/common/useInputComposition.ts index 8629e78d7..b97e4a42a 100644 --- a/src/renderer/src/hooks/common/useInputComposition.ts +++ b/src/renderer/src/hooks/common/useInputComposition.ts @@ -57,10 +57,17 @@ export const useInputComposition = ( [onKeyDown], ) - return { + const ret = { onCompositionEnd: handleCompositionEnd, onCompositionStart: handleCompositionStart, onKeyDown: handleKeyDown, - isCompositionRef, + + } + Object.defineProperty(ret, "isCompositionRef", { + value: isCompositionRef, + enumerable: false, + }) + return ret as typeof ret & { + isCompositionRef: typeof isCompositionRef } } diff --git a/src/renderer/src/modules/settings/control.tsx b/src/renderer/src/modules/settings/control.tsx index 6bb6ff618..2242ac62c 100644 --- a/src/renderer/src/modules/settings/control.tsx +++ b/src/renderer/src/modules/settings/control.tsx @@ -53,14 +53,32 @@ export const SettingInput: Component<{ value: string onChange: ChangeEventHandler type: string -}> = ({ value, label, onChange, className, type }) => { + vertical?: boolean + labelClassName?: string +}> = ({ + value, + label, + onChange, + labelClassName, + className, + type, + vertical, +}) => { const id = useId() return (
- + = { description?: string onChange: (value: T[K]) => void type?: "password" + + vertical?: boolean + + componentProps?: { + labelClassName?: string + className?: string + [key: string]: any + } } & SharedSettingItem type SectionSettingItem = { @@ -97,6 +105,8 @@ export const createSettingBuilder = case "string": { ControlElement = ( ( }), defineSettingItem("readwiseToken", { label: "Readwise Access Token", + vertical: true, type: "password", description: <>You can get it here: readwise.io/access_token., }), @@ -62,10 +63,16 @@ export const SettingIntegration = () => ( }), defineSettingItem("instapaperUsername", { label: "Instapaper Username", + componentProps: { + labelClassName: "w-[150px]", + }, }), defineSettingItem("instapaperPassword", { label: "Instapaper Password", type: "password", + componentProps: { + labelClassName: "w-[150px]", + }, }), ]} />