Add share's contents and description to the DB
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
import {
|
||||
SelectInput,
|
||||
SimpleForm,
|
||||
TextInput,
|
||||
useCreate,
|
||||
useGetList,
|
||||
useNotify,
|
||||
@@ -24,6 +25,7 @@ export const ShareDialog = ({ open, close, onClose, ids, resource, title }) => {
|
||||
const [format, setFormat] = useState(config.defaultDownsamplingFormat)
|
||||
const [maxBitRate, setMaxBitRate] = useState(DEFAULT_SHARE_BITRATE)
|
||||
const [originalFormat, setUseOriginalFormat] = useState(true)
|
||||
const [description, setDescription] = useState('')
|
||||
const { data: formats, loading: loadingFormats } = useGetList(
|
||||
'transcoding',
|
||||
{
|
||||
@@ -59,6 +61,7 @@ export const ShareDialog = ({ open, close, onClose, ids, resource, title }) => {
|
||||
{
|
||||
resourceType: resource,
|
||||
resourceIds: ids?.join(','),
|
||||
description,
|
||||
...(!originalFormat && { format }),
|
||||
...(!originalFormat && { maxBitRate }),
|
||||
},
|
||||
@@ -105,6 +108,12 @@ export const ShareDialog = ({ open, close, onClose, ids, resource, title }) => {
|
||||
label={'Share in original format'}
|
||||
onChange={handleOriginal}
|
||||
/>
|
||||
<TextInput
|
||||
source="description"
|
||||
onChange={(event) => {
|
||||
setDescription(event.target.value)
|
||||
}}
|
||||
/>
|
||||
{!originalFormat && (
|
||||
<SelectInput
|
||||
source="format"
|
||||
|
||||
Reference in New Issue
Block a user