Lim Chee Aun
965f948899
Recode some nested modal closing logic
...
Seems more robust
2023-10-19 16:06:55 +08:00
Lim Chee Aun
32bf258bbf
Test memoize enhanceContent
2023-10-15 01:19:21 +08:00
Lim Chee Aun
f56a44ac97
Complete transition from mem to moize
2023-10-14 20:33:40 +08:00
Lim Chee Aun
0a7f158b70
Memoize translated results
...
First step in migrating to moize
2023-10-14 20:10:34 +08:00
Lim Chee Aun
a095a30500
Breaking news: upgrade to masto v6
...
Expecting bugs!
Also include some fixes for states init.
2023-10-12 12:48:09 +08:00
Lim Chee Aun
b8767f3618
Fix load wrong account's stuff when adding new account
...
Some account-based calls were called before states are initialized
2023-10-11 19:07:36 +08:00
Lim Chee Aun
8cd3e38f22
Move this up, Intl stuff seems to run slow sometimes
2023-10-04 10:19:28 +08:00
Lim Chee Aun
be964f933c
Better throttle instead of debounce
2023-10-04 10:05:21 +08:00
Lim Chee Aun
4436c337dd
Cleanup
2023-10-03 15:07:47 +08:00
Lim Chee Aun
48f1527cc6
Robustify useTruncated
...
Also attempt to fix weird scrollHeight bug again
2023-10-03 13:03:03 +08:00
Lim Chee Aun
f05267b216
MVP implementation of listing muted/blocked users
2023-10-02 17:51:36 +08:00
Lim Chee Aun
13cf7b3f92
It's time for global media alt modal
2023-09-28 15:48:32 +08:00
Lim Chee Aun
0f5edef199
Miss one here
2023-09-28 11:22:05 +08:00
Lim Chee Aun
b7416bc17d
Handle Takahe links
2023-09-28 11:19:24 +08:00
Lim Chee Aun
d4dca0e81f
Support non-rectangular custom emojis 😩
...
Platforms like Misskey have irregularly-shaped custom emojis (emojos?)
- So far this handles horizontally-wide emojis, not tall ones (haven't seen any)
- text-overflow: ellipsis is not used because it can't ellipsis-fy wide emoji images
2023-09-24 15:45:01 +08:00
Lim Chee Aun
baca2b5851
For debugging
2023-09-21 19:44:26 +08:00
Lim Chee Aun
7e01b4a33a
Ignore cmd/ctrl/shift/alt keys + middle clicks
2023-09-21 13:03:16 +08:00
Lim Chee Aun
674c99a05d
Fix Lemmy post links not working
...
Because it's self-referential
2023-09-21 13:02:40 +08:00
Lim Chee Aun
f9b2ab3b94
Refactor truncated class
...
Also removed the hack fix, not sure why/how it's even fixed.
Don't even know how to explain the logic.
Will revisit and investigate more if the bug happens.
This `useTruncated` can now be reusable.
2023-09-19 16:27:22 +08:00
Lim Chee Aun
59dae782b2
Fix typo 🙈 🙈 🙈
2023-09-17 12:54:48 +08:00
Lim Chee Aun
1a714d214b
Fix not all classes removed
...
This is due to DomTokenList being dynamic, looping it while removing items from it cause wrong indices
2023-09-16 15:45:09 +08:00
Lim Chee Aun
7d28744234
Fix some links have same class names from the app itself
...
Srsly need to sanitize the HTML one day
2023-09-16 14:47:35 +08:00
Lim Chee Aun
27274eeab1
Rework the modal close + focus logic
...
- 'Esc' a modal will focus on "behind" nested modal
- All modals will have 'esc'
2023-09-14 20:39:23 +08:00
Lim Chee Aun
979c3b1498
Add this to hideAllModals
2023-09-12 23:55:41 +08:00
Lim Chee Aun
b57d8adf18
Add Generic Accounts modal
...
Also refactored whole bunch of stuff
2023-09-12 11:27:54 +08:00
Lim Chee Aun
a0f16057a0
Make this more readable
2023-09-10 15:29:52 +08:00
Lim Chee Aun
8018d06cdf
Another (better) way of updating safe area insets
...
Hopefully this works
2023-09-09 14:10:52 +08:00
Lim Chee Aun
0d090eb555
Keyboard shortcuts help sheet
2023-09-06 22:54:05 +08:00
Lim Chee Aun
b472e496d1
Fix bug: hashtags opening account sheet
2023-09-04 20:10:08 +08:00
Lim Chee Aun
c5766e431c
Fix error when opts is null/undefined
2023-09-03 19:44:26 +08:00
Lim Chee Aun
d4dce2fa45
Differentiate username displays
...
When there're mentions of multiple same username + different instances in a post
2023-09-03 10:07:06 +08:00
Lim Chee Aun
39d96f22a0
Make code blocks focusable
2023-09-02 20:49:25 +08:00
Lim Chee Aun
0e745663f0
Yes, push notifications (beta).
...
Heck this feature is tough.
2023-09-01 15:40:00 +08:00
Lim Chee Aun
91419b3243
Enable relative path hosting
2023-08-30 17:46:22 +08:00
Lim Chee Aun
a5865825da
Init states again after login to new account
2023-08-30 17:42:33 +08:00
Lim Chee Aun
1fae2f3208
2nd pass grouping of 1-account-many-statuses fav/boost
2023-08-27 13:06:26 +08:00
Lim Chee Aun
ccd79e5348
Further polish hashtag stuffing logic
2023-08-20 10:17:56 +08:00
Lim Chee Aun
de10faee88
Further apply text color to links
2023-08-18 13:48:45 +08:00
Lim Chee Aun
ac8a4c7fbf
Instead of return false, return the default locale arg
2023-08-14 18:03:05 +08:00
Lim Chee Aun
58c6b6349c
Time to embrace prefers-reduced-motion with picture
2023-08-08 15:34:24 +08:00
Lim Chee Aun
a8c7e08f3f
Treat posts from groups differently from boosts
2023-08-07 21:26:43 +08:00
Lim Chee Aun
4bf6b00b94
Shorten shortenNumber code
2023-07-23 14:09:39 +08:00
Lim Chee Aun
32a853ecc0
Make auto inline translation as a setting, turned off by default
2023-07-22 20:59:07 +08:00
Lim Chee Aun
ff41cd3563
Replace (most) alert/confirms with alternative UI
...
Everything might break lol
2023-07-17 21:01:00 +08:00
Lim Chee Aun
afc13c0d7e
Fix fn not refreshed in useInterval
2023-07-13 20:11:23 +08:00
Lim Chee Aun
b02cae4967
Try use more system locale
...
Hopefully locale doesn't change half way
2023-07-08 13:43:25 +08:00
Lim Chee Aun
2eba4eaf59
Prevent re-render timeline in multi-column mode
2023-07-05 16:59:28 +08:00
Lim Chee Aun
c61e9bb61c
Update account info if there's name or avatar change
2023-06-28 17:38:01 +08:00
Lim Chee Aun
fe713edee9
Unfurl Pleroma links
2023-06-27 12:19:55 +08:00
Lim Chee Aun
8d35d476e3
Fix nav menu overlapping tab bar
...
Also allow custom padding into safeBoundingBoxPadding function
2023-06-15 18:03:37 +08:00
Lim Chee Aun
3b3e0e6fde
EmojiText component replacing dangerouslySetInnerHTML
2023-06-14 17:37:41 +08:00
Lim Chee Aun
d2826085e1
useLayoutEffect instead
2023-06-14 16:15:25 +08:00
Lim Chee Aun
ddbca53a72
Safe to reuse getComputedStyle
2023-06-14 11:15:40 +08:00
Lim Chee Aun
db602147ab
Handle GoToSocial links
2023-06-13 21:08:59 +08:00
Lim Chee Aun
a1ee5be54b
Upgrade react-menu and bug fixes
2023-06-13 17:46:37 +08:00
Lim Chee Aun
58eea41b56
Scale down avatar size for non-parent-author posts in grouped contexts
...
Experimental!
2023-06-11 23:57:53 +08:00
Lim Chee Aun
cab2e47a77
Perf fixes
2023-06-11 23:31:14 +08:00
Lim Chee Aun
676fa6fbc9
Fix error when language code is "startrek_it"
...
Srsly why…
2023-06-05 11:40:30 +08:00
Lim Chee Aun
753789c0c7
Try/catch match because it throws when there's invalid language code
2023-05-20 14:14:35 +08:00
Lim Chee Aun
0df21af374
Handle cases when statusID is not used
2023-05-20 01:06:16 +08:00
Lim Chee Aun
9bb66e57ae
Show the error too
...
This is getting annoying
2023-05-12 00:05:22 +08:00
Lim Chee Aun
4d14da35a4
More sort, still not perfect
...
This proves to be more difficult than I thought
2023-05-11 18:20:34 +08:00
Lim Chee Aun
edf7f6039c
More sort, still not perfect
...
This proves to be more difficult than I thought
2023-05-11 18:13:13 +08:00
Lim Chee Aun
b8d7e18371
Fix sort, this was reversed
2023-05-10 10:02:50 +08:00
Lim Chee Aun
d264af14f1
Try handle case when configured instance domain is different than the actual instance domain
...
Honestly how do I even test if this will work
2023-05-09 18:48:19 +08:00
Lim Chee Aun
d95ef309ca
Quick fix html escaping bug
2023-05-08 12:08:26 +08:00
Lim Chee Aun
711842916d
New experiment: auto refresh
2023-05-05 17:53:16 +08:00
Lim Chee Aun
1f5d74d78e
More checks on thread contexts
...
Some instances return really wacky order of posts
2023-05-05 16:59:06 +08:00
Lim Chee Aun
d55bd95c72
Fix link detection
2023-05-05 08:54:06 +08:00
Lim Chee Aun
ef06faf259
Notifications popover, for larger screens
2023-04-30 21:03:09 +08:00
Lim Chee Aun
80d8d287a3
Handle mentions & hashtags that has @ or # BEFORE the link
2023-04-27 19:52:03 +08:00
Lim Chee Aun
2b4efc6f04
Render Misskey and Calckey QTs too
2023-04-25 11:16:00 +08:00
Lim Chee Aun
338b556e34
Only consider "stuffing" if there are more than 3 hashtags
2023-04-23 22:00:32 +08:00
Lim Chee Aun
4281a91e48
New feature: cloak mode
2023-04-23 12:08:41 +08:00
Lim Chee Aun
861a596d4e
Fix double ## and scan all links instead
2023-04-23 09:02:19 +08:00
Lim Chee Aun
8d42e33f71
Small tooltip for hashtag stuffing
2023-04-23 08:55:22 +08:00
Lim Chee Aun
3eaf3ef62b
New experiment: rendering quote toots
2023-04-23 00:55:47 +08:00
Lim Chee Aun
7a7693ae52
New feature: hashtag stuffing collapsing
2023-04-20 18:56:22 +08:00
Lim Chee Aun
b2827e690d
Better handling of mentions
2023-04-20 13:40:42 +08:00
Lim Chee Aun
b63269e42a
Handle urls from root
2023-04-17 18:56:09 +08:00
Lim Chee Aun
39ec0d29e2
Fix wrong API call when adding new account
2023-04-16 13:52:16 +08:00
Lim Chee Aun
5598059715
Spanify un-spanned mentions
2023-04-14 21:02:29 +08:00
Lim Chee Aun
f303c6d36c
Rewrite status page + media modal
...
Media modals now have their own URLs
2023-04-14 15:30:04 +08:00
Lim Chee Aun
a60ad33b47
Prevent useTitle from rerendering
2023-04-14 15:28:52 +08:00
Lim Chee Aun
f9217ac16f
Fix boost dedupe bug, it was too powerful
2023-04-09 11:36:18 +08:00
Lim Chee Aun
4b42118742
Only show boosts carousel if there are >10 items
2023-04-05 18:52:15 +08:00
Lim Chee Aun
a41871ae4b
Experimental feature: translate bio
2023-03-29 01:12:59 +08:00
Lim Chee Aun
f160a576d6
Add settings to hide translate button for certain languages
2023-03-28 19:04:52 +08:00
Lim Chee Aun
12a4b4b3b8
Fix some toots gone missing
2023-03-27 16:46:51 +08:00
Lim Chee Aun
4358f12106
Remove test
2023-03-27 16:46:40 +08:00
Lim Chee Aun
06edafa5f8
Need more debug info for dedupe boosts
2023-03-27 15:05:07 +08:00
Lim Chee Aun
caee38c98f
New experiment: dedupe boosts and group context
2023-03-26 23:18:36 +08:00
Lim Chee Aun
5208df4a28
Fix filter logic
2023-03-23 21:49:09 +08:00
Lim Chee Aun
422813be9c
New experimental Filtered Posts UI
2023-03-22 00:09:36 +08:00
Lim Chee Aun
bc4dfaf62f
Add previewMode
2023-03-16 13:02:46 +08:00
Lim Chee Aun
e0e1196c9e
Make account info load wayyyy faster on Profile page
2023-03-11 21:33:55 +08:00
Lim Chee Aun
b4f8f92431
Another bug fix
2023-03-11 09:13:11 +08:00
Lim Chee Aun
731f91122b
Fix toggle values for settings for translation
2023-03-09 13:20:01 +08:00
Lim Chee Aun
cff8c90478
Quick fix for back link not working for unfurled mastodon links
...
This is obviously the wrong 'location'
2023-03-08 23:33:53 +08:00
Lim Chee Aun
73b8294811
Split Accounts away from Settings
...
Very MVP, even #settings-container is the same for now
2023-03-08 00:32:33 +08:00
Lim Chee Aun
355b3be6e9
Alrighty, let's test this post translation out!
2023-03-07 22:38:06 +08:00
Lim Chee Aun
af7c9bc1b1
Differentiate clickable vs static toasts
2023-03-06 16:01:33 +08:00
Lim Chee Aun
d86a69903f
Need more datetime detail for Edit History
2023-03-03 18:11:37 +08:00
Lim Chee Aun
50fd06057f
Refactor niceDateTime out
2023-03-01 20:07:22 +08:00
Lim Chee Aun
a86daaac0b
Fix useScroll bug
2023-02-28 21:56:41 +08:00
Lim Chee Aun
b2b8b58863
Very basic update checker
2023-02-28 15:27:42 +08:00
Lim Chee Aun
0bc009140e
It's time to bring back the tab bar
2023-02-27 23:59:41 +08:00
Lim Chee Aun
8aaba24d1f
Add 'more' menu
...
- Refactor Toast
- Fix locale for datetime strings in status
- Nicer shadow for menus
2023-02-27 00:55:04 +08:00
Lim Chee Aun
aca3cb677b
Sometimes need exact distance instead ratio
2023-02-25 10:50:02 +08:00
Lim Chee Aun
9e867c7af5
Fix title not working when not logged in
...
Welcome page's useTitle overridden other page's useTitle
2023-02-25 10:03:34 +08:00
Lim Chee Aun
3c8ba1c34e
Need to pass instance here too
2023-02-24 00:50:06 +08:00
Lim Chee Aun
e2a679e202
memoize status calls
2023-02-23 22:53:12 +08:00
Lim Chee Aun
e6d6adb480
First small step to resolving mastodon links
...
And open them inside Phanpy instead of like an external link
2023-02-23 16:45:53 +08:00
Lim Chee Aun
2120a1e28e
Still got to make sure instance is lowercase
...
Also, spellcheck={false} > spellcheck="false"
2023-02-22 09:46:50 +08:00
Lim Chee Aun
5c6c9a43f2
Fix regression: threadify stopped working
...
This is due to status key changed with extra instance string
2023-02-19 21:16:23 +08:00
Lim Chee Aun
522d55ebb8
New experiment: multi-column mode
2023-02-18 20:48:24 +08:00
Lim Chee Aun
4337c89ddf
Add one more hide modal
2023-02-17 11:29:53 +08:00
Lim Chee Aun
ca943cbc5a
A bit late to fix this but better be consistent
2023-02-17 10:17:41 +08:00
Lim Chee Aun
82c8247ac8
Fix infinite loop bug!!
2023-02-17 01:54:19 +08:00
Lim Chee Aun
7aba448f42
Handle multi-paragraph code blocks
...
This ain't going to be fun if the HTML gets messier in the future
2023-02-16 21:51:22 +08:00
Lim Chee Aun
0bef245c83
New feature: Shortcuts
2023-02-16 17:52:16 +08:00
Lim Chee Aun
255ca8eaa6
Support edit media description for Mastodon v4.1
2023-02-13 01:21:18 +08:00
Lim Chee Aun
25ff2b9176
Smarter distancing for useScroll
2023-02-12 17:46:20 +08:00
Lim Chee Aun
0b6dd07eee
Rewrote notifications, again
2023-02-12 17:38:50 +08:00
Lim Chee Aun
55d8908cf5
For page not loading when logged out
...
Because path is undefined
2023-02-11 19:36:28 +08:00
Lim Chee Aun
26f8b618a5
At this point, better write my own matchPath right?
2023-02-11 18:19:23 +08:00
Lim Chee Aun
863ac2663c
Fix titles
2023-02-11 17:57:26 +08:00
Lim Chee Aun
a4df58d297
Immediately I found a bug right after I toot about it
2023-02-10 01:01:06 +08:00
Lim Chee Aun
91aeed5fe6
Respect your preferences
2023-02-09 23:59:57 +08:00
Lim Chee Aun
58d4ca0ff2
Finally replace Home
2023-02-09 22:27:49 +08:00
Lim Chee Aun
129417bad3
Fix wrong links
2023-02-09 17:41:42 +08:00
Lim Chee Aun
f511b0a5ab
More code porting
2023-02-08 19:11:33 +08:00
Lim Chee Aun
9921e487e8
Minimum viable Home → Following port
2023-02-08 00:31:46 +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
fa3ee31cd3
Fix #55
2023-02-02 10:30:16 +08:00
Lim Chee Aun
bbb3017b2d
Quietly handle hashtag links
...
No follow/unfollow yet.
2023-01-31 19:31:25 +08:00
Lim Chee Aun
969fddc581
Time for use-debounce
...
Try a leading debounce here
2023-01-30 20:51:06 +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
ae37d58826
Fix document.title not working properly
2023-01-29 15:22:16 +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
e83d128f62
Rewrite Notifications page + experimental fix on getting/showing updates
2023-01-27 11:47:30 +08:00
Lim Chee Aun
4c05692ef5
This account resolving thingie is getting ridiculous
2023-01-22 20:29:48 +08:00
Lim Chee Aun
952f048913
Fix disabling Boosts Carousel not working
2023-01-21 23:36:31 +08:00
Lim Chee Aun
baf139762c
Scroll start logic should work when overscroll too
2023-01-20 16:05:27 +08:00
Lim Chee Aun
e382cad22a
Enable Boosts Carousel by default
...
Fix the logic here
2023-01-17 10:06:19 +08:00
Lim Chee Aun
62a3ba7c5f
Bug fixes for boosts carousel + scrolling
2023-01-16 20:32:30 +08:00