git ssb

16+

Dominic / patchbay



Commit d1e8d32373cb38ce057fe5f2be8930da57018faa

Merge remote-tracking branch 'origin/updates'

Dominic Tarr committed on 11/28/2016, 9:41:49 PM
Parent: 638952804a57a1897527c5068701efd5fee36915
Parent: dea3d20f5c389390227401809a5db4c76f77db09

Files changed

modules_basic/follow.jschanged
modules_basic/names.jschanged
modules_core/tabs.jschanged
style.csschanged
modules_basic/follow.jsView
@@ -52,9 +52,9 @@
5252 update()
5353 })
5454
5555 var state = h('label')
56- var label = h('label')
56 + var label = h('span')
5757
5858 function update () {
5959 state.textContent = (
6060 follows_you && you_follow ? 'friend'
@@ -71,10 +71,12 @@
7171 message_confirm({
7272 type: 'contact',
7373 contact: id,
7474 following: !you_follow
75- }, function (err) {
76- //TODO: update after following.
75 + }, function (err, msg) {
76 + if (err) return console.error(err)
77 + you_follow = msg.value.content.following
78 + update()
7779 })
7880 }}, h('br'), label)
7981 )
8082 }
modules_basic/names.jsView
@@ -91,14 +91,33 @@
9191 })
9292 )
9393 }
9494
95 +var queryNamedGitRepos = [
96 + {$filter: {
97 + value: {
98 + content: {
99 + type: "git-repo",
100 + name: {"$prefix": ""}
101 + }
102 + }
103 + }},
104 + {$map: {
105 + name: ["value", "content", "name"],
106 + id: ['key'],
107 + ts: "timestamp"
108 + }},
109 + reduce
110 +]
111 +
112 +
95113 exports.connection_status = function (err) {
96114 if(!err) {
97115 pull(
98116 many([
99117 sbot_links2({query: [filter, map, reduce]}),
100- add_sigil(sbot_query({query: [filter2, map2, reduce]}))
118 + add_sigil(sbot_query({query: [filter2, map2, reduce]})),
119 + add_sigil(sbot_query({query: queryNamedGitRepos}))
101120 ]),
102121 //reducing also ensures order by the lookup properties
103122 //in this case: [name, id]
104123 mfr.reduce(merge),
@@ -112,9 +131,10 @@
112131 )
113132
114133 pull(many([
115134 sbot_links2({query: [filter, map], old: false}),
116- add_sigil(sbot_query({query: [filter2, map2], old: false}))
135 + add_sigil(sbot_query({query: [filter2, map2], old: false})),
136 + add_sigil(sbot_query({query: queryNamedGitRepos, old: false}))
117137 ]),
118138 pull.drain(update))
119139 }
120140 }
modules_core/tabs.jsView
@@ -85,8 +85,11 @@
8585
8686 ev.preventDefault()
8787 ev.stopPropagation()
8888
89 + //let the application handle this link
90 + if (link.getAttribute('href') === '#') return
91 +
8992 //open external links.
9093 //this ought to be made into something more runcible
9194 if(open.isExternal(link.href)) return open(link.href)
9295
@@ -160,11 +163,12 @@
160163 })
161164
162165 // errors tab
163166 var errorsContent = h('div.column.scroller__content')
164- var errors = h('div.column.scroller',
165- {style: {'overflow':'auto'}},
166- h('div.scroller__wrapper',
167 + var errors = h('div.column.scroller', {
168 + id: 'errors',
169 + style: {'overflow':'auto'}
170 + }, h('div.scroller__wrapper',
167171 errorsContent
168172 )
169173 )
170174
@@ -173,10 +177,8 @@
173177 window.removeEventListener('error', window.onError)
174178 delete window.onError
175179 }
176180
177- var errors = h('div.errors', {id: 'errors'})
178-
179181 // put errors in a tab
180182 window.addEventListener('error', function (ev) {
181183 var err = ev.error || ev
182184 if(!tabs.has('errors'))
style.cssView
@@ -109,8 +109,9 @@
109109 }
110110
111111 textarea {
112112 padding: .5em;
113 + font-size: 1em;
113114 }
114115
115116 textarea:focus {
116117 outline: none;

Built with git-ssb-web