git ssb

16+

Dominic / patchbay



Tree: 6791a012f6f25d8aeb64cae36c5f8ff3b21e9132

Files: 6791a012f6f25d8aeb64cae36c5f8ff3b21e9132 / app / sync / initialise / user-action-listeners.js

759 bytesRaw
1const nest = require('depnest')
2const electron = require('electron')
3
4exports.gives = nest('app.sync.initialise')
5
6exports.needs = nest({
7 'app.async.catchLinkClick': 'first',
8 'app.sync.catchKeyboardShortcut': 'first',
9 'app.html.tabs': 'first'
10})
11
12exports.create = function (api) {
13 return nest('app.sync.initialise', userActionListeners)
14
15 function userActionListeners (App) {
16 const tabs = api.app.html.tabs()
17
18 api.app.sync.catchKeyboardShortcut(window)
19 api.app.async.catchLinkClick(App)
20
21 electron.ipcRenderer.on('nextTab', () => {
22 tabs.nextTab()
23 })
24
25 electron.ipcRenderer.on('previousTab', () => {
26 tabs.previousTab()
27 })
28
29 electron.ipcRenderer.on('closeTab', () => {
30 tabs.closeCurrentTab()
31 })
32 }
33}
34

Built with git-ssb-web