git ssb

16+

Dominic / patchbay



Commit b1a3bd69bb401497eac21c196cedc04c30389a75

strip @ from title display names, tweak profile (description, image)

mix irving committed on 3/27/2017, 5:01:52 PM
Parent: f20ef2ce7551b2a0ce170145c2e3f375f5e72c63

Files changed

about/html/edit.jschanged
about/html/edit.mcsschanged
about/html/link.jsadded
about/html/edit.jsView
@@ -11,10 +11,13 @@
1111
1212 exports.gives = nest('about.html.edit')
1313
1414 exports.needs = nest({
15- 'about.obs.name': 'first',
16- 'about.obs.imageUrl': 'first',
15+ 'about.obs': {
16+ name: 'first',
17+ imageUrl: 'first',
18+ description: 'first'
19+ },
1720 'blob.sync.url': 'first',
1821 'keys.sync.id': 'first',
1922 'message.html.confirm': 'first',
2023 sbot: {
@@ -66,11 +69,8 @@
6669 var names = dictToCollection(namesRecord)
6770
6871 var lb = hyperlightbox()
6972
70- // TODO load this in, make this editable
71- var description = ''
72-
7373 var isPossibleUpdate = computed([name.new, avatar.new], (name, avatar) => {
7474 return name || avatar.link
7575 })
7676
@@ -79,10 +79,10 @@
7979 else return avatar.current
8080 })
8181
8282 var displayedName = computed([name], name => {
83- if (name.new) return '@' + name.new
84- else return '@' + name.current
83+ if (name.new) return name.new
84+ else return name.current
8585 })
8686
8787 return h('AboutEditor', [
8888 h('section.lightbox', lb),
@@ -91,9 +91,9 @@
9191 h('img', { src: avatarSrc })
9292 ]),
9393 h('footer', displayedName)
9494 ]),
95- h('section.description', description),
95+ h('section.description', api.about.obs.description(id)),
9696 h('section.aliases', [
9797 h('header', 'Aliases'),
9898 h('section.avatars', [
9999 h('header', 'Avatars'),
about/html/edit.mcssView
@@ -39,14 +39,15 @@
3939 section.avatar {
4040 margin-right: 1rem
4141
4242 section img {
43- width: 256px
44- height: 256px
43+ width: 320px
44+ height: 320px
4545 }
4646
4747 footer {
48- font-size: 1.2rem
48+ font-size: 1.8rem
49+ margin: .4rem 0
4950 }
5051 }
5152
5253 section.description {
about/html/link.jsView
@@ -1,0 +1,15 @@
1+var nest = require('depnest')
2+var { h } = require('mutant')
3+
4+exports.gives = nest('about.html.link')
5+
6+exports.needs = nest({
7+ 'about.obs.name': 'first'
8+})
9+
10+exports.create = function (api) {
11+ return nest('about.html.link', function (id, text = null) {
12+ return h('a', {href: id, title: id}, text || api.about.obs.name(id))
13+ })
14+}
15+

Built with git-ssb-web