From f957d9a8a88f6bf87662673f2562515ef536a5b4 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 9 Apr 2023 01:01:36 +0800 Subject: [PATCH] Show toasts. Lots of toasts. --- src/pages/account-statuses.jsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/pages/account-statuses.jsx b/src/pages/account-statuses.jsx index 376fee6..751931f 100644 --- a/src/pages/account-statuses.jsx +++ b/src/pages/account-statuses.jsx @@ -8,6 +8,7 @@ import Link from '../components/link'; import Timeline from '../components/timeline'; import { api } from '../utils/api'; import emojifyText from '../utils/emojify-text'; +import showToast from '../utils/show-toast'; import states from '../utils/states'; import { saveStatus } from '../utils/states'; import useTitle from '../utils/useTitle'; @@ -128,18 +129,33 @@ function AccountStatuses() { )} { + if (excludeReplies) { + showToast('Showing post with replies'); + } + }} class={excludeReplies ? '' : 'is-active'} > + Replies { + if (!excludeBoosts) { + showToast('Showing posts without boosts'); + } + }} class={!excludeBoosts ? '' : 'is-active'} > - Boosts { + if (!media) { + showToast('Showing posts with media'); + } + }} class={media ? 'is-active' : ''} > Media @@ -151,6 +167,11 @@ function AccountStatuses() { ? '' : `?tagged=${encodeURIComponent(tag.name)}` }`} + onClick={() => { + if (tagged !== tag.name) { + showToast(`Showing posts tagged with #${tag.name}`); + } + }} class={tagged === tag.name ? 'is-active' : ''} >