* feat ui: login flow for spot extension * spot list, store and service created * some fixing for header * start work on single spot * spot player start * header for player, comments, icons, etc * split stuff into compoennts, create player state manager * player controls, activity panel etc etc * comments, empty page, rename and stuff * interval buttons etc * access modal * pubkey support * fix tooltip * limit 10 -> 9 * hls lib instead of videojs * some warnings * fix date display for exp * change public links * display more client data * fix cleaning, init comment * map network to replay player network ev * stream support, console panel, close panels on X * fixing streaming, destroy on leave * fix autoplay * show notification on spot login * fix spot login * backup player added, fix audio issue * show thumbnail when no video, add spot roles * add poster thumbnail * some fixes to video check * fix events jump * fix play btn * try catch over pubkey * icons * spot login pinging * move spot login flow to login comp, use separate spot login path for unique jwt * invalidate spot jwt on logout * add visual data on page load event * typo fix * issue to copy change * share spot url f
58 lines
No EOL
1.5 KiB
TypeScript
58 lines
No EOL
1.5 KiB
TypeScript
import React from 'react';
|
|
import { Modal, Form, Input } from 'UI';
|
|
import { Button } from 'antd';
|
|
import { CloseOutlined } from '@ant-design/icons';
|
|
|
|
interface Props {
|
|
onSave: (newName: string) => void;
|
|
onClose: () => void;
|
|
itemName: string;
|
|
}
|
|
|
|
function EditItemModal(props: Props) {
|
|
const [name, setName] = React.useState(props.itemName);
|
|
const saveResult = () => {
|
|
props.onSave(name);
|
|
}
|
|
return (
|
|
<Modal open onClose={props.onClose}>
|
|
<Modal.Header className="flex items-center justify-between">
|
|
<div>{'Edit Spot'}</div>
|
|
<Button
|
|
type='text'
|
|
name="close"
|
|
onClick={props.onClose}
|
|
icon={<CloseOutlined />}
|
|
/>
|
|
</Modal.Header>
|
|
<Modal.Content>
|
|
<Form onSubmit={saveResult}>
|
|
<label>Title</label>
|
|
<Input
|
|
className=""
|
|
name="title"
|
|
value={ name }
|
|
onChange={({ target: { value } }) => setName(value)}
|
|
placeholder="Title"
|
|
maxLength={100}
|
|
autoFocus
|
|
/>
|
|
</Form>
|
|
</Modal.Content>
|
|
<Modal.Footer>
|
|
<div className="-mx-2 px-2">
|
|
<Button
|
|
type="primary"
|
|
onClick={ saveResult }
|
|
className="float-left mr-2"
|
|
>
|
|
Save
|
|
</Button>
|
|
<Button type='default' onClick={ props.onClose }>{ 'Cancel' }</Button>
|
|
</div>
|
|
</Modal.Footer>
|
|
</Modal>
|
|
)
|
|
}
|
|
|
|
export default EditItemModal; |