MVP-ish button to filter by author if clicked on link card
Some checks are pending
Pull Request to `main` from `production` / auto-pull-request (push) Waiting to run

This commit is contained in:
Lim Chee Aun 2024-09-09 09:45:04 +08:00
parent 06bb1815bb
commit 55f3d7d128
2 changed files with 58 additions and 42 deletions

74
src/locales/en.po generated
View file

@ -33,7 +33,7 @@ msgstr ""
#: src/components/account-block.jsx:166 #: src/components/account-block.jsx:166
#: src/components/account-info.jsx:639 #: src/components/account-info.jsx:639
#: src/components/status.jsx:440 #: src/components/status.jsx:440
#: src/pages/catchup.jsx:1454 #: src/pages/catchup.jsx:1470
msgid "Group" msgid "Group"
msgstr "" msgstr ""
@ -183,8 +183,8 @@ msgstr ""
#: src/components/account-info.jsx:859 #: src/components/account-info.jsx:859
#: src/components/status.jsx:2163 #: src/components/status.jsx:2163
#: src/pages/catchup.jsx:71 #: src/pages/catchup.jsx:71
#: src/pages/catchup.jsx:1428 #: src/pages/catchup.jsx:1444
#: src/pages/catchup.jsx:2039 #: src/pages/catchup.jsx:2055
#: src/pages/status.jsx:892 #: src/pages/status.jsx:892
#: src/pages/status.jsx:1494 #: src/pages/status.jsx:1494
msgid "Replies" msgid "Replies"
@ -192,8 +192,8 @@ msgstr ""
#: src/components/account-info.jsx:863 #: src/components/account-info.jsx:863
#: src/pages/catchup.jsx:72 #: src/pages/catchup.jsx:72
#: src/pages/catchup.jsx:1430 #: src/pages/catchup.jsx:1446
#: src/pages/catchup.jsx:2051 #: src/pages/catchup.jsx:2067
#: src/pages/settings.jsx:1045 #: src/pages/settings.jsx:1045
msgid "Boosts" msgid "Boosts"
msgstr "" msgstr ""
@ -421,7 +421,7 @@ msgstr ""
#: src/components/status.jsx:3085 #: src/components/status.jsx:3085
#: src/components/status.jsx:3583 #: src/components/status.jsx:3583
#: src/pages/accounts.jsx:36 #: src/pages/accounts.jsx:36
#: src/pages/catchup.jsx:1564 #: src/pages/catchup.jsx:1580
#: src/pages/filters.jsx:224 #: src/pages/filters.jsx:224
#: src/pages/list.jsx:274 #: src/pages/list.jsx:274
#: src/pages/notifications.jsx:840 #: src/pages/notifications.jsx:840
@ -915,7 +915,7 @@ msgid "No drafts found."
msgstr "" msgstr ""
#: src/components/drafts.jsx:245 #: src/components/drafts.jsx:245
#: src/pages/catchup.jsx:1911 #: src/pages/catchup.jsx:1927
msgid "Poll" msgid "Poll"
msgstr "" msgstr ""
@ -975,7 +975,7 @@ msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:43 #: src/components/keyboard-shortcuts-help.jsx:43
#: src/components/nav-menu.jsx:405 #: src/components/nav-menu.jsx:405
#: src/pages/catchup.jsx:1602 #: src/pages/catchup.jsx:1618
msgid "Keyboard shortcuts" msgid "Keyboard shortcuts"
msgstr "" msgstr ""
@ -984,12 +984,12 @@ msgid "Keyboard shortcuts help"
msgstr "" msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:55 #: src/components/keyboard-shortcuts-help.jsx:55
#: src/pages/catchup.jsx:1627 #: src/pages/catchup.jsx:1643
msgid "Next post" msgid "Next post"
msgstr "" msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:59 #: src/components/keyboard-shortcuts-help.jsx:59
#: src/pages/catchup.jsx:1635 #: src/pages/catchup.jsx:1651
msgid "Previous post" msgid "Previous post"
msgstr "" msgstr ""
@ -1014,7 +1014,7 @@ msgid "Load new posts"
msgstr "" msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:83 #: src/components/keyboard-shortcuts-help.jsx:83
#: src/pages/catchup.jsx:1659 #: src/pages/catchup.jsx:1675
msgid "Open post details" msgid "Open post details"
msgstr "" msgstr ""
@ -1212,7 +1212,7 @@ msgstr ""
#: src/components/status.jsx:3587 #: src/components/status.jsx:3587
#: src/components/timeline.jsx:971 #: src/components/timeline.jsx:971
#: src/pages/catchup.jsx:75 #: src/pages/catchup.jsx:75
#: src/pages/catchup.jsx:1859 #: src/pages/catchup.jsx:1875
msgid "Filtered" msgid "Filtered"
msgstr "" msgstr ""
@ -1302,8 +1302,8 @@ msgstr ""
#: src/components/nav-menu.jsx:296 #: src/components/nav-menu.jsx:296
#: src/components/shortcuts-settings.jsx:55 #: src/components/shortcuts-settings.jsx:55
#: src/components/shortcuts-settings.jsx:198 #: src/components/shortcuts-settings.jsx:198
#: src/pages/catchup.jsx:1429 #: src/pages/catchup.jsx:1445
#: src/pages/catchup.jsx:2045 #: src/pages/catchup.jsx:2061
#: src/pages/favourites.jsx:11 #: src/pages/favourites.jsx:11
#: src/pages/favourites.jsx:23 #: src/pages/favourites.jsx:23
#: src/pages/settings.jsx:1041 #: src/pages/settings.jsx:1041
@ -2314,7 +2314,7 @@ msgstr "Pinned posts"
#: src/components/timeline.jsx:944 #: src/components/timeline.jsx:944
#: src/components/timeline.jsx:951 #: src/components/timeline.jsx:951
#: src/pages/catchup.jsx:1876 #: src/pages/catchup.jsx:1892
msgid "Thread" msgid "Thread"
msgstr "" msgstr ""
@ -2577,7 +2577,7 @@ msgid "Catch-up <0>beta</0>"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:896 #: src/pages/catchup.jsx:896
#: src/pages/catchup.jsx:1568 #: src/pages/catchup.jsx:1584
msgid "Help" msgid "Help"
msgstr "" msgstr ""
@ -2654,7 +2654,7 @@ msgid "Reset filters"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1144 #: src/pages/catchup.jsx:1144
#: src/pages/catchup.jsx:1574 #: src/pages/catchup.jsx:1590
msgid "Top links" msgid "Top links"
msgstr "" msgstr ""
@ -2662,85 +2662,85 @@ msgstr ""
msgid "Shared by {0}" msgid "Shared by {0}"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1299 #: src/pages/catchup.jsx:1315
#: src/pages/mentions.jsx:147 #: src/pages/mentions.jsx:147
#: src/pages/search.jsx:222 #: src/pages/search.jsx:222
msgid "All" msgid "All"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1384 #: src/pages/catchup.jsx:1400
msgid "{0, plural, one {# author} other {# authors}}" msgid "{0, plural, one {# author} other {# authors}}"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1396 #: src/pages/catchup.jsx:1412
msgid "Sort" msgid "Sort"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1427 #: src/pages/catchup.jsx:1443
msgid "Date" msgid "Date"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1431 #: src/pages/catchup.jsx:1447
msgid "Density" msgid "Density"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1469 #: src/pages/catchup.jsx:1485
msgid "Authors" msgid "Authors"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1470 #: src/pages/catchup.jsx:1486
msgid "None" msgid "None"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1486 #: src/pages/catchup.jsx:1502
msgid "Show all authors" msgid "Show all authors"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1537 #: src/pages/catchup.jsx:1553
msgid "You don't have to read everything." msgid "You don't have to read everything."
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1538 #: src/pages/catchup.jsx:1554
msgid "That's all." msgid "That's all."
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1546 #: src/pages/catchup.jsx:1562
msgid "Back to top" msgid "Back to top"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1577 #: src/pages/catchup.jsx:1593
msgid "Links shared by followings, sorted by shared counts, boosts and likes." msgid "Links shared by followings, sorted by shared counts, boosts and likes."
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1583 #: src/pages/catchup.jsx:1599
msgid "Sort: Density" msgid "Sort: Density"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1586 #: src/pages/catchup.jsx:1602
msgid "Posts are sorted by information density or depth. Shorter posts are \"lighter\" while longer posts are \"heavier\". Posts with photos are \"heavier\" than posts without photos." msgid "Posts are sorted by information density or depth. Shorter posts are \"lighter\" while longer posts are \"heavier\". Posts with photos are \"heavier\" than posts without photos."
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1593 #: src/pages/catchup.jsx:1609
msgid "Group: Authors" msgid "Group: Authors"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1596 #: src/pages/catchup.jsx:1612
msgid "Posts are grouped by authors, sorted by posts count per author." msgid "Posts are grouped by authors, sorted by posts count per author."
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1643 #: src/pages/catchup.jsx:1659
msgid "Next author" msgid "Next author"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1651 #: src/pages/catchup.jsx:1667
msgid "Previous author" msgid "Previous author"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1667 #: src/pages/catchup.jsx:1683
msgid "Scroll to top" msgid "Scroll to top"
msgstr "" msgstr ""
#: src/pages/catchup.jsx:1858 #: src/pages/catchup.jsx:1874
msgid "Filtered: {0}" msgid "Filtered: {0}"
msgstr "" msgstr ""

View file

@ -1262,11 +1262,27 @@ function Catchup() {
{sharers.map((s) => { {sharers.map((s) => {
const { avatarStatic, displayName } = s; const { avatarStatic, displayName } = s;
return ( return (
<button
type="button"
class="plain"
style={{
padding: 0,
}}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
// Reset and filter to author
const { id } = s;
setSelectedAuthor(id);
setSelectedFilterCategory('all');
}}
>
<Avatar <Avatar
url={avatarStatic} url={avatarStatic}
size="s" size="s"
alt={displayName} alt={displayName}
/> />
</button>
); );
})} })}
</Trans> </Trans>