mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 18:05:49 -05:00
430b7528b2
Add UI to Remove Words from Dictionary GitOrigin-RevId: a28d865e3c968d6fff113237fcf4143b77af046e
26 lines
686 B
JavaScript
26 lines
686 B
JavaScript
import App from '../../../base'
|
|
import { react2angular } from 'react2angular'
|
|
import DictionaryModal from '../components/dictionary-modal'
|
|
import { rootContext } from '../../../shared/context/root-context'
|
|
|
|
export default App.controller('DictionaryModalController', function ($scope) {
|
|
$scope.show = false
|
|
|
|
$scope.handleHide = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.show = false
|
|
window.dispatchEvent(new CustomEvent('learnedWords:reset'))
|
|
})
|
|
}
|
|
|
|
$scope.openModal = () => {
|
|
$scope.$applyAsync(() => {
|
|
$scope.show = true
|
|
})
|
|
}
|
|
})
|
|
|
|
App.component(
|
|
'dictionaryModal',
|
|
react2angular(rootContext.use(DictionaryModal), ['show', 'handleHide'])
|
|
)
|