Commit b1a3bd69bb401497eac21c196cedc04c30389a75
strip @ from title display names, tweak profile (description, image)
mix irving committed on 3/27/2017, 5:01:52 PMParent: f20ef2ce7551b2a0ce170145c2e3f375f5e72c63
Files changed
about/html/edit.js | changed |
about/html/edit.mcss | changed |
about/html/link.js | added |
about/html/edit.js | ||
---|---|---|
@@ -11,10 +11,13 @@ | ||
11 | 11 | |
12 | 12 | exports.gives = nest('about.html.edit') |
13 | 13 | |
14 | 14 | 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 | + }, | |
17 | 20 | 'blob.sync.url': 'first', |
18 | 21 | 'keys.sync.id': 'first', |
19 | 22 | 'message.html.confirm': 'first', |
20 | 23 | sbot: { |
@@ -66,11 +69,8 @@ | ||
66 | 69 | var names = dictToCollection(namesRecord) |
67 | 70 | |
68 | 71 | var lb = hyperlightbox() |
69 | 72 | |
70 | - // TODO load this in, make this editable | |
71 | - var description = '' | |
72 | - | |
73 | 73 | var isPossibleUpdate = computed([name.new, avatar.new], (name, avatar) => { |
74 | 74 | return name || avatar.link |
75 | 75 | }) |
76 | 76 | |
@@ -79,10 +79,10 @@ | ||
79 | 79 | else return avatar.current |
80 | 80 | }) |
81 | 81 | |
82 | 82 | 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 | |
85 | 85 | }) |
86 | 86 | |
87 | 87 | return h('AboutEditor', [ |
88 | 88 | h('section.lightbox', lb), |
@@ -91,9 +91,9 @@ | ||
91 | 91 | h('img', { src: avatarSrc }) |
92 | 92 | ]), |
93 | 93 | h('footer', displayedName) |
94 | 94 | ]), |
95 | - h('section.description', description), | |
95 | + h('section.description', api.about.obs.description(id)), | |
96 | 96 | h('section.aliases', [ |
97 | 97 | h('header', 'Aliases'), |
98 | 98 | h('section.avatars', [ |
99 | 99 | h('header', 'Avatars'), |
about/html/edit.mcss | ||
---|---|---|
@@ -39,14 +39,15 @@ | ||
39 | 39 | section.avatar { |
40 | 40 | margin-right: 1rem |
41 | 41 | |
42 | 42 | section img { |
43 | - width: 256px | |
44 | - height: 256px | |
43 | + width: 320px | |
44 | + height: 320px | |
45 | 45 | } |
46 | 46 | |
47 | 47 | footer { |
48 | - font-size: 1.2rem | |
48 | + font-size: 1.8rem | |
49 | + margin: .4rem 0 | |
49 | 50 | } |
50 | 51 | } |
51 | 52 | |
52 | 53 | section.description { |
about/html/link.js | ||
---|---|---|
@@ -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