mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 06:21:35 -05:00
59f6f34083
Refactor "HotKeys" modal GitOrigin-RevId: 1df86322bac229bb04092e872300e5f1ee4cbddc
26 lines
664 B
JavaScript
26 lines
664 B
JavaScript
import App from '../../../base'
|
|
import { react2angular } from 'react2angular'
|
|
|
|
import HotkeysModal from '../components/hotkeys-modal'
|
|
|
|
App.component('hotkeysModal', react2angular(HotkeysModal, undefined))
|
|
|
|
export default App.controller('HotkeysModalController', function($scope) {
|
|
$scope.show = false
|
|
$scope.isMac = /Mac/i.test(navigator.platform)
|
|
|
|
$scope.handleHide = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.show = false
|
|
})
|
|
}
|
|
|
|
$scope.openHotkeysModal = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.trackChangesVisible =
|
|
$scope.project && $scope.project.features.trackChangesVisible
|
|
|
|
$scope.show = true
|
|
})
|
|
}
|
|
})
|