git ssb

3+

ev / decent



Commit 5f3a0f515ae7082db52617e561a1eabc8ff94cc2

don't show follow and nudge buttons if you're on your own profile

Ev Bogue committed on 10/17/2017, 11:36:18 PM
Parent: 9796ea6b79e5352d1c78c5ed6c6028b062703bf4

Files changed

client/modules/avatar-profile.jschanged
client/modules/edit.jschanged
client/modules/follow.jschanged
client/modules/nudge.jschanged
client/modules/avatar-profile.jsView
@@ -22,10 +22,10 @@
2222 console.log('id is: ' + id)
2323 console.log('self_id is: ' + self_id.id)
2424
2525 if (id == self_id.id) {
26- edit = h('p', h('a', {href: '#Edit'}, 'Edit profile'))
27- }
26 + edit = h('p', h('a', {href: '#Edit'}, h('button.btn.btn-primary', 'Edit profile')))
27 + } else { edit = api.avatar_action(id)}
2828
2929 pull(api.sbot_query({query: [{$filter: { value: { author: id, content: {type: 'about', loc: {"$truthy": true}}}}}], limit: 1, reverse: true}),
3030 pull.drain(function (data){
3131 if(data.value.content.loc) {
@@ -47,12 +47,12 @@
4747 loco,
4848 desc,
4949 h('pre', h('code', id)),
5050 edit
51- ),
51 + )/*,
5252 h('div.message',
5353 api.avatar_action(id)
54- )
54 + )*/
5555 )
5656 }
5757 }
5858
client/modules/edit.jsView
@@ -28,9 +28,9 @@
2828 h('div.column.scroller__content',
2929 h('div.message',
3030 h('h1', 'Edit profile'),
3131 nameInput,
32- h('button', 'Preview', {onclick: function () {
32 + h('button.btn.btn-primary', 'Preview', {onclick: function () {
3333 if(nameInput.value) {
3434 api.message_confirm({
3535 type: 'about',
3636 about: id,
@@ -39,9 +39,9 @@
3939 }
4040 }}),
4141 h('br'),
4242 locInput,
43- h('button', 'Preview', {onclick: function () {
43 + h('button.btn.btn-primary', 'Preview', {onclick: function () {
4444 if(locInput.value) {
4545 api.message_confirm({
4646 type: 'about',
4747 about: id,
@@ -50,9 +50,9 @@
5050 }
5151 }}),
5252 h('br'),
5353 imgInput,
54- h('button', 'Preview', {onclick: function () {
54 + h('button.btn.btn-primary', 'Preview', {onclick: function () {
5555 if(imgInput.value) {
5656 if (ref.isBlobId(imgInput.value)) {
5757 api.message_confirm({
5858 type: 'about',
client/modules/follow.jsView
@@ -84,8 +84,8 @@
8484 if (err) return console.error(err)
8585 you_follow = msg.value.content.following
8686 update()
8787 })
88- }}, h('button', label))
88 + }}, h('button.btn', label))
8989 }
9090 return exports
9191 }
client/modules/nudge.jsView
@@ -30,9 +30,9 @@
3030 api.message_confirm({
3131 type: 'nudge',
3232 id: id
3333 })
34- }}, h('button', 'Nudge'))
34 + }}, h('button.btn', 'Nudge'))
3535 }
3636
3737 return exports
3838 }

Built with git-ssb-web