diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index fb35fca00..1f64dc700 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -335,7 +335,8 @@ "scheduled_for":"Scheduled For", "scheduled_immediate":"Immediate", "scheduled_later":"Later", - "settings_title":"Post Settings" + "settings_title":"Post Options", + "done":"DONE" }, "snippets":{ "label_no_snippets":"No Snippets Found", diff --git a/src/screens/editor/children/beneficiarySelectionContent.tsx b/src/screens/editor/children/beneficiarySelectionContent.tsx index 6a34273c7..37baf9998 100644 --- a/src/screens/editor/children/beneficiarySelectionContent.tsx +++ b/src/screens/editor/children/beneficiarySelectionContent.tsx @@ -14,10 +14,11 @@ import { TEMP_BENEFICIARIES_ID } from '../../../redux/constants/constants'; import { removeBeneficiaries, setBeneficiaries as setBeneficiariesAction } from '../../../redux/actions/editorActions'; interface BeneficiarySelectionContent { - draftId:string, + draftId:string; + setDisableDone:(value:boolean)=>void; } -const BeneficiarySelectionContent = ({ draftId }) => { +const BeneficiarySelectionContent = ({ draftId, setDisableDone }) => { const intl = useIntl(); const dispatch = useAppDispatch(); @@ -38,6 +39,10 @@ const BeneficiarySelectionContent = ({ draftId }) => { readTempBeneficiaries(); }, [draftId]); + useEffect(() => { + setDisableDone(newEditable) + }, [newEditable]) + const readTempBeneficiaries = async () => { if(beneficiariesMap){ diff --git a/src/screens/editor/children/editorSettingsModal.tsx b/src/screens/editor/children/editorSettingsModal.tsx index 03783cf66..ed0a4820f 100644 --- a/src/screens/editor/children/editorSettingsModal.tsx +++ b/src/screens/editor/children/editorSettingsModal.tsx @@ -2,12 +2,13 @@ import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'rea import { useIntl } from 'react-intl'; import { View } from 'react-native'; -import { DateTimePicker, Modal, SettingsItem } from '../../../components'; +import { DateTimePicker, MainButton, Modal, SettingsItem } from '../../../components'; import styles from './editorSettingsModalStyles'; import ThumbSelectionContent from './thumbSelectionContent'; import {View as AnimatedView} from 'react-native-animatable'; import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; import BeneficiarySelectionContent from './beneficiarySelectionContent'; +import EStyleSheet from 'react-native-extended-stylesheet'; const REWARD_TYPES = [ { @@ -60,6 +61,7 @@ const EditorSettingsModal = forwardRef(({ const [scheduleLater, setScheduleLater] = useState(false) const [shouldReblog, setShouldReblog] = useState(false); const [scheduledFor, setScheduledFor] = useState(''); + const [disableDone, setDisableDone] = useState(false); useEffect(() => { if(handleThumbSelection){ @@ -105,82 +107,97 @@ const EditorSettingsModal = forwardRef(({ const _handleDatePickerChange = (date:string) => { setScheduledFor(date); } + + const _onDonePress = () => { + setShowModal(false); + } const _renderContent = ( - - - {!isEdit && ( - <> - { - setScheduleLater(index === 1) - }} - /> - - {scheduleLater && ( - - - - - )} - - intl.formatMessage({ id: type.intlId})) - } - selectedOptionIndex={rewardTypeIndex} - handleOnChange={_handleRewardChange} - /> - - - {isCommunityPost && ( + + + + {!isEdit && ( + <> + { + setScheduleLater(index === 1) + }} + /> + + {scheduleLater && ( + + + + + )} + intl.formatMessage({ id: type.intlId})) + } + selectedOptionIndex={rewardTypeIndex} + handleOnChange={_handleRewardChange} /> - )} - - )} + + + {isCommunityPost && ( + + )} + + )} + + + + + {!isEdit && ( + + )} + + + - - - {!isEdit && ( - - )} - - - - + + ) diff --git a/src/screens/editor/children/editorSettingsModalStyles.ts b/src/screens/editor/children/editorSettingsModalStyles.ts index 6758d9a3d..79dce22c8 100644 --- a/src/screens/editor/children/editorSettingsModalStyles.ts +++ b/src/screens/editor/children/editorSettingsModalStyles.ts @@ -65,13 +65,15 @@ export default EStyleSheet.create({ color:'$pureWhite' } as TextStyle, saveButton:{ - backgroundColor:'$primaryBlue', width:150, paddingVertical:16, borderRadius:32, + marginVertical:16, + marginRight:32, justifyContent:'center', - alignItems:'center' + alignItems:'center', + alignSelf:'flex-end' } as ViewStyle, closeButton:{ marginRight:16,