1
0
Fork 0
Commit Graph

200 Commits

Author SHA1 Message Date
Nicolas Perriault 8832b3156f Closes #132: Split model update functions to their own modules. (#147) 2017-05-07 14:31:51 +02:00
Nicolas Perriault 6746b21725 Fix #141: Hide error notifications after a delay. (#146) 2017-05-07 10:01:11 +02:00
Nicolas Perriault 3b852237ed
Make load-more btn area fully clickable. 2017-05-07 09:58:17 +02:00
Nicolas Perriault 1a96c4336a Fix #140: Reflect status events in the notifications timeline. (#142) 2017-05-06 17:52:21 +02:00
Nicolas Perriault 55cfab9976 Fix #114: Close autocomplete menu when pressing Esc. (#139) 2017-05-06 16:00:00 +02:00
Nicolas Perriault bda0a82f3f
Mark timelines as loading. 2017-05-06 11:41:50 +02:00
Nicolas Perriault 8344d63f47
Add consistency to timeline names. 2017-05-06 11:15:52 +02:00
Nicolas Perriault 28ec437644
Fix #87: Add a badge when an account follows you. 2017-05-06 00:06:32 +02:00
Nicolas Perriault c6e1fa9fd4
Fix #112: Load more statuses and notifications initially. 2017-05-05 23:55:30 +02:00
Nicolas Perriault 50ee7646fd
Fix #127: Avoid requesting relationships without providing ids. 2017-05-05 23:47:25 +02:00
Nicolas Perriault fcfa767b91 Fix #29: Allow clearing notifications. (#137) 2017-05-05 23:36:16 +02:00
Nicolas Perriault 56ade98158 Fix #134: Paginate notifications. (#136) 2017-05-05 23:35:54 +02:00
Nicolas Perriault 102210aebb
Post #64: Fix erroneous account timeline update. 2017-05-05 19:34:44 +02:00
Nicolas Perriault 3ab26c09d8
Use the right status entry view for the account tl. 2017-05-05 19:20:07 +02:00
Nicolas Perriault 072991520c Fix #133: Show status visibility. (#135)
Also revisits the way we expose visibility choices (and their hierarchy) in the draft form.
2017-05-05 19:18:20 +02:00
Nicolas Perriault 2b74533960 Fix #64: Handle paginations. (#131)
* Extract link header values.
* Expose response link header to a new type.
* Add tests for Mastodon.http.extractLinks.
* WiP
* Wrap decoded content and links into a new Response type.
* Update MastodonMsg handlers so they handle responses.
* Remove debug statements.
* Add edge case to tests.
* Add missing TODO comment.
* Simplifies Mastodon.Http signatures
* Paginate the user timeline.
* I lost my mind. May revert.
* Updated Http API to be more explicit.
* Fuck namespaces.
* Cosmetics.
* I'm burnt out, lost 10 pounds, but it works.
* Fix qs param for local tl was appended to link url.
* Fix my own mediocrity.
* Fix oauth endpoints.
* Fix Link header case handling with Firefox.
* Add test case for link header name case handling.
2017-05-05 17:26:49 +02:00
Vincent Jousse 9b8293554f Add scrollIntoView port (#129)
* Add scrollIntoView port

* Fix js formatting

* @n1k0's review
2017-05-04 08:31:58 +02:00
Vincent Jousse bff92549a2 Use currentView to subscribe contextually to WS
Closes #74
2017-05-03 21:58:32 +02:00
Vincent Jousse 59c1050e10 Fix global/local timeline display bug
Closes #93
2017-05-03 21:27:19 +02:00
Vincent Jousse 5a32881afd Fix global timeline display option #109 2017-05-03 20:53:12 +02:00
Frank Taillandier fe1e4632b2 More contrasted toot button (#128) 2017-05-03 18:37:45 +02:00
Nicolas Perriault 1403ee12fe
Fix broken visibility selector styles. 2017-05-03 17:24:31 +02:00
Nicolas Perriault cfb056d871
Fix erroneously linkable char count. 2017-05-03 17:11:41 +02:00
Nicolas Perriault b035879b0a Improve visibility selector. (#126) 2017-05-03 17:10:03 +02:00
Nicolas Lœuillet ab5e7bfbaf Added link to external profile in account view (#125)
* Added link to external profile in account view

* Used helpers

* Added boolean parameter for accountLink / accountAvatarLink
2017-05-03 15:08:10 +02:00
Nicolas Perriault 3b67a20909 Reflect status events in thread view. (#123) 2017-05-03 11:47:42 +02:00
Nicolas Perriault edf64977f2
Fix #124: Reload page after successful OAuth registration. 2017-05-03 09:19:36 +02:00
Nicolas Perriault 474c400f09
Fix double slash added to many endpoints. 2017-05-03 09:11:52 +02:00
Nicolas Perriault 89089b0ccf Fix #121: Refactor Mastodon.Http (#122)
* Drop use of Server args in ApiUrl.
* Generalize use of fetch to other Http functions.
* Leverage HttpBuilder.withQueryParams where applicable.
* Distinguish between request and authRequest.
2017-05-03 08:52:39 +02:00
Nicolas Perriault e673edb871
Fix non-working non-breakable space replacements. 2017-05-03 08:25:47 +02:00
Nicolas Perriault dc5ad2e670
leverage HttpBuilder.withQueryParams where applicable. 2017-05-02 22:31:15 +02:00
Nicolas Perriault ce27e30297
Generalize use of fetch to other Http functions. 2017-05-02 22:26:13 +02:00
Nicolas Perriault 44843e0ccd
Drop use of Server args in ApiUrl. 2017-05-02 22:05:46 +02:00
Nicolas Perriault 1ad5dac7a1
Fix #108, fix #100, fix #98: Reflect status event in all timelines. 2017-05-02 19:46:02 +02:00
Nicolas Perriault d130d684c9
Closes #110: Update notification filter buttons styling. 2017-05-02 17:36:10 +02:00
Nicolas Perriault 007179ba66
Fix #120: Open thread when clicking on a CW spoiler text. 2017-05-02 14:55:59 +02:00
Nicolas Perriault f064c5d8d6 Fix #118: Render a draft char counter. (#119) 2017-05-02 12:26:17 +02:00
Nicolas Perriault bf09b87215 Modularize views (#117)
* Part 1: Refactor views.

I'm in the middle of nowhere. It's cold, but I distinguish
lights.

It's dark, but my good ol' Elm keeps barking when something
looks wrong or dangerous.

I'm not afraid.

* Part 2: More views refactoring.

The night is deep, but I can see clear. The truth is
at the end of this path.

Perhaps.

* Part 3: The sun is rising.

The darkness is gently fading over, dawn is near. I can
now see mountains drawing in the horizon.

Elm is rather quiet, but keeps scrutating the shadows.

* Part 4: Moaar view splitting.

I follow some wrong path, but I'm back on track.

The sun is shining.

* Epilogue

That was actually fun.
2017-05-02 08:27:01 +02:00
Vincent Jousse 69f0cfdc54 Closes #44: Autocomplete usernames. (#107)
* Get @mention in model

* Add autocomplete logic

* Get accounts to autocomplete from the server

* Add autocomplete css

* Check if we should show menu on account search

* Add keyboard events

* Update status with completed username

* Trigger autocomplete when getting accounts back

* Highlight choices on hover

* Put focus on textarea after updating it

* Fix clear draft

* Hit the server only on non empty query

* Lazzzzzzzzzzzzzzzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

* Add missing lazy

* Add keyboard subscriptions

* Add images and display name

* Better menu visibility handling

* Add lazy to notifications

* Js formatting.

* Improve styles.

* Add unique keys to costly lists.

* Fix tests.

* Coding style nits.

* Use the encodeUrl helper in ApiUrl.

* Nanonit.

* Improve autocomplete box styling.

* CamelCase draft record

* Move all autocomplete stuff to Draft

* Send status to ports with the reply prefix.

* Clear draft after posting a status.

* Move ports setStatus call to a dedicated Command helper.

* Naming.

* Fix navigation with arrow keys in textarea

* Always autoselect the first item of the menu
2017-05-01 22:10:34 +02:00
Nicolas Perriault 5da0c77551
it works™. 2017-04-30 12:15:33 +02:00
Nicolas Perriault 3530f3c79d
NotificationFilter type. 2017-04-30 11:46:51 +02:00
Nicolas Perriault dbb32037b7
Initial view and styling. 2017-04-30 11:40:32 +02:00
Nicolas Perriault b341f31b50
Adapt stylings. 2017-04-30 11:20:57 +02:00
Nicolas Perriault 8bb9adb307
Add more scroll events when navigating timelines. 2017-04-30 11:08:30 +02:00
Nicolas Perriault 059b2726e6 Fix #49: Denote account relationships, follow & unfollow actions. (#105)
* Check relationships.
* Follow & unfollow actions.
* Don't display follow button to ourselves.
* Profile view follow button.
* Added follow/unfollow button to viewed account profile.
2017-04-29 22:48:55 +02:00
Nicolas Perriault 57f7f0cc7c Fix #81: Account followers and followings (#104) 2017-04-29 18:05:06 +02:00
Nicolas Perriault 017f07d45d Improve reply prefix computation. (#103) 2017-04-29 11:57:26 +02:00
Nicolas Perriault 44f8caa1ea Fix #97: Allow deleting a toot. (#102) 2017-04-29 09:20:26 +02:00
Nicolas Perriault d32f12bf20 Slice timelines to 100 entries max. (#90) 2017-04-28 20:09:19 +02:00
Nicolas Perriault cfe0937a01
Fix wrong scrolling behavior for account timeline. 2017-04-28 19:35:14 +02:00
Nicolas Perriault 3ea6aaade2 Dedupe multiple account references in notifs. (#101) 2017-04-28 19:08:46 +02:00
Nicolas Perriault 56932df177 Fix #85 : Add a link to column headings for scrolling to top. (#88)
gg @nicosomb
2017-04-28 14:06:00 +02:00
Nicolas Perriault fc08b5c6a9 Exclude current user from draft reply mentions. (#86)
* Exclude current user from draft reply mentions.
* @nicosomb review.
2017-04-28 11:21:54 +02:00
Nicolas Perriault 558f0295a5
Prevent opening thread view when clicking on ext. links. 2017-04-28 09:41:11 +02:00
Nicolas Perriault 9668e63f34
Open account when clicking on a follower's bio. 2017-04-28 09:24:14 +02:00
Nicolas Perriault 50f74848e8
Open thread on status text click. 2017-04-28 09:19:55 +02:00
Nicolas Perriault 5fbfe8e7cb
Fix #80: Include all mentions in draft replies. 2017-04-28 09:03:50 +02:00
Nicolas Perriault 75aa841ceb Fix #26: Load account timeline. (#77) 2017-04-27 22:01:51 +02:00
Nicolas Perriault e77dca0692
Fix #76: Update current view when using timeline option. 2017-04-27 19:48:35 +02:00
Nicolas Perriault 1596085617
Fix duplicate account column view heading. 2017-04-27 19:44:19 +02:00
Nicolas Perriault 03bbda899c Scrollable timelines. (#75) 2017-04-27 19:40:45 +02:00
Nicolas Perriault 0ad2b59c32 Fix #65: Add a thread view. (#73)
* Add Mastodon.Http.context.
* Added thread events.
* Fix a few server endpoint urls.
* Added thread views.
2017-04-27 18:39:14 +02:00
Nicolas Perriault f5b41aa155 Modularize the Mastodon package. (#70) 2017-04-27 16:34:27 +02:00
Nicolas Perriault 2de53bd103 Handle WebSocket "delete" events. (#69)
* Handle WS delete events.
* Factor ws msg handlers to their own updater.
2017-04-27 08:11:24 +02:00
Nicolas Lœuillet d40f110b59 Refactored API URL (#67) 2017-04-26 17:07:43 +02:00
Vincent Jousse 00ffcecf1d Add websocket for local and global timeline (#66)
* Connect to the websocket API

* Enable user timeline update through websockets

* Update elm-html-parser to latest

* Listem to local and global timelines

* Subscribe to global timeline only if it's displayed

* Some review changes

* Add elm-test and test notification aggregates

* Add new follow notification

* Fex addNotificationToAggregates

* Add test

* Clarify logic

* Update local and global timelines using WS

I've renamed the "public" timeline to "global", and removed the HTTP
reload of the user timeline when posting a Toot. We only rely on
websockets now.
2017-04-25 23:33:37 +02:00
Nicolas Perriault c72a9281df
Fix erroneous WS subscription name for public TL. 2017-04-25 22:32:27 +02:00
Nicolas Perriault 1af985130f Move mastodon server messages to their own type. (#63) 2017-04-25 20:37:44 +02:00
Nicolas Perriault 299a0236dc Fix #57: Reply preserving initial status properties. (#62)
Preserve visibility, sensitivity and spoiler text in replies.
2017-04-25 18:45:11 +02:00
Nicolas Perriault a2e4014b56
Add error logging to WS errors. 2017-04-25 17:27:21 +02:00
Nicolas Perriault b0c6bc0240 Fix #30: Unique CW and NSFW content togglers. (#54) 2017-04-25 17:07:48 +02:00
Vincent Jousse 583ee2def2 Connect to the websocket API (#35) 2017-04-25 16:27:15 +02:00
Nicolas Lœuillet ff81482572 Added link to original toot on date (#52) 2017-04-25 15:29:33 +02:00
Nicolas Perriault 4385aed0a2
Minor code cleanups. 2017-04-25 12:18:24 +02:00
Nicolas Lœuillet 09b52a2c7f Added date for each toot (#50) 2017-04-25 12:15:45 +02:00
Nicolas Perriault 5f457f009a Fix #43: Sanitize server url. (#47)
* Sanitize server url.
* Prettify auth page.
2017-04-25 10:13:00 +02:00
Nicolas Perriault b5fa55f49d Fix #45: Add a media viewer. (#46) 2017-04-24 21:21:43 +02:00
Jérémy Benoist 7e2896dcf0 Use project url instead of instance url (#41) 2017-04-24 12:02:23 +02:00
Nicolas Perriault bbc3efeec8 Better follow notifications. (#38)
- improve the follow notification layout and displayed information of followers
- fixes an issue with them not being actually aggregated
- fixes a bug where reblog action button was highlighted when it was actually a fave
2017-04-24 11:46:14 +02:00
Nicolas Perriault 6b75c90ef6 Aggregate notifications. (#37) 2017-04-23 21:49:04 +02:00
Nicolas Perriault 3a697f07bb
Fix error when boosting a status. 2017-04-23 20:08:22 +02:00
Nicolas Perriault e6ba007f18
Gain real estate with large notifications. 2017-04-23 14:39:11 +02:00
Nicolas Perriault 225a95a637 WiP: Add status action buttons. (#32)
* Add status action buttons.
* Handle favorite actions.
* Handle reblog actions.
* Optimistic updates for reblogs.
2017-04-23 10:18:47 +02:00
Nicolas Perriault 82ada5ede8
Add a button to close the account view. 2017-04-22 17:03:35 +02:00
Nicolas Perriault d8f5270128
Remove main page heading. 2017-04-22 16:43:45 +02:00
Nicolas Perriault 440806fa80 Fix #23: Render user mentions in the second column. (#31)
* Render user mentions in the second column.
* Add a timeline type toggler.
2017-04-22 16:39:19 +02:00
Nicolas Perriault b10761a413
Fix code formatting. 2017-04-22 14:49:05 +02:00
Nicolas Lœuillet c834260557 Added link to profile on avatar (#28) 2017-04-22 14:48:03 +02:00
Nicolas Perriault 3a487d6e02 Render image attachments in statuses. (#24)
* Render image attachments in statuses.
* Add a doorhanger to NSFW images. Sorry Japan.
2017-04-22 13:50:02 +02:00
Vincent Jousse 201c6f48ce WIP: Display user account (#13)
* Display user account information in console

* Review's modifications

* Load user on mention click

* Display account information

* Reviews

* Undo messy refactoring

* Remove unused function
2017-04-22 10:16:14 +02:00
Nicolas Perriault 0a9abd449c Close #20: Render spoilers appropriately. (#21) 2017-04-21 14:07:55 +02:00
Nicolas Perriault 9b1520ffbc Handle post visibility. (#14) 2017-04-21 14:03:39 +02:00
Nicolas Perriault 126f3318ee
Fix #18: Fix broken column layout. 2017-04-21 13:04:28 +02:00
Nicolas Perriault 5e6bc42642 Improve timeline styles. (#17)
* Improve timeline styles.
* Add icons to column headings.
* Address a few typography issues.
* Handle long links.
* Linewrap attachment links.
2017-04-21 10:41:46 +02:00
Nicolas Perriault dc3c860d70
Add a shorter type alias for requests. 2017-04-20 22:55:08 +02:00
Vincent Jousse 8627bffbe0 Generalize `fetch` function by using a type var (#12)
I will need it to fetch an user account so it has to able to decode
something else than a `List Status`.
Using a type variable allows the calling function to provide the
decoder, and thus we can reuse `fetch` for something else.
2017-04-20 21:33:17 +02:00
Nicolas Perriault aa91182ff6 Allow posting messages (#7) 2017-04-20 20:30:19 +02:00
Jérémy Benoist 1c8559e4ad Add application link to client name (#9)
When you publish a toot the client name is associated to the toot.
By defining the `website` parameter in Mastodon model, it is automatically associated.
2017-04-20 19:12:23 +02:00
Nicolas Lœuillet c769df0933 Added link to profile on username (#5) 2017-04-20 15:43:15 +02:00
Vincent Jousse 556fab7daa Put Elm files into src/ and assets into public/ (#4) 2017-04-20 14:38:52 +02:00