hotkeys-modal-controller.js 665 B

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