From 8f477eeccb706d57dd2ec418e8b81a0001c5f4a3 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 26 May 2019 09:54:35 -0700 Subject: [PATCH] feat: add poll notifications (#1229) more work on #1130 --- bin/svgs.js | 3 +- src/routes/_components/status/Status.html | 6 +-- .../_components/status/StatusHeader.html | 48 ++++++++++++------- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/bin/svgs.js b/bin/svgs.js index 4f322b6..af69d1b 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -46,5 +46,6 @@ module.exports = [ { id: 'fa-search-plus', src: 'src/thirdparty/font-awesome-svg-png/white/svg/search-plus.svg' }, { id: 'fa-share-square-o', src: 'src/thirdparty/font-awesome-svg-png/white/svg/share-square-o.svg' }, { id: 'fa-flag', src: 'src/thirdparty/font-awesome-svg-png/white/svg/flag.svg' }, - { id: 'fa-suitcase', src: 'src/thirdparty/font-awesome-svg-png/white/svg/suitcase.svg' } + { id: 'fa-suitcase', src: 'src/thirdparty/font-awesome-svg-png/white/svg/suitcase.svg' }, + { id: 'fa-bar-chart', src: 'src/thirdparty/font-awesome-svg-png/white/svg/bar-chart.svg' } ] diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html index c9c4f75..10e53f4 100644 --- a/src/routes/_components/status/Status.html +++ b/src/routes/_components/status/Status.html @@ -268,8 +268,8 @@ originalStatus.card && originalStatus.card.title ), - showPoll: ({ originalStatus, isStatusInNotification }) => ( - !isStatusInNotification && originalStatus.poll + showPoll: ({ originalStatus }) => ( + originalStatus.poll ), showMedia: ({ originalStatus, isStatusInNotification }) => ( !isStatusInNotification && @@ -292,7 +292,7 @@ reblog, notification, visibility, $omitEmojiInDisplayNames, $disableLongAriaLabels) ), showHeader: ({ notification, status, timelineType }) => ( - (notification && (notification.type === 'reblog' || notification.type === 'favourite')) || + (notification && ['reblog', 'favourite', 'poll'].includes(notification.type)) || status.reblog || timelineType === 'pinned' ), diff --git a/src/routes/_components/status/StatusHeader.html b/src/routes/_components/status/StatusHeader.html index fabea6e..2708556 100644 --- a/src/routes/_components/status/StatusHeader.html +++ b/src/routes/_components/status/StatusHeader.html @@ -1,5 +1,5 @@ -
-