18 lines
396 B
JavaScript
18 lines
396 B
JavaScript
function initUiObservers(store, _router) {
|
|
document.addEventListener('keypress', (event) => {
|
|
if (event.target.tagName === 'INPUT') {
|
|
return;
|
|
}
|
|
|
|
if (event.key === 's') {
|
|
store.dispatch('setSfw', true);
|
|
}
|
|
|
|
if (event.key === 'n') {
|
|
store.dispatch('setSfw', false);
|
|
}
|
|
});
|
|
}
|
|
|
|
export default initUiObservers;
|