mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
import { useTranslation, Trans } from 'react-i18next'
|
|
import getMeta from '@/utils/meta'
|
|
import {
|
|
OLModalBody,
|
|
OLModalFooter,
|
|
} from '@/shared/components/ol/ol-modal'
|
|
import OLButton from '@/shared/components/ol/ol-button'
|
|
import OLNotification from '@/shared/components/ol/ol-notification'
|
|
|
|
import { ProjectSyncState, GitSyncModalStatus } from '../../types/git-sync-types'
|
|
|
|
type GitSyncConflictModalProps = {
|
|
projectSyncState: ProjectSyncState
|
|
handleHide: () => void
|
|
setModalStatus: (modalStatus: GitSyncModalStatus) => void
|
|
}
|
|
|
|
const GitSyncConflictModal = ({ projectSyncState, handleHide, setModalStatus }: GitSyncConflictModalProps) => {
|
|
const { t } = useTranslation()
|
|
const { appName } = getMeta('ol-ExposedSettings')
|
|
|
|
return (
|
|
<>
|
|
<OLModalBody>
|
|
<OLNotification
|
|
type="warning"
|
|
content={t('gitlab_merge_failed_error', { appName })}
|
|
/>
|
|
<p className="mt-2">
|
|
<Trans
|
|
i18nKey="gitlab_manual_merge_user_prompt"
|
|
values={{sharelatex_branch: projectSyncState.unmergedBranchName }}
|
|
components={[<b />]}
|
|
/>
|
|
</p>
|
|
</OLModalBody>
|
|
<OLModalFooter>
|
|
<OLButton
|
|
variant="secondary"
|
|
onClick={handleHide}
|
|
>
|
|
{t('close')}
|
|
</OLButton>
|
|
<OLButton
|
|
variant="primary"
|
|
onClick={
|
|
() => setModalStatus('run-merge-resolved')
|
|
}
|
|
>
|
|
{t('continue_gitlab_merge')}
|
|
</OLButton>
|
|
</OLModalFooter>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default GitSyncConflictModal
|