git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit ff68049609e2f8564d4c3ef26142370345e55d70

use "like" instead of "dig" everywhere

Matt McKegg committed on 3/13/2017, 5:14:52 AM
Parent: 851f7cc94921a9a86c3caca8bba86c375ddd09b5

Files changed

README.mdchanged
modules/feed/html/rollup.jschanged
modules/feed/pull/summary.jschanged
modules/page/html/render/public.jschanged
README.mdView
@@ -29,9 +29,9 @@
2929 - [x] Endless scrolling (or load more) on main feed [fake paginate, add a new section, leave the current one and remove the top most]
3030 - [x] Display fixed banner at top of view when there are new updates [scrolls to top of page and reloads view when clicked]
3131 - [x] Preserve scroll on back button
3232 - [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)
3434 - [x] Hovering "+1" like values and "x other people" messages should show who
3535 - [x] Display number of updates available on Feed buttons. Clicking reloads page.
3636 - [x] Improve UI on profiles
3737 - [x] Move contacts to sidebar
modules/feed/html/rollup.jsView
@@ -165,13 +165,13 @@
165165 title: names(item.repliesFrom)
166166 }, [
167167 api.profile.html.manyPeople(item.repliesFrom), ' replied'
168168 ])
169- } else if (item.lastUpdateType === 'dig' && item.digs.size) {
169+ } else if (item.lastUpdateType === 'like' && item.likes.size) {
170170 meta = h('div.meta', {
171- title: names(item.digs)
171+ title: names(item.likes)
172172 }, [
173- api.profile.html.manyPeople(item.digs), ' dug this message'
173+ api.profile.html.manyPeople(item.likes), ' like this message'
174174 ])
175175 }
176176
177177 return h('FeedEvent', [
@@ -190,13 +190,13 @@
190190 title: names(item.repliesFrom)
191191 }, [
192192 api.profile.html.manyPeople(item.repliesFrom), ' replied to ', api.message.html.link(item.messageId)
193193 ])
194- } else if (item.lastUpdateType === 'dig' && item.digs.size) {
194+ } else if (item.lastUpdateType === 'like' && item.likes.size) {
195195 meta = h('div.meta', {
196- title: names(item.digs)
196+ title: names(item.likes)
197197 }, [
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)
199199 ])
200200 }
201201
202202 if (meta || replies.length) {
modules/feed/pull/summary.jsView
@@ -63,22 +63,22 @@
6363 if (c.type === 'contact') {
6464 updateContact(msg, follows)
6565 } else if (c.type === 'vote') {
6666 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
6868 // and only for the main post
6969 const group = messageUpdates[c.vote.link]
7070 if (group) {
7171 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)
7474 // only bump when filter passes
7575 if (!bumpFilter || bumpFilter(msg, group)) {
7676 group.updated = msg.timestamp
7777 }
7878 } 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) {
8181 group.lastUpdateType = 'reply'
8282 }
8383 }
8484 }
@@ -185,9 +185,9 @@
185185 repliesFrom: new Set(),
186186 replies: [],
187187 message: null,
188188 messageId: id,
189- digs: new Set(),
189+ likes: new Set(),
190190 updated: 0
191191 }
192192 }
193193 return group
modules/page/html/render/public.jsView
@@ -80,9 +80,9 @@
8080 id === item.author ||
8181 following().has(item.author) ||
8282 subscribedChannels().has(item.channel) ||
8383 (item.repliesFrom && item.repliesFrom.has(id)) ||
84- item.digs && item.digs.has(id)
84+ item.likes && item.likes.has(id)
8585 )
8686 },
8787 bumpFilter: (msg, group) => {
8888 if (!group.message) {

Built with git-ssb-web