git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: f37ef7f30e013104c6e999fbd9ada54421e74c5e

Files: f37ef7f30e013104c6e999fbd9ada54421e74c5e / modules / menu.js

665 bytesRaw
1var plugs = require('../plugs')
2var h = require('hyperscript')
3
4var menu_items = plugs.map(exports.menu_items = [])
5
6var status = h('div.status.error') //start off disconnected
7 var list = h('div.column', {style: 'display: none;'})
8
9var menu = h('div.menu.column', status, list , {
10 onmouseover: function (e) {
11 list.style.display = 'flex'
12 }, onmouseout: function () {
13 list.style.display = 'none'
14 }
15})
16
17exports.connection_status = function (err) {
18 if(err) status.classList.add('error')
19 else status.classList.remove('error')
20}
21
22exports.menu = function () {
23 menu_items().forEach(function (el) {
24 list.appendChild(el)
25 })
26
27 return menu
28}
29
30
31
32

Built with git-ssb-web