End to end encrypted attachment upload and streaming

This commit is contained in:
Aslan 2026-01-16 18:30:12 -05:00
parent 575e9e2010
commit 64ad8498f5
74 changed files with 2368 additions and 151 deletions

View file

@ -17,20 +17,34 @@ const Input: Component<IInputProps> = (props: IInputProps) => {
</button>
);
const inputHtml = (): JSXElement => (
<input
type={props.type ? props.type : "text"}
placeholder={props.placeholder}
value={props.value}
onInput={(e) => props.onChange?.(e.currentTarget.value)}
onKeyDown={handleEnter}
/>
);
const textAreaHtml = (): JSXElement => (
<textarea
class="w-full h-full outline-none hover:outline-none px-5 py-3 resize-none"
placeholder={props.placeholder}
value={props.value}
onInput={(e) => props.onChange?.(e.currentTarget.value)}
onKeyDown={handleEnter}
/>
);
return (
<div
class={`bg-stone-800 h-16 p-2 flex flex-row gap-2 ${props.rounded ? "rounded-full" : "rounded-2xl"} ${props.outline ? "outline-2" : ""}`}
class={`bg-stone-800 ${props.textArea ? "h-32" : "h-16"} p-2 flex flex-row gap-2 ${props.rounded ? "rounded-full" : "rounded-2xl"} ${props.outline ? "outline-2" : ""}`}
>
<label
class={`bg-stone-800 input px-5 w-full h-full focus:border-none outline-none ${props.rounded ? "rounded-full" : "rounded-xl"}`}
class={`bg-stone-800 input ${props.textArea ? "px-0" : "px-5"} w-full h-full focus:border-none outline-none ${props.rounded ? "rounded-full" : "rounded-xl"}`}
>
<input
type={props.type ? props.type : "text"}
placeholder={props.placeholder}
value={props.value}
onInput={(e) => props.onChange?.(e.currentTarget.value)}
onKeyDown={handleEnter}
/>
{props.textArea ? textAreaHtml() : inputHtml()}
</label>
{props.submitText ? submitHtml() : undefined}
</div>