git ssb

16+

Dominic / patchbay



Tree: a20d5059cc43f723aefd7fe6e3a79aa751ded3a9

Files: a20d5059cc43f723aefd7fe6e3a79aa751ded3a9 / app / sync / initialise / userActionListeners.js

726 bytesRaw
1const nest = require('depnest')
2
3exports.gives = nest('app.sync.initialise')
4
5exports.needs = nest({
6 'app.async.catchLinkClick': 'first',
7 'app.sync.catchKeyboardShortcut': 'first',
8 'app.html.tabs': 'first',
9})
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}
35
36

Built with git-ssb-web