Commit ff68049609e2f8564d4c3ef26142370345e55d70
use "like" instead of "dig" everywhere
Matt McKegg committed on 3/13/2017, 5:14:52 AMParent: 851f7cc94921a9a86c3caca8bba86c375ddd09b5
Files changed
README.md | changed |
modules/feed/html/rollup.js | changed |
modules/feed/pull/summary.js | changed |
modules/page/html/render/public.js | changed |
README.md | ||
---|---|---|
@@ -29,9 +29,9 @@ | ||
29 | 29 … | - [x] Endless scrolling (or load more) on main feed [fake paginate, add a new section, leave the current one and remove the top most] |
30 | 30 … | - [x] Display fixed banner at top of view when there are new updates [scrolls to top of page and reloads view when clicked] |
31 | 31 … | - [x] Preserve scroll on back button |
32 | 32 … | - [x] Treat the different "views" more like tabs. They preserve their state when switched between [scroll position, forms]. |
33 | -- [x] Show digs on posts in a nicer way (make it clear that you've dug something) | |
33 … | +- [x] Show likes on posts in a nicer way (make it clear that you've liked something) | |
34 | 34 … | - [x] Hovering "+1" like values and "x other people" messages should show who |
35 | 35 … | - [x] Display number of updates available on Feed buttons. Clicking reloads page. |
36 | 36 … | - [x] Improve UI on profiles |
37 | 37 … | - [x] Move contacts to sidebar |
modules/feed/html/rollup.js | ||
---|---|---|
@@ -165,13 +165,13 @@ | ||
165 | 165 … | title: names(item.repliesFrom) |
166 | 166 … | }, [ |
167 | 167 … | api.profile.html.manyPeople(item.repliesFrom), ' replied' |
168 | 168 … | ]) |
169 | - } else if (item.lastUpdateType === 'dig' && item.digs.size) { | |
169 … | + } else if (item.lastUpdateType === 'like' && item.likes.size) { | |
170 | 170 … | meta = h('div.meta', { |
171 | - title: names(item.digs) | |
171 … | + title: names(item.likes) | |
172 | 172 … | }, [ |
173 | - api.profile.html.manyPeople(item.digs), ' dug this message' | |
173 … | + api.profile.html.manyPeople(item.likes), ' like this message' | |
174 | 174 … | ]) |
175 | 175 … | } |
176 | 176 … | |
177 | 177 … | return h('FeedEvent', [ |
@@ -190,13 +190,13 @@ | ||
190 | 190 … | title: names(item.repliesFrom) |
191 | 191 … | }, [ |
192 | 192 … | api.profile.html.manyPeople(item.repliesFrom), ' replied to ', api.message.html.link(item.messageId) |
193 | 193 … | ]) |
194 | - } else if (item.lastUpdateType === 'dig' && item.digs.size) { | |
194 … | + } else if (item.lastUpdateType === 'like' && item.likes.size) { | |
195 | 195 … | meta = h('div.meta', { |
196 | - title: names(item.digs) | |
196 … | + title: names(item.likes) | |
197 | 197 … | }, [ |
198 | - api.profile.html.manyPeople(item.digs), ' dug ', api.message.html.link(item.messageId) | |
198 … | + api.profile.html.manyPeople(item.likes), ' likes ', api.message.html.link(item.messageId) | |
199 | 199 … | ]) |
200 | 200 … | } |
201 | 201 … | |
202 | 202 … | if (meta || replies.length) { |
modules/feed/pull/summary.js | ||
---|---|---|
@@ -63,22 +63,22 @@ | ||
63 | 63 … | if (c.type === 'contact') { |
64 | 64 … | updateContact(msg, follows) |
65 | 65 … | } else if (c.type === 'vote') { |
66 | 66 … | if (c.vote && c.vote.link) { |
67 | - // only show digs of posts added in the current window | |
67 … | + // only show likes of posts added in the current window | |
68 | 68 … | // and only for the main post |
69 | 69 … | const group = messageUpdates[c.vote.link] |
70 | 70 … | if (group) { |
71 | 71 … | if (c.vote.value > 0) { |
72 | - group.lastUpdateType = 'dig' | |
73 | - group.digs.add(msg.value.author) | |
72 … | + group.lastUpdateType = 'like' | |
73 … | + group.likes.add(msg.value.author) | |
74 | 74 … | // only bump when filter passes |
75 | 75 … | if (!bumpFilter || bumpFilter(msg, group)) { |
76 | 76 … | group.updated = msg.timestamp |
77 | 77 … | } |
78 | 78 … | } else { |
79 | - group.digs.delete(msg.value.author) | |
80 | - if (group.lastUpdateType === 'dig' && !group.digs.size && !group.replies.length) { | |
79 … | + group.likes.delete(msg.value.author) | |
80 … | + if (group.lastUpdateType === 'like' && !group.likes.size && !group.replies.length) { | |
81 | 81 … | group.lastUpdateType = 'reply' |
82 | 82 … | } |
83 | 83 … | } |
84 | 84 … | } |
@@ -185,9 +185,9 @@ | ||
185 | 185 … | repliesFrom: new Set(), |
186 | 186 … | replies: [], |
187 | 187 … | message: null, |
188 | 188 … | messageId: id, |
189 | - digs: new Set(), | |
189 … | + likes: new Set(), | |
190 | 190 … | updated: 0 |
191 | 191 … | } |
192 | 192 … | } |
193 | 193 … | return group |
modules/page/html/render/public.js | ||
---|---|---|
@@ -80,9 +80,9 @@ | ||
80 | 80 … | id === item.author || |
81 | 81 … | following().has(item.author) || |
82 | 82 … | subscribedChannels().has(item.channel) || |
83 | 83 … | (item.repliesFrom && item.repliesFrom.has(id)) || |
84 | - item.digs && item.digs.has(id) | |
84 … | + item.likes && item.likes.has(id) | |
85 | 85 … | ) |
86 | 86 … | }, |
87 | 87 … | bumpFilter: (msg, group) => { |
88 | 88 … | if (!group.message) { |
Built with git-ssb-web