mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9cde88a9e8
[web] Add wrapper for copy modal GitOrigin-RevId: 8291f953e418815797e8474a69de8f15c39af7b5
35 lines
873 B
JavaScript
35 lines
873 B
JavaScript
import App from '../../../base'
|
|
import { react2angular } from 'react2angular'
|
|
import EditorCloneProjectModalWrapper from '../components/editor-clone-project-modal-wrapper'
|
|
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 = project => {
|
|
window.location.assign(`/project/${project.project_id}`)
|
|
}
|
|
}
|
|
)
|
|
|
|
App.component(
|
|
'cloneProjectModal',
|
|
react2angular(
|
|
rootContext.use(EditorCloneProjectModalWrapper),
|
|
Object.keys(EditorCloneProjectModalWrapper.propTypes)
|
|
)
|
|
)
|