min items
This commit is contained in:
@@ -536,6 +536,8 @@ function Footer({
|
|||||||
(state.currentStep === 'Profiles' && items.length > 1) ||
|
(state.currentStep === 'Profiles' && items.length > 1) ||
|
||||||
(state.currentStep === 'Feeds' && items.length > 0)
|
(state.currentStep === 'Feeds' && items.length > 0)
|
||||||
|
|
||||||
|
const minimumItems = state.currentStep === 'Profiles' ? 8 : 0
|
||||||
|
|
||||||
const textStyles = [a.text_md]
|
const textStyles = [a.text_md]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -562,7 +564,7 @@ function Footer({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
]}>
|
]}>
|
||||||
{items.length > 0 && (
|
{items.length > minimumItems && (
|
||||||
<View style={[a.absolute, {right: 14, top: 31}]}>
|
<View style={[a.absolute, {right: 14, top: 31}]}>
|
||||||
<Text style={[a.font_bold]}>
|
<Text style={[a.font_bold]}>
|
||||||
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
|
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
|
||||||
@@ -631,33 +633,54 @@ function Footer({
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
<View
|
{state.currentStep === 'Profiles' && items.length < 8 && !__DEV__ ? (
|
||||||
style={[a.flex_row, a.w_full, a.justify_between, {marginTop: 'auto'}]}>
|
<Text
|
||||||
{isEditEnabled ? (
|
style={[
|
||||||
|
a.font_bold,
|
||||||
|
textStyles,
|
||||||
|
t.atoms.text_contrast_medium,
|
||||||
|
{marginTop: 'auto'},
|
||||||
|
]}>
|
||||||
|
<Trans>
|
||||||
|
Add {8 - items.length} more{' '}
|
||||||
|
<Plural value={8 - items.length} one="person" other="people" /> to
|
||||||
|
continue
|
||||||
|
</Trans>
|
||||||
|
</Text>
|
||||||
|
) : (
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
a.flex_row,
|
||||||
|
a.w_full,
|
||||||
|
a.justify_between,
|
||||||
|
{marginTop: 'auto'},
|
||||||
|
]}>
|
||||||
|
{isEditEnabled ? (
|
||||||
|
<Button
|
||||||
|
label={_(msg`Edit`)}
|
||||||
|
variant="outline"
|
||||||
|
color="primary"
|
||||||
|
size="small"
|
||||||
|
onPress={editDialogControl.open}>
|
||||||
|
<ButtonText>
|
||||||
|
<Trans>Edit</Trans>
|
||||||
|
</ButtonText>
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<View />
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
label={_(msg`Edit`)}
|
label={nextBtnText}
|
||||||
variant="outline"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="small"
|
size="small"
|
||||||
onPress={editDialogControl.open}>
|
onPress={onNext}
|
||||||
<ButtonText>
|
disabled={!state.canNext}>
|
||||||
<Trans>Edit</Trans>
|
<ButtonText>{nextBtnText}</ButtonText>
|
||||||
</ButtonText>
|
{state.processing && <Loader size="xs" style={{color: 'white'}} />}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
</View>
|
||||||
<View />
|
)}
|
||||||
)}
|
|
||||||
<Button
|
|
||||||
label={nextBtnText}
|
|
||||||
variant="solid"
|
|
||||||
color="primary"
|
|
||||||
size="small"
|
|
||||||
onPress={onNext}
|
|
||||||
disabled={!state.canNext}>
|
|
||||||
<ButtonText>{nextBtnText}</ButtonText>
|
|
||||||
{state.processing && <Loader size="xs" style={{color: 'white'}} />}
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<WizardEditListDialog
|
<WizardEditListDialog
|
||||||
control={editDialogControl}
|
control={editDialogControl}
|
||||||
|
|||||||
Reference in New Issue
Block a user