mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Create/update/remove domain permission subscriptions (#3623)
* [feature] Create/update/remove domain permission subscriptions * lint * envparsing * remove errant fmt.Println * create drafts, subs, exclude, from snapshot models * name etag column correctly * remove count column * lint
This commit is contained in:
@ -26,6 +26,7 @@ import type {
|
||||
|
||||
import type {
|
||||
FileFormInputHook,
|
||||
NumberFormInputHook,
|
||||
RadioFormInputHook,
|
||||
TextFormInputHook,
|
||||
} from "../../lib/form/types";
|
||||
@ -57,6 +58,32 @@ export function TextInput({label, field, ...props}: TextInputProps) {
|
||||
);
|
||||
}
|
||||
|
||||
export interface NumberInputProps extends React.DetailedHTMLProps<
|
||||
React.InputHTMLAttributes<HTMLInputElement>,
|
||||
HTMLInputElement
|
||||
> {
|
||||
label?: ReactNode;
|
||||
field: NumberFormInputHook;
|
||||
}
|
||||
|
||||
export function NumberInput({label, field, ...props}: NumberInputProps) {
|
||||
const { onChange, value, ref } = field;
|
||||
|
||||
return (
|
||||
<div className={`form-field number${field.valid ? "" : " invalid"}`}>
|
||||
<label>
|
||||
{label}
|
||||
<input
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
ref={ref as RefObject<HTMLInputElement>}
|
||||
{...props}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export interface TextAreaProps extends React.DetailedHTMLProps<
|
||||
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
||||
HTMLTextAreaElement
|
||||
|
Reference in New Issue
Block a user