git ssb

10+

Matt McKegg / patchwork



Commit 4cc30d67ab2fb4e8d20b9119e9e8b6a37ef09f81

use @ KEY... format for missing key names

Matt McKegg committed on 10/19/2017, 4:47:51 AM
Parent: a6714b555b835f7ff3d98bee676b807e65593503

Files changed

modules/profile/sheet/edit.jschanged
plugs/about/sync/short-feed-id.jsadded
modules/profile/sheet/edit.jsView
@@ -17,8 +17,9 @@
1717 },
1818 'blob.html.input': 'first',
1919 'blob.sync.url': 'first',
2020 'intl.sync.i18n': 'first',
21+ 'about.sync.shortFeedId': 'first'
2122 })
2223
2324 exports.create = function (api) {
2425 const i18n = api.intl.sync.i18n
@@ -32,9 +33,9 @@
3233 var publishing = Value(false)
3334 var chosenImage = Value(currentImage())
3435
3536 // don't display if name is default
36- var chosenName = Value(currentName() === id.slice(1, 10) ? '' : currentName())
37+ var chosenName = Value(currentName() === api.about.sync.shortFeedId(id) ? '' : currentName())
3738 var chosenDescription = Value(currentDescription())
3839
3940 return {
4041 content: h('div', {
plugs/about/sync/short-feed-id.jsView
@@ -1,0 +1,9 @@
1+var nest = require('depnest')
2+
3+exports.gives = nest('about.sync.shortFeedId')
4+
5+exports.create = function (api) {
6+ return nest('about.sync.shortFeedId', function (id) {
7+ return `${id.slice(0, 10)}...`
8+ })
9+}

Built with git-ssb-web