Commit graph

56 commits

Author SHA1 Message Date
Lim Chee Aun 7424f7604a Fix modal status page matching failing due to new instance url 2023-02-09 16:03:10 +08:00
Lim Chee Aun 9921e487e8 Minimum viable Home → Following port 2023-02-08 00:31:46 +08:00
Lim Chee Aun 4520822f1f Use nested routes 2023-02-06 20:17:07 +08:00
Lim Chee Aun 63b269e712 Remove console.log 2023-02-06 20:02:02 +08:00
Lim Chee Aun 719a407414 Use /:instance?/xxx instead 2023-02-06 19:54:18 +08:00
Lim Chee Aun 1357c1b2bd Fix more edge cases after breaking changes 2023-02-06 16:35:03 +08:00
Lim Chee Aun a130743d4c Breaking: refactor all masto API calls
Everything need to be instance-aware!
2023-02-06 00:17:19 +08:00
Lim Chee Aun e0bab6c70a More refactoring work 2023-02-03 21:08:08 +08:00
Lim Chee Aun e95954a7fd Begin work on account-specific store
1. Move boostsCarousel setting to account-specific, sadly no migration from previous setting
2. Cache last notification to prevent keep getting unread notification badge
2023-02-02 17:29:57 +08:00
Lim Chee Aun e282f5df2a Strip protocol from instance domain/uri 2023-01-31 00:58:00 +08:00
Lim Chee Aun e5e2bd6f2a Add account statuses timeline + few aesthetic changes to Account sheet
And secretly link to this timeline, don't tell anyone lol
2023-01-29 23:37:13 +08:00
Lim Chee Aun 292186e918 New UI experiment: media modal + status detail page
- Extracted out the media modal and media component from Status
- Use :has CSS selector to do most of the layout work
- Expecting edge case UI bugs
2023-01-29 15:23:53 +08:00
Lim Chee Aun aaeca7dd03 Refactor out a Timeline component
Also replace login() with createClient() for faster log in
2023-01-28 18:52:18 +08:00
Lim Chee Aun 816653e2e6 Add j/k keyboard navigation to status page
At the same time, fix shift+k not working in Home page
2023-01-27 20:54:18 +08:00
Lim Chee Aun 31b342d68e Fix undefined inHome 2023-01-27 15:17:56 +08:00
Lim Chee Aun 515b988b94 Getting trolled by my own code 2023-01-27 14:36:47 +08:00
Lim Chee Aun e83d128f62 Rewrite Notifications page + experimental fix on getting/showing updates 2023-01-27 11:47:30 +08:00
Lim Chee Aun 7c6157d47c Try get the v2 instance config then fallback to v1
There are new things in v2 that will be needed later
2023-01-27 11:45:38 +08:00
Lim Chee Aun 37fc65b47a Don't need useEffect for backgroundLocation 2023-01-21 10:08:55 +08:00
Lim Chee Aun ddce5bb0ff Fix background location need to persist 2023-01-21 01:04:27 +08:00
Lim Chee Aun 9bff95bcec Replace preact-router with react-router
Need more routing powers, hopefully things don't break 🤞
2023-01-21 00:23:59 +08:00
Lim Chee Aun 71b50382e9 New feature: Unsent Drafts
For now, this only works for unsent unsaved drafts e.g. the browser kill the page without giving the user the chance to discard
2023-01-13 15:30:09 +08:00
Lim Chee Aun 13c3b8fa3b Finally DRY this saving status code 2023-01-09 19:11:34 +08:00
Lim Chee Aun 522dd08925 Remove unused imports 2023-01-09 17:05:42 +08:00
Lim Chee Aun 54a95363f0 Use console.debug 2023-01-07 21:02:46 +08:00
Lim Chee Aun 41df88e625 Perf fixes
Turns out, adding an object to states.statuses proxyMap object, re-render ALL statuses
2023-01-07 20:26:23 +08:00
Lim Chee Aun 39124ccc70 Add experimental scroll-based effects
- Scroll to top = refresh Home
- Scroll up/down = show/hide header and compose button
- Scroll near bottom = load next statuses
- Move Compose button to only at Home instead of 'App' level
2023-01-02 21:36:24 +08:00
Lim Chee Aun 21bdb51cd6 Compose pop-in/out now can work with non-id medias
Commented out for now to see if it really works

The bug is due to valtio proxying the File object
2023-01-02 12:03:06 +08:00
Lim Chee Aun 727b944f3b toLowerCase() all the instance URLs! 2023-01-01 20:59:55 +08:00
Lim Chee Aun 4e80e9e0cb Debounce new statuses 2023-01-01 12:01:54 +08:00
Lim Chee Aun 5e52874aa5 Use v1 instance api
v2 is too new, only added for Mastodon v4
2023-01-01 10:59:20 +08:00
Lim Chee Aun 07163f0c3f Fix layout bug with routes
At this point, it feels like I'm writing my own react-router
2023-01-01 09:18:11 +08:00
Lim Chee Aun e22e50705f Move things around 2023-01-01 01:46:08 +08:00
Lim Chee Aun 9201f7a118 First step in making things focusable 2022-12-30 20:37:57 +08:00
Lim Chee Aun 808d56432e Use sinceId for new checks 2022-12-29 10:45:47 +08:00
Lim Chee Aun 02c464a139 Delay showing "status posted" toast 2022-12-28 18:05:22 +08:00
Lim Chee Aun c006a791b9 Comment out log 2022-12-27 09:05:54 +08:00
Lim Chee Aun d981a31a10 Fix serious BUG
v1 uses `uri`, v2 uses `domain`
2022-12-26 23:44:18 +08:00
Lim Chee Aun 082a04c30c Maybe visibilityState is more reliable 2022-12-26 17:39:20 +08:00
Lim Chee Aun 6b41666efe It's time to toast 🥂 2022-12-26 14:02:05 +08:00
Lim Chee Aun 6da4834b71 Change back to limit 1
Sometimes, there's really just one new status update.
2022-12-26 01:09:53 +08:00
Lim Chee Aun 318c2aeffc Upgrade masto.js to V5
- Fix all breaking changes
- Have to manual remove null/undefined values before creating statuses
- Have to recreate iterator instance if start from scratch because can't pass args in next()
2022-12-25 23:28:55 +08:00
Lim Chee Aun 42fa30d8f8 Move the onVisibilityChange API check to app.jsx
Doesn't make sense to make it part of Home. Also add in Notifications check.
2022-12-24 10:26:05 +08:00
Lim Chee Aun 5944b4fe30 Don't remove status immediately
It'll be too abrupt. Set `_deleted` flag for now, no UI yet.
2022-12-22 22:43:04 +08:00
Lim Chee Aun c828f53f09 Lame fix for Flash of Welcome Page (FoWP)
useEffect runs after mounted so Welcome component appears for a split second
2022-12-21 20:34:24 +08:00
Lim Chee Aun 5e687e871f Bring back polling but bump up timeout
- Polling is needed because status post requires the media to be done processing (not just uploaded)
- But the default timeout set in masto.js is 3s, a bit too low if uploading a large video
- Bumping up to 30s
2022-12-20 13:29:38 +08:00
Lim Chee Aun a5177b3b70 Try disable version check
Some Mastodon instances have invalid semver 🤦‍♂️

E.g. social.treehouse.systems = v4.0.1+glitch+th
2022-12-15 16:54:14 +08:00
Lim Chee Aun a115639a99 Uncomment this 2022-12-15 10:59:20 +08:00
Lim Chee Aun 72751709df New feature: poll
- More fixes
2022-12-14 21:48:17 +08:00
Lim Chee Aun e2346bc32a Shift+click to open compose window
- Fixes for closing
- Easier code for checking if can close window
2022-12-13 21:54:16 +08:00