Commit Graph

77 Commits

Author SHA1 Message Date
Toby Zerner
190aa925ac Set cookies to be HTTP only 2015-09-14 14:40:05 +09:30
Toby Zerner
5b7527144c Permit trailing slashes in discussion/user URLs
closes #334
2015-08-31 14:43:42 +09:30
Toby Zerner
b689c9de3b Allow non-admins to reset their password
The EditUser command requires the actor to have the "edit" permission,
which is only granted to admins. We don't want to allow users to change
their own password via the API, though. So instead of dispatching the
command, we'll just update the user's password directly in the action.
2015-08-28 03:38:55 +09:30
Toby Zerner
baed659668 Fix reset password error 2015-08-28 02:16:28 +09:30
Franz Liedke
559110a83f Coding standards 2015-08-27 01:40:18 +02:00
Toby Zerner
0b8aa5c124 Add header comment; PSR-2 fixes; remove seeders 2015-08-26 16:56:32 +09:30
Toby Zerner
b8fc0bc376 Make discussion slug URL parameter optional 2015-08-25 19:32:41 +09:30
Toby Zerner
17dbeefabe Clean up 2015-08-17 14:11:45 +09:30
Toby Zerner
46a69b6b7e Fix PHP 5.5 compat
Might be better to opt for a getLayout method?
2015-08-13 10:41:08 +09:30
Toby Zerner
3aebd458b0 Make sure access/email/password tokens are valid 2015-08-06 15:04:38 +09:30
Toby Zerner
2553f4f0a3 Throw an exception if discussion not found
closes flarum/core#208
2015-08-06 13:59:09 +09:30
Toby Zerner
fa5c7cb123 Build very rough HTML-only content
And redirect to the "no JS" mode if the JS app crashes on boot.

ClientView/ClientAction is all a bit of a mess and will need to be
radically cleaned up at some point...
2015-08-06 12:21:11 +09:30
Toby Zerner
80e13ae289 Implement default route config setting 2015-08-06 12:18:59 +09:30
Toby Zerner
187517a9c7 Remove ability for users to delete themselves 2015-08-04 21:35:41 +09:30
Toby Zerner
8db17b3fb8 Fix password saving 2015-07-31 14:00:42 +09:30
Toby Zerner
697cb2ed63 Supporting routing of URL with nothing after the discussion ID
closes flarum/core#181
2015-07-28 13:46:43 +09:30
Toby Zerner
62a01c69a9 Make sure sort key exists 2015-07-28 12:27:59 +09:30
Toby Zerner
3489791932 Allow customisation of the client layout 2015-07-27 14:45:35 +09:30
Toby Zerner
6d57f902b3 Ensure we don't preload index data on non-index pages 2015-07-23 14:33:31 +09:30
Toby Zerner
017c258e46 Live preview of post editing/replying thanks to TextFormatter 👏 2015-07-22 16:05:00 +09:30
Toby Zerner
4fb292a777 Always use default includes when preloading discussion list
Making them explicit causes problems when extensions want to include
something by default (e.g. tags)
2015-07-22 10:11:23 +09:30
Toby Zerner
605c56ce3c Update extension generator 2015-07-20 18:08:50 +09:30
Toby Zerner
57650fa648 Rework public API based on events 2015-07-18 22:59:47 +09:30
Toby Zerner
6ae270db95 Remove duplicates; replace missing commas 2015-07-17 17:47:53 +09:30
Toby Zerner
f93ff7cb3f Make front-end localizable 2015-07-17 17:43:28 +09:30
Toby Zerner
bc750c8694 Fix login action 2015-07-17 14:48:24 +09:30
Toby Zerner
42f1fa1272 Improve fulltext search API and interface 2015-07-07 20:35:18 +09:30
Toby Zerner
38c2ff0306 Finish client action refactoring. closes flarum/core#126 2015-07-07 19:23:13 +09:30
Toby Zerner
54daad6e7d CSRF protection on logout action 2015-07-07 15:30:13 +09:30
Toby Zerner
99876e9e36 Initial refactor of client actions, data preloading, SEO
An initial stab at flarum/core#126. Still WIP. Preliminary
implementation of flarum/core#128 and flarum/core#13.
2015-07-07 15:29:21 +09:30
Toby Zerner
5fe88e448e Improve post stream
- Return all discussion post IDs from API requests which add/remove
posts, so the post stream updates appropriately. Related to #146
- Always unload posts that are two pages away, no matter how fast
you’re scrolling
- Retrieve posts from cache instead of reloading them
- Fix various bugs. Maybe #152, needs confirmation
2015-07-06 16:26:27 +09:30
Toby Zerner
86811c6508 Get rid of Repository interfaces 2015-07-04 18:38:59 +09:30
Toby Zerner
a74b40fe47 Massive refactor
- Use contextual namespaces within Flarum\Core
- Clean up and docblock everything
- Refactor Activity/Notification blueprint stuff
- Refactor Formatter stuff
- Refactor Search stuff
- Upgrade to JSON-API 1.0
- Removed “addedPosts” and “removedPosts” relationships from discussion
API. This was used for adding/removing event posts after renaming a
discussion etc. Instead we should make an additional request to get all
new posts

Todo:
- Fix Extenders and extensions
- Get rid of repository interfaces
- Fix other bugs I’ve inevitably introduced
2015-07-04 12:24:48 +09:30
Franz Liedke
1e04a20220 Fix login
We cannot write to an empty response.
2015-07-01 22:45:14 +02:00
Toby Zerner
56932604db Refactor CoreServiceProvider
A good start I think, but still some work to do. If we go ahead with
https://github.com/flarum/core/issues/132#issuecomment-117507974 (which
I am in favour of), we can extract the entity-related stuff into some
smaller service providers (e.g. discussion repo, an event listener,
permissions, and gambits stuff could all go in
Flarum\Core\Discussions\DiscussionsServiceProvider).
2015-07-01 22:34:11 +09:30
Franz Liedke
6e7cb1ff0e Some fixes to get along with the new bootstrapping 2015-06-30 23:29:52 +02:00
Franz Liedke
31effe943e Implement Android theme color support
As requested in the forums.
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
2015-06-26 23:11:13 +02:00
Franz Liedke
391c510f90 Upgrade Zend Diactoros to 1.1
This gives us a bunch of handy helper classes for empty responses,
redirects, HTML and JSON content types.

Closes flarum/core#153
2015-06-26 22:38:43 +02:00
Toby Zerner
e466dcc626 Significantly improve mobile UX
Most of #137 done.

- Use FastClick to make everything feel more responsive
- Use transforms for animations to make them silky smooth
- Style the drawer the same as the header to keep things simple
- Revert to fixed composer, but allow it to be minimised
- Add a separate notifications page for mobile so it’s easy to go back
- Add indicator to the menu button when there are unread notifications
- Close the drawer when navigating away
- Make dropdowns/modals scrollable
- Many other mobile tweaks and bug fixes

Didn’t take much care to keep CSS clean, due to #103
2015-06-24 11:44:53 +09:30
Franz Liedke
bc2142db51 Implement middleware for presenting pretty error pages 2015-06-20 22:39:33 +02:00
Franz Liedke
e8bd58ec07 Clean up 2015-06-20 18:21:26 +02:00
Toby Zerner
d90a8142a1 Get signup working again 2015-06-19 11:43:36 +09:30
Toby Zerner
d14716fa4d Get login/forgot password working again 2015-06-19 11:19:49 +09:30
Toby Zerner
555bb18acd Clean up some old code 2015-06-18 17:43:16 +09:30
Toby Zerner
822a216cc9 Roughly implement routes and data preloading
Only preloading data for basic requests w/o query params, at least for
the moment - if we have to preload for something like
/?q=test&sort=newest, we end up having to duplicate a whole lot of
logic between JS/PHP.
2015-06-18 17:41:37 +09:30
Toby Zerner
6db3bd9178 Refactor some APIs 2015-06-18 12:45:14 +09:30
Franz Liedke
1cbc60ca41 Merge branch 'master' into psr-7
Conflicts:
	src/Api/Actions/Discussions/IndexAction.php
	src/Api/Actions/SerializeAction.php
	src/Core/Formatter/FormatterManager.php
	src/Extend/ForumAssets.php
	src/Forum/Actions/IndexAction.php
	src/Forum/ForumServiceProvider.php
2015-06-17 00:52:50 +02:00
Franz Liedke
ffb28838b5 Add TODO message 2015-06-17 00:18:16 +02:00
Franz Liedke
33d663bc8e Revamp routing
All routes are now stored in a RouteCollection, which is then used
for dispatching by the (reusable) RouterMiddleware.

This change also entails moving all routes to the service providers.
This may be changed again later, and is done for convenience reasons
right now.
2015-06-17 00:16:35 +02:00
Toby Zerner
9ac1f53244 Add todo about query optimization 2015-06-16 16:59:48 +09:30