Something went wrong. Try again.
Schedule posts and reposts to Bluesky (and other PDSes) with Cloudflare workers. skyscheduler.work
scheduling social-media cloudflare bsky service cloudflare-workers bsky-tool bluesky
Something went wrong. Try again.
992 B · 29 lines
TSX
at main
1234567891011121314151617181920212223242526272829import { PWAutoCompleteSettings } from "../../enums";import { MAX_DASHBOARD_PASS, MIN_DASHBOARD_PASS } from "../../limits";import type { BaseElementProps } from "../../types";
interface DashboardPasswordFieldSettings extends BaseElementProps { required?: boolean autocomplete: PWAutoCompleteSettings}
export default function DashboardPasswordField(props: DashboardPasswordFieldSettings) { let autocompleteSetting: string; switch (props.autocomplete) { default: case PWAutoCompleteSettings.Off: autocompleteSetting = "off"; break; case PWAutoCompleteSettings.CurrentPass: autocompleteSetting = "current-password"; break; case PWAutoCompleteSettings.NewPass: autocompleteSetting = "new-password"; break; } return (<input id="password" type="password" name="password" minlength={MIN_DASHBOARD_PASS} maxlength={MAX_DASHBOARD_PASS} required={props.required ?? undefined} autocomplete={autocompleteSetting} />);}