1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 17:51:24 +02:00
Commit Graph

56 Commits

Author SHA1 Message Date
Toby Zerner
127c54bc1c Add multiple UrlGenerator classes for forum/api/admin
Spent quite a while looking into the best solution here and ended up going with three separate classes. Thanks to @Luceos for the PR that got this rolling (#518). My reasoning is:

- The task of routing and URL generation is independent for each section of the app. Take Flarum\Api\Users\IndexAction for example. I don't want to generate a URL to a Flarum route... I specifically want to generate a URL to an API route. So there should be a class with that specific responsibility.
- In fact, each URL generator is slightly different, because we need to add a certain prefix to the start (e.g. /api)
- This also allows us to get rid of the "flarum.api" prefix on each route's name.
- It's still DRY, because they all extend a base class.

At the same time, I could see no reason this needed to be "interfaced", so all of the classes are concrete.

Goes a long way to fixing #123 - still just a few places left remaining with hardcoded URLs.
2015-10-02 17:35:29 +09:30
Franz Liedke
e91b370794 Fix last commit 2015-09-23 18:30:28 +02:00
Franz Liedke
9ecf79e385 Fix infinite redirect on some nojs pages. 2015-09-23 17:55:16 +02:00
Toby Zerner
3af9cd794d Don't catch JS error in debug mode 2015-09-23 10:52:26 +09:30
Daniel Klabbers
3c492f486a fixed flarum/core#489 missing meta description from admin area 2015-09-16 21:43:53 +02:00
Toby Zerner
c2f876b00b Prevent XML from being interpreted as PHP short tags 2015-09-14 18:12:36 +09:30
Toby Zerner
d549e26a4b Don't require database password confirmation 2015-09-04 21:45:52 +09:30
Franz Liedke
b30004a9d4 Web installer: Fix name of table prefix field 2015-09-04 12:14:48 +02:00
Franz Liedke
8d7e8ad7ca Reorder installer fields 2015-09-04 12:00:39 +02:00
Franz Liedke
4df26d7d5c Ask for password confirmation in web installer, too
Closes #405.
2015-09-04 12:00:03 +02:00
Franz Liedke
e4828f49a4 Be more consistent in case AJAX does not work 2015-08-31 22:37:04 +02:00
Franz Liedke
cb1ae3bdce Try to fix Safari bug during installation 2015-08-31 22:35:12 +02:00
Franz Liedke
75b8f1f13e Add field for table prefix in web installer
Related to #269.
2015-08-31 09:10:27 +02:00
Toby Zerner
5f9f42dc4b Installer: Prevent crash when views directory is not writable
Use plain PHP templates instead of Blade templates so there is nothing
that needs to be written.

closes #376
2015-08-31 14:25:16 +09:30
Huy Tran
8b5a346259 Make Google Web Font work on both HTTP and HTTPS 2015-08-27 20:17:42 -07:00
Toby Zerner
65901ce216 Check some requirements before installation 2015-08-27 20:11:06 +09:30
Toby Zerner
22182f3106 Update links and remove license file extension 2015-08-27 19:56:37 +09:30
Franz Liedke
85638f6669 Fix installer link to Flarum website 2015-08-27 11:37:49 +02:00
Toby Zerner
3490e8887b Use new discussion URL format 2015-08-25 19:52:24 +09:30
Toby Zerner
c3b8296e6f Fix installer issues 2015-08-17 14:32:38 +09:30
Toby Zerner
e8e818ac45 Implement web installer 2015-08-17 14:12:02 +09:30
Toby Zerner
6e087f7dc0 Don't redirect to HTML-only mode if in debug mode 2015-08-14 12:50:15 +09:30
Toby Zerner
6db682217a Prepend base URL to assets 2015-08-13 10:44:16 +09:30
Toby Zerner
6f4d7a36b6 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
dfdfae7b6d Remove footer and move language selection to header 2015-08-06 12:16:55 +09:30
Toby Zerner
c067db09d1 Allow custom variables to be set on the client app 2015-07-31 20:08:27 +09:30
Toby Zerner
87a8e4a137 Use System.get instead of System.import
All of the modules we import should already be loaded, and we don't
want to ever attempt to import them anyway because we do not include a
Promise polyfill.
2015-07-29 21:08:24 +09:30
Toby Zerner
f3ef5a123c Get admin area working again 2015-07-29 20:58:22 +09:30
Toby Zerner
a9d4be8c0b Allow customisation of the client layout 2015-07-27 14:45:35 +09:30
Toby Zerner
d82da543b4 Use System.get instead of System.import
Means we get drop Promise polyfill
2015-07-27 14:16:39 +09:30
Toby Zerner
09540295ad Rework extension bootstrapping
System JS modules don't execute when they're registered, so we need to
import them explicitly. While we're at it, we may as well make the
locale bootstrapper a module too.
2015-07-20 18:08:28 +09:30
Toby Zerner
130aa6ce72 Throw error to console if app fails to boot 2015-07-17 17:43:51 +09:30
Toby Zerner
2aa9c2e746 Major CSS revamp
- Get rid of Bootstrap (except we still rely on some JS)
- Use BEM class names
- Rework variables/theme config
- Fix various bugs, including some on mobile

The CSS is still not ideal – it needs to be cleaned up some more. But
that can be a focus for after beta.
2015-07-17 14:47:49 +09:30
Toby Zerner
1c7653e79e Massive JavaScript cleanup
- Use JSX for templates
- Docblock/comment everything
- Mostly passes ESLint (still some work to do)
- Lots of renaming, refactoring, etc.

CSS hasn't been updated yet.
2015-07-15 14:01:11 +09:30
Toby Zerner
662a4dc54f Finish client action refactoring. closes flarum/core#126 2015-07-07 19:23:13 +09:30
Toby Zerner
23eec806e6 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
Franz Liedke
64e8a0abf3 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
Toby Zerner
06a50e92aa Make home button route correctly, not respond on middle click
Amends flarum/core#140, closes flarum/core#136
2015-06-25 08:14:51 +09:30
Franz Liedke
0f577d28d5 Link to forum homepage in header bar.
Closes #140.
2015-06-24 22:21:44 +02:00
Toby Zerner
1f2e16c4bb Get login/forgot password working again 2015-06-19 11:19:49 +09:30
Toby Zerner
b43f34c120 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
87f84f0614 Improvements to change/forgot password 2015-05-27 16:25:44 +09:30
Toby Zerner
b6a8416daf Improve email changing/confirmation stuff 2015-05-27 16:24:54 +09:30
Toby Zerner
e47678f403 Very rough implementation of forgot password 2015-05-26 11:14:06 +09:30
Toby Zerner
c4e18488b9 Fix admin 2015-05-05 09:16:53 +09:30
Toby Zerner
40715203a5 Define assets in a more appropriate spot, make extensible 2015-05-02 08:10:06 +09:30
Toby Zerner
4c42be1362 Extract config into database 2015-05-02 08:07:51 +09:30
Toby Zerner
0fc1691103 Merge remote-tracking branch 'upstream/master' 2015-04-25 22:45:27 +09:30
Toby Zerner
b5c95a222f Replace Ember app with Mithril app 2015-04-25 22:28:39 +09:30
Rodrigo Argumedo
b8e2933479 Update wording of the confirmation email 2015-04-20 10:23:33 -06:00