From fb6df029f3ee2c867c3ac623412143c750749751 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 14 Jun 2018 08:42:55 -0700 Subject: [PATCH] add "reply all" icon (#392) fixes #388 --- bin/svgs.js | 1 + routes/_components/status/Status.html | 6 ++++-- routes/_components/status/StatusToolbar.html | 7 +++++-- templates/2xx.html | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/svgs.js b/bin/svgs.js index ecd2117..9462713 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -5,6 +5,7 @@ module.exports = [ {id: 'fa-globe', src: 'node_modules/font-awesome-svg-png/white/svg/globe.svg', title: 'Federated'}, {id: 'fa-gear', src: 'node_modules/font-awesome-svg-png/white/svg/gear.svg', title: 'Settings'}, {id: 'fa-reply', src: 'node_modules/font-awesome-svg-png/white/svg/reply.svg', title: 'Reply'}, + {id: 'fa-reply-all', src: 'node_modules/font-awesome-svg-png/white/svg/reply-all.svg', title: 'Reply to thread'}, {id: 'fa-retweet', src: 'node_modules/font-awesome-svg-png/white/svg/retweet.svg', title: 'Boost'}, {id: 'fa-star', src: 'node_modules/font-awesome-svg-png/white/svg/star.svg', title: 'Favorite'}, {id: 'fa-ellipsis-h', src: 'node_modules/font-awesome-svg-png/white/svg/ellipsis-h.svg', title: 'More'}, diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html index 743b2f4..7214103 100644 --- a/routes/_components/status/Status.html +++ b/routes/_components/status/Status.html @@ -182,6 +182,7 @@ originalAccountId: ({ originalAccount }) => originalAccount.id, visibility: ({ originalStatus }) => originalStatus.visibility, spoilerText: ({ originalStatus }) => originalStatus.spoiler_text, + inReplyToId: ({ originalStatus }) => originalStatus.in_reply_to_id, uuid: ({ $currentInstance, timelineType, timelineValue, notificationId, statusId }) => ( `${$currentInstance}/${timelineType}/${timelineValue}/${notificationId || ''}/${statusId}` ), @@ -219,7 +220,7 @@ params: ({ notification, notificationId, status, statusId, timelineType, account, accountId, uuid, isStatusInNotification, isStatusInOwnThread, originalAccount, originalAccountId, spoilerShown, visibility, replyShown, - replyVisibility, spoilerText, originalStatus, originalStatusId }) => ({ + replyVisibility, spoilerText, originalStatus, originalStatusId, inReplyToId }) => ({ notification, notificationId, status, @@ -238,7 +239,8 @@ replyVisibility, spoilerText, originalStatus, - originalStatusId + originalStatusId, + inReplyToId }) } } diff --git a/routes/_components/status/StatusToolbar.html b/routes/_components/status/StatusToolbar.html index 7aa2e29..0ee2e5d 100644 --- a/routes/_components/status/StatusToolbar.html +++ b/routes/_components/status/StatusToolbar.html @@ -4,7 +4,7 @@ label={replyLabel} pressable="true" pressed={replyShown} - href="#fa-reply" + href={replyIcon} delegateKey={replyKey} focusKey={replyKey} /> @@ -140,7 +140,10 @@ reblogAnimation: REBLOG_ANIMATION }), computed: { - replyLabel: ({ replyShown }) => replyShown ? 'Close reply' : 'Reply', + replyLabel: ({ replyShown, inReplyToId }) => ( + replyShown ? 'Close reply' : inReplyToId ? 'Reply to thread' : 'Reply' + ), + replyIcon: ({ inReplyToId }) => inReplyToId ? '#fa-reply-all' : '#fa-reply', reblogLabel: ({ visibility }) => { switch (visibility) { case 'private': diff --git a/templates/2xx.html b/templates/2xx.html index 2f3a90f..d10cdc7 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -87,6 +87,7 @@ if (!localStorage.store_currentInstance) { Federated Settings Reply +Reply to thread Boost Favorite More