git ssb

16+

Dominic / patchbay



Tree: c1a1dc7a8dc3f88bd242e418cb5715798385f4e4

Files: c1a1dc7a8dc3f88bd242e418cb5715798385f4e4 / app / sync / initialise / userActionListeners.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