mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Port Movies UI to v2.5 (#397)
* Ignore generated-graphql.tsx in 2.5 * Make movie name mandatory * Port #395 fix to v2.5 * Differentiate front/back image browse buttons * Move URL, Synopsis to separate rows * Fix unknown query params crashing UI
This commit is contained in:
@@ -3,18 +3,20 @@ import { Button, Form } from "react-bootstrap";
|
||||
|
||||
interface IImageInput {
|
||||
isEditing: boolean;
|
||||
text?: string;
|
||||
onImageChange: (event: React.FormEvent<HTMLInputElement>) => void;
|
||||
}
|
||||
|
||||
export const ImageInput: React.FC<IImageInput> = ({
|
||||
isEditing,
|
||||
text,
|
||||
onImageChange
|
||||
}) => {
|
||||
if (!isEditing) return <div />;
|
||||
|
||||
return (
|
||||
<Form.Label className="image-input">
|
||||
<Button variant="secondary">Browse for image...</Button>
|
||||
<Button variant="secondary">{text ?? "Browse for image..."}</Button>
|
||||
<Form.Control
|
||||
type="file"
|
||||
onChange={onImageChange}
|
||||
|
||||
Reference in New Issue
Block a user