overleaf/services/web/frontend/js/features/hotkeys-modal/controllers/hotkeys-modal-controller.js
Alf Eaton 771a39f267 Merge pull request #3441 from overleaf/3803-hotkeys-modal
Migrate hotkeys modal to React

GitOrigin-RevId: 78399d3d62771cd296bdc2f4f8b1083263d31551
2020-12-11 03:04:42 +00:00

25 lines
600 B
JavaScript

import App from '../../../base'
import { react2angular } from 'react2angular'
import HotkeysModal from '../components/hotkeys-modal'
App.component('hotkeysModal', react2angular(HotkeysModal))
export default App.controller('HotkeysModalController', function($scope) {
$scope.show = false
$scope.handleHide = () => {
$scope.$applyAsync(() => {
$scope.show = false
})
}
$scope.openHotkeysModal = () => {
$scope.trackChangesVisible =
$scope.project && $scope.project.features.trackChangesVisible
$scope.$applyAsync(() => {
$scope.show = true
})
}
})