mirror of
https://github.com/Sevichecc/raycast-akkoma-extension.git
synced 2025-04-30 14:49:29 +08:00
19 lines
737 B
TypeScript
19 lines
737 B
TypeScript
import { Form, LaunchProps } from "@raycast/api";
|
|
import { StatusRequest } from "./utils/types";
|
|
import { useState } from "react";
|
|
|
|
import VisibilityDropdown from "./components/VisibilityDropdown";
|
|
import SimpleCommand from "./simple-status";
|
|
|
|
export default function DetailCommand(props: LaunchProps<{ draftValues: Partial<StatusRequest> }>) {
|
|
const [files, setFiles] = useState<string[]>([]);
|
|
|
|
return (
|
|
<SimpleCommand {...props}>
|
|
<Form.FilePicker id="files" value={files} onChange={setFiles} title="Attechments" />
|
|
{files.length === 1 && <Form.TextArea id="description" title="Alt text" />}
|
|
<Form.DatePicker id="scheduled_at" title="Scheduled Time" />
|
|
<VisibilityDropdown />
|
|
</SimpleCommand>
|
|
);
|
|
}
|