Commit graph

80 commits

Author SHA1 Message Date
Lim Chee Aun 263e48d019 New feature: :shortcode: expander in compose field
Using `innerHTML` because easier to code but the `encodeHTML` function is troublesome
2022-12-22 19:24:07 +08:00
Lim Chee Aun 33f0f21399 My sense of logic is getting worse 2022-12-21 01:03:24 +08:00
Lim Chee Aun d6575037eb No popping in standalone mode 2022-12-20 20:23:57 +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 9bc5340714 Extra check on loading state before allow closing 2022-12-20 13:27:14 +08:00
Lim Chee Aun e274950324 Disable popping-in/out and closing when loading 2022-12-20 13:26:45 +08:00
Lim Chee Aun 3921f8a6f9 Debugging 2022-12-20 13:24:56 +08:00
Lim Chee Aun 1c18184ef4 Fix one-char space inserted when replying to own posts 2022-12-17 17:25:04 +08:00
Lim Chee Aun db1e481bd3 Ugh have to manual trigger onInput
Is there a way to just auto trigger this?
2022-12-16 00:54:44 +08:00
Lim Chee Aun 03d2e2aa72 Add TODO for now for handling multiple mentions
If it's just all mentions with no textual content = can close(?)
But if there're a lot of mentions, won't it be dangerous to close?
User can still edit whatever in between like rearranging the mentions etc
2022-12-16 00:53:04 +08:00
Lim Chee Aun 859500a292 Fix copy since it's not just replying to one person 2022-12-16 00:51:08 +08:00
Lim Chee Aun a41b18b331 Fix auto-prepending mentions when replying
Prepend not just the reply-to status's acct, but also all mentions' acct
BUT excluding self
2022-12-16 00:50:38 +08:00
Lim Chee Aun 45babb150b Try skip polling
For large medias, API returns 202 Accepted and media is still processing https://docs.joinmastodon.org/methods/media/#v2

masto.js does extra manual poll check by GET-ing the media after uploaded to see if the media is done processing
2022-12-15 21:34:21 +08:00
Lim Chee Aun fc235024aa Handle pop-in case when there's already a Compose field open
Show confirmation first before popping-in
2022-12-15 13:03:20 +08:00
Lim Chee Aun b0372ea83b Dispatch oninput manually when textarea value change
I thought… React/Preact should do this automagically…
2022-12-14 22:54:12 +08:00
Lim Chee Aun 72751709df New feature: poll
- More fixes
2022-12-14 21:48:17 +08:00
Lim Chee Aun 975f3dd33f Finally fix HMR not working for this file 2022-12-14 00:39:35 +08:00
Lim Chee Aun 0e1f4c527e This close window check is getting on my nerves 2022-12-14 00:20:24 +08:00
Lim Chee Aun 2b21c421d1 Comment out this console.log 2022-12-14 00:19:49 +08:00
Lim Chee Aun fb6bca9016 Fix wrong logic again 2022-12-13 22:26:29 +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
Lim Chee Aun 9d78e67381 New feature: pop-out compose window
- More consistent design for both reply-to status and source status preview
- Fixed bugs too
- Make sure index.css is always above
2022-12-13 20:42:09 +08:00
Lim Chee Aun 7b7b8b9443 Different copy for editing 2022-12-13 01:14:52 +08:00
Lim Chee Aun 74ef381a9c Remove this console.log 2022-12-13 00:23:47 +08:00
Lim Chee Aun de5c33a568 Fix gifv not loading 2022-12-13 00:23:37 +08:00
Lim Chee Aun ad8ae165a6 Fix check before closing 2022-12-12 21:58:02 +08:00
Lim Chee Aun 5353a4535a New feature: Edit status!
Get's a bit hacky now
2022-12-12 21:54:31 +08:00
Lim Chee Aun b988b10c3d Fixes and refactor for compose UI with media uploads
Somehow prettier (for CSS) start running properly
2022-12-12 16:27:44 +08:00
Lim Chee Aun 7f02a7f794 Use a better string length
Using `string-length` instead of `stringz` that's used by Mastodon
2022-12-10 20:46:56 +08:00
Lim Chee Aun 2b9390a0a1 Initial commit 2022-12-10 17:14:48 +08:00