git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit c73d5a63da14de54092ef0559bc803136834352c

add the Wall button (to get the mentions of others)

Ev Bogue committed on 11/12/2018, 7:35:22 PM
Parent: e92a779cbb192b4db12c3972a692fe384b8cb71d

Files changed

bin.jschanged
index.jschanged
views.jschanged
bin.jsView
@@ -53,8 +53,10 @@
5353 .use(require('scuttlebot/plugins/invite'))
5454 .use(require('scuttlebot/plugins/local'))
5555 .use(require('scuttlebot/plugins/logging'))
5656 .use(require('ssb-query'))
57+ .use(require('ssb-backlinks'))
58+ .use(require('ssb-search'))
5759 .use(require('./mvd-indexes'))
5860 .use(require('ssb-links'))
5961 .use(require('ssb-ws'))
6062 .use(require('ssb-ebt'))
index.jsView
@@ -49,9 +49,9 @@
4949 }
5050 })),
5151 h('li', h('a', {href: '#' }, 'All')),
5252 h('li', h('a', {href: '#private' }, 'Private')),
53- h('li', h('a', {href: '#mentions' }, 'Mentions')),
53+ h('li', h('a', {href: '#wall/' + id }, 'Wall')),
5454 h('li', h('a', {href: '#queue'}, 'Queue')),
5555 h('li', h('a', {href: '#key' }, 'Key')),
5656 h('li.right', h('a', {href: '#about'}, '?')),
5757 h('form.search', {
views.jsView
@@ -105,9 +105,9 @@
105105 })
106106 )
107107 }
108108
109-var mentionsStream = function () {
109+var mentionsStream = function (src) {
110110 var content = h('div.content')
111111
112112 var screen = document.getElementById('screen')
113113
@@ -128,9 +128,9 @@
128128 limit: 10,
129129 reverse: true,
130130 index: 'DTA',
131131 live: false,
132- query: [{$filter: {dest: id}}]
132+ query: [{$filter: {dest: src}}]
133133 }),
134134 stream.bottom(content)
135135 )
136136
@@ -139,9 +139,9 @@
139139 limit: 10,
140140 old: false,
141141 index: 'DTA',
142142 live: true,
143- query: [{$filter: {dest: id}}]
143+ query: [{$filter: {dest: src}}]
144144 }),
145145 stream.top(content)
146146 )
147147 }
@@ -328,10 +328,10 @@
328328 profile.firstChild.appendChild(tools.getBlocks(src))
329329 profile.firstChild.appendChild(tools.getBlocked(src))
330330 }
331331 }))
332+ buttons.appendChild(h('a', {href: '#wall/' + src}, h('button.btn', avatar.name(src), "'s wall")))
332333
333-
334334 }
335335
336336 var privateMsg = function (src) {
337337 var content = h('div.content')
@@ -568,18 +568,17 @@
568568 }
569569
570570 module.exports = function () {
571571 var src = hash()
572- console.log(src)
573572
574573 if (src.substring(52, 59) == '?unbox=') {
575574 privateMsg(src)
576575 } else if (ref.isFeed(src)) {
577576 userStream(src)
578577 } else if (ref.isMsg(src)) {
579578 msgThread(src)
580- } else if (src == 'mentions') {
581- mentionsStream()
579+ } else if (ref.isFeed(src.substring(5))) {
580+ mentionsStream(src.substring(5))
582581 } else if (src == 'queue') {
583582 queueStream()
584583 } else if (src == 'about') {
585584 about()

Built with git-ssb-web