Skip to content

Commit af14bcd

Browse files
committed
Merge branch 'upstream/release52' into upstream/release53
# Conflicts: # packages/webui/src/client/ui/Settings/Studio/PackageManager/AccessorTableRow.tsx
2 parents 4d34cec + 8fa8bcc commit af14bcd

File tree

1 file changed

+72
-2
lines changed

1 file changed

+72
-2
lines changed

packages/webui/src/client/ui/Settings/Studio/PackageManager/AccessorTableRow.tsx

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { TextInputControl } from '../../../../lib/Components/TextInput.js'
1717
import { DropdownInputControl, getDropdownInputOptions } from '../../../../lib/Components/DropdownInput.js'
1818
import { OverrideOpHelper, WrappedOverridableItemNormal } from '../../util/OverrideOpHelper.js'
1919
import { CheckboxControl } from '../../../../lib/Components/Checkbox.js'
20+
import { IntInputControl } from '../../../../lib/Components/IntInput'
2021
import Button from 'react-bootstrap/Button'
2122

2223
interface AccessorTableRowProps {
@@ -307,7 +308,19 @@ export function AccessorTableRow({
307308
itemKey={`container.accessors.${accessorId}.ISAUrls`}
308309
overrideHelper={overrideHelper}
309310
>
310-
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
311+
{(value, handleUpdate) => {
312+
// Convert array of strings into comma-separated string for the input:
313+
const strValue = Array.isArray(value) ? value.join(', ') : value
314+
return (
315+
<TextInputControl
316+
value={strValue}
317+
handleUpdate={(value: string) => {
318+
// Convert comma-separated string into array of strings
319+
handleUpdate(value.split(',').map((s) => s.trim()))
320+
}}
321+
/>
322+
)
323+
}}
311324
</LabelAndOverrides>
312325
<LabelAndOverrides
313326
label={t('Quantel Zone ID')}
@@ -329,7 +342,7 @@ export function AccessorTableRow({
329342
itemKey={`container.accessors.${accessorId}.serverId`}
330343
overrideHelper={overrideHelper}
331344
>
332-
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
345+
{(value, handleUpdate) => <IntInputControl value={value} handleUpdate={handleUpdate} />}
333346
</LabelAndOverrides>
334347
<LabelAndOverrides
335348
label={t('Quantel transformer URL')}
@@ -362,6 +375,63 @@ export function AccessorTableRow({
362375
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
363376
</LabelAndOverrides>
364377
</>
378+
) : accessor.type === Accessor.AccessType.ATEM_MEDIA_STORE ? (
379+
<>
380+
<LabelAndOverrides
381+
label={t('Resource Id')}
382+
hint={t('(Optional) This could be the name of the compute')}
383+
item={packageContainer}
384+
//@ts-expect-error can't be 4 levels deep
385+
itemKey={`container.accessors.${accessorId}.resourceId`}
386+
overrideHelper={overrideHelper}
387+
>
388+
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
389+
</LabelAndOverrides>
390+
<LabelAndOverrides
391+
label={t('Network Id')}
392+
hint={t('(Optional) A name/identifier of the local network where the Atem is located')}
393+
item={packageContainer}
394+
//@ts-expect-error can't be 4 levels deep
395+
itemKey={`container.accessors.${accessorId}.networkId`}
396+
overrideHelper={overrideHelper}
397+
>
398+
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
399+
</LabelAndOverrides>
400+
401+
<LabelAndOverrides
402+
label={t('Network address')}
403+
hint={t('Hostname or IP address of the Atem')}
404+
item={packageContainer}
405+
//@ts-expect-error can't be 4 levels deep
406+
itemKey={`container.accessors.${accessorId}.atemHost`}
407+
overrideHelper={overrideHelper}
408+
>
409+
{(value, handleUpdate) => <TextInputControl value={value} handleUpdate={handleUpdate} />}
410+
</LabelAndOverrides>
411+
<LabelAndOverrides
412+
label={t('Bank Index')}
413+
hint={t(' The index of the Atem media/clip banks')}
414+
item={packageContainer}
415+
//@ts-expect-error can't be 4 levels deep
416+
itemKey={`container.accessors.${accessorId}.bankIndex`}
417+
overrideHelper={overrideHelper}
418+
>
419+
{(value, handleUpdate) => <IntInputControl value={value} handleUpdate={handleUpdate} />}
420+
</LabelAndOverrides>
421+
<LabelAndOverridesForDropdown
422+
label={t('Media Type')}
423+
hint={t('What type of bank')}
424+
item={packageContainer}
425+
//@ts-expect-error can't be 4 levels deep
426+
itemKey={`container.accessors.${accessorId}.mediaType`}
427+
overrideHelper={overrideHelper}
428+
options={getDropdownInputOptions(['clip', 'still'])}
429+
>
430+
{(value, handleUpdate, options) => {
431+
return <DropdownInputControl options={options} value={value} handleUpdate={handleUpdate} />
432+
}}
433+
</LabelAndOverridesForDropdown>
434+
</>
365435
) : null}
366436

367437
<LabelAndOverridesForCheckbox

0 commit comments

Comments
 (0)