mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 08:48:47 +01:00
Show toasts. Lots of toasts.
This commit is contained in:
parent
5b2cbc5bf1
commit
f957d9a8a8
1 changed files with 21 additions and 0 deletions
|
@ -8,6 +8,7 @@ import Link from '../components/link';
|
||||||
import Timeline from '../components/timeline';
|
import Timeline from '../components/timeline';
|
||||||
import { api } from '../utils/api';
|
import { api } from '../utils/api';
|
||||||
import emojifyText from '../utils/emojify-text';
|
import emojifyText from '../utils/emojify-text';
|
||||||
|
import showToast from '../utils/show-toast';
|
||||||
import states from '../utils/states';
|
import states from '../utils/states';
|
||||||
import { saveStatus } from '../utils/states';
|
import { saveStatus } from '../utils/states';
|
||||||
import useTitle from '../utils/useTitle';
|
import useTitle from '../utils/useTitle';
|
||||||
|
@ -128,18 +129,33 @@ function AccountStatuses() {
|
||||||
)}
|
)}
|
||||||
<Link
|
<Link
|
||||||
to={`/${instance}/a/${id}${excludeReplies ? '?replies=1' : ''}`}
|
to={`/${instance}/a/${id}${excludeReplies ? '?replies=1' : ''}`}
|
||||||
|
onClick={() => {
|
||||||
|
if (excludeReplies) {
|
||||||
|
showToast('Showing post with replies');
|
||||||
|
}
|
||||||
|
}}
|
||||||
class={excludeReplies ? '' : 'is-active'}
|
class={excludeReplies ? '' : 'is-active'}
|
||||||
>
|
>
|
||||||
+ Replies
|
+ Replies
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to={`/${instance}/a/${id}${excludeBoosts ? '' : '?boosts=0'}`}
|
to={`/${instance}/a/${id}${excludeBoosts ? '' : '?boosts=0'}`}
|
||||||
|
onClick={() => {
|
||||||
|
if (!excludeBoosts) {
|
||||||
|
showToast('Showing posts without boosts');
|
||||||
|
}
|
||||||
|
}}
|
||||||
class={!excludeBoosts ? '' : 'is-active'}
|
class={!excludeBoosts ? '' : 'is-active'}
|
||||||
>
|
>
|
||||||
- Boosts
|
- Boosts
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to={`/${instance}/a/${id}${media ? '' : '?media=1'}`}
|
to={`/${instance}/a/${id}${media ? '' : '?media=1'}`}
|
||||||
|
onClick={() => {
|
||||||
|
if (!media) {
|
||||||
|
showToast('Showing posts with media');
|
||||||
|
}
|
||||||
|
}}
|
||||||
class={media ? 'is-active' : ''}
|
class={media ? 'is-active' : ''}
|
||||||
>
|
>
|
||||||
Media
|
Media
|
||||||
|
@ -151,6 +167,11 @@ function AccountStatuses() {
|
||||||
? ''
|
? ''
|
||||||
: `?tagged=${encodeURIComponent(tag.name)}`
|
: `?tagged=${encodeURIComponent(tag.name)}`
|
||||||
}`}
|
}`}
|
||||||
|
onClick={() => {
|
||||||
|
if (tagged !== tag.name) {
|
||||||
|
showToast(`Showing posts tagged with #${tag.name}`);
|
||||||
|
}
|
||||||
|
}}
|
||||||
class={tagged === tag.name ? 'is-active' : ''}
|
class={tagged === tag.name ? 'is-active' : ''}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|
Loading…
Reference in a new issue