hotkeys-modal-controller.js 600 B

12345678910111213141516171819202122232425
  1. import App from '../../../base'
  2. import { react2angular } from 'react2angular'
  3. import HotkeysModal from '../components/hotkeys-modal'
  4. App.component('hotkeysModal', react2angular(HotkeysModal))
  5. export default App.controller('HotkeysModalController', function($scope) {
  6. $scope.show = false
  7. $scope.handleHide = () => {
  8. $scope.$applyAsync(() => {
  9. $scope.show = false
  10. })
  11. }
  12. $scope.openHotkeysModal = () => {
  13. $scope.trackChangesVisible =
  14. $scope.project && $scope.project.features.trackChangesVisible
  15. $scope.$applyAsync(() => {
  16. $scope.show = true
  17. })
  18. }
  19. })