mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Github Sync: initial commit
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
import { useTranslation } 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'
|
||||
|
||||
const GitSyncNeedAuthModal = ({ handleHide }: { handleHide: () => void }) => {
|
||||
const { t } = useTranslation()
|
||||
const { appName } = getMeta('ol-ExposedSettings')
|
||||
return (
|
||||
<>
|
||||
<OLModalBody>
|
||||
<p>{t('link_to_github_description', { appName })}</p>
|
||||
</OLModalBody>
|
||||
<OLModalFooter>
|
||||
<OLButton
|
||||
variant="secondary"
|
||||
onClick={handleHide}
|
||||
>
|
||||
{t('close')}
|
||||
</OLButton>
|
||||
|
||||
<OLButton
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
handleHide()
|
||||
window.open(
|
||||
'/user/github-sync/oauth2',
|
||||
'githubAuth',
|
||||
'width=600,height=700'
|
||||
)
|
||||
}}
|
||||
>
|
||||
{t('link_to_github')}
|
||||
</OLButton>
|
||||
</OLModalFooter>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default GitSyncNeedAuthModal
|
||||
Reference in New Issue
Block a user