git ssb

2+

ev / mvd



Commit 49b26bd61308636377cd0415065fedba69c8b4d7

only allow one composer to launch at a time

Ev Bogue committed on 5/25/2018, 9:15:26 PM
Parent: e55f2b6f8739b7b56427b8bbdab3f5e3802ec8b0

Files changed

index.jschanged
index.jsView
@@ -15,13 +15,16 @@
1515 h('li', h('a', {href: '#' + id}, h('span.avatar--small', avatar.image(id)))),
1616 h('li', h('a', {href: '#' + id}, avatar.name(id))),
1717 h('li', h('a', 'Compose', {
1818 onclick: function () {
19- var currentScreen = document.getElementById('screen')
20- var opts = {}
21- opts.type = 'post'
22- var composer = h('div.content#composer', h('div.message', compose(opts)))
23- currentScreen.firstChild.insertBefore(composer, currentScreen.firstChild.firstChild)
19 + if (document.getElementById('composer')) { return }
20 + else {
21 + var currentScreen = document.getElementById('screen')
22 + var opts = {}
23 + opts.type = 'post'
24 + var composer = h('div.content#composer', h('div.message', compose(opts)))
25 + currentScreen.firstChild.insertBefore(composer, currentScreen.firstChild.firstChild)
26 + }
2427 }
2528 })),
2629 h('li', h('a', {href: '#'}, 'Public')),
2730 h('li', h('a', {href: '#private' }, 'Private')),

Built with git-ssb-web