mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 13:12:27 -05: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:
parent
77f1e79532
commit
e9bb7ddd3a
50 changed files with 4630 additions and 172 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue