git ssb

16+

Dominic / patchbay



Tree: d1e8d32373cb38ce057fe5f2be8930da57018faa

Files: d1e8d32373cb38ce057fe5f2be8930da57018faa / modules_core / 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.menu.column', {style: 'display: none;'})
8
9var menu = h('div.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