mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-18 06:01:27 -05:00
69482d9d3c
GitOrigin-RevId: 03f5164d117713efd78c9806bdda6e6d5c90f6dc
35 lines
812 B
JavaScript
35 lines
812 B
JavaScript
import App from '../../../base'
|
|
import { react2angular } from 'react2angular'
|
|
import CloneProjectModal from '../components/clone-project-modal'
|
|
import { rootContext } from '../../../shared/context/root-context'
|
|
|
|
export default App.controller(
|
|
'LeftMenuCloneProjectModalController',
|
|
function ($scope) {
|
|
$scope.show = false
|
|
|
|
$scope.handleHide = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.show = false
|
|
})
|
|
}
|
|
|
|
$scope.openCloneProjectModal = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.show = true
|
|
})
|
|
}
|
|
|
|
$scope.openProject = projectId => {
|
|
window.location.assign(`/project/${projectId}`)
|
|
}
|
|
}
|
|
)
|
|
|
|
App.component(
|
|
'cloneProjectModal',
|
|
react2angular(
|
|
rootContext.use(CloneProjectModal),
|
|
Object.keys(CloneProjectModal.propTypes)
|
|
)
|
|
)
|