max 1 subtitle file (#5244)
parent
436e30fded
commit
0f6be244a6
|
@ -20,6 +20,8 @@ import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {SubtitleFilePicker} from './SubtitleFilePicker'
|
import {SubtitleFilePicker} from './SubtitleFilePicker'
|
||||||
|
|
||||||
|
const MAX_NUM_CAPTIONS = 1
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
defaultAltText: string
|
defaultAltText: string
|
||||||
captions: {lang: string; file: File}[]
|
captions: {lang: string; file: File}[]
|
||||||
|
@ -134,7 +136,9 @@ function SubtitleDialogInner({
|
||||||
</Text>
|
</Text>
|
||||||
<SubtitleFilePicker
|
<SubtitleFilePicker
|
||||||
onSelectFile={handleSelectFile}
|
onSelectFile={handleSelectFile}
|
||||||
disabled={subtitleMissingLanguage || captions.length >= 4}
|
disabled={
|
||||||
|
subtitleMissingLanguage || captions.length >= MAX_NUM_CAPTIONS
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<View>
|
<View>
|
||||||
{captions.map((subtitle, i) => (
|
{captions.map((subtitle, i) => (
|
||||||
|
|
Loading…
Reference in New Issue