Skip to content

Commit

Permalink
Updating the USFM import dailog box (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
vipinpaul authored Nov 22, 2024
1 parent 84a768f commit 629e838
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions renderer/src/components/Projects/NewProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,12 @@ export default function NewProject({ call, project, closeEdit }) {
/>
<ConfirmationModal
openModal={replaceWarning}
title="Do Not Replace Existing Content"
title="Confirm Overwriting content"
setOpenModal={setReplaceWarning}
confirmMessage="This action will replace if the existing contents, Press OK to Avoid or CANCEL to continue edit with replace"
buttonName={t('btn-ok')}
confirmMessage="This will overwrite existing content in your project. Do you want to proceed?"
buttonName={t('btn-cancel')}
closeModal={closeEdit}
cancelButtonName={t('label-overwrite')}
/>
<ConfirmationModal
openModal={openModalJuxtaWrongSetOfBooks}
Expand Down
5 changes: 3 additions & 2 deletions renderer/src/layouts/editor/ConfirmationModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function ConfirmationModal({
loading: false,
},
showCancelButton = true,
cancelButtonName,
}) {
const cancelButtonRef = useRef(null);
const { t } = useTranslation();
Expand Down Expand Up @@ -101,11 +102,11 @@ export default function ConfirmationModal({
{showCancelButton && (
<button
type="button"
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
className={`mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 ${cancelButtonName ? 'bg-green-600 hover:bg-green-700 text-white' : 'bg-white hover:bg-gray-50 text-gray-700'} text-base font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm`}
onClick={() => setOpenModal(false)}
ref={cancelButtonRef}
>
{t('btn-cancel')}
{cancelButtonName || t('btn-cancel')}
</button>
)}
</div>
Expand Down

0 comments on commit 629e838

Please sign in to comment.