2021-01-06 05:30:08 -05:00
|
|
|
import App from '../../../base'
|
|
|
|
import { react2angular } from 'react2angular'
|
2022-09-15 05:59:11 -04:00
|
|
|
import EditorCloneProjectModalWrapper from '../components/editor-clone-project-modal-wrapper'
|
2021-09-14 04:54:21 -04:00
|
|
|
import { rootContext } from '../../../shared/context/root-context'
|
2023-03-16 08:32:48 -04:00
|
|
|
import { assign } from '../../../shared/components/location'
|
2021-01-06 05:30:08 -05:00
|
|
|
|
2021-04-14 09:17:21 -04:00
|
|
|
export default App.controller(
|
|
|
|
'LeftMenuCloneProjectModalController',
|
2021-09-14 04:54:21 -04:00
|
|
|
function ($scope) {
|
2021-04-14 09:17:21 -04:00
|
|
|
$scope.show = false
|
|
|
|
|
|
|
|
$scope.handleHide = () => {
|
|
|
|
$scope.$applyAsync(() => {
|
|
|
|
$scope.show = false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.openCloneProjectModal = () => {
|
|
|
|
$scope.$applyAsync(() => {
|
2021-09-14 04:54:21 -04:00
|
|
|
$scope.show = true
|
2021-04-14 09:17:21 -04:00
|
|
|
})
|
|
|
|
}
|
2021-09-14 04:54:21 -04:00
|
|
|
|
2022-09-15 05:59:11 -04:00
|
|
|
$scope.openProject = project => {
|
2023-03-16 08:32:48 -04:00
|
|
|
assign(`/project/${project.project_id}`)
|
2021-09-14 04:54:21 -04:00
|
|
|
}
|
2021-01-06 05:30:08 -05:00
|
|
|
}
|
2021-04-14 09:17:21 -04:00
|
|
|
)
|
2021-09-14 04:54:21 -04:00
|
|
|
|
|
|
|
App.component(
|
|
|
|
'cloneProjectModal',
|
|
|
|
react2angular(
|
2022-09-15 05:59:11 -04:00
|
|
|
rootContext.use(EditorCloneProjectModalWrapper),
|
|
|
|
Object.keys(EditorCloneProjectModalWrapper.propTypes)
|
2021-09-14 04:54:21 -04:00
|
|
|
)
|
|
|
|
)
|