1
0
mirror of https://github.com/flarum/core.git synced 2025-07-22 17:21:27 +02:00
Commit Graph

45 Commits

Author SHA1 Message Date
Toby Zerner
3ca601d2a5 Merge pull request #575 from dcsjapan/admin-string-extraction 2015-10-14 14:45:29 +10:30
Toby Zerner
94a6ddead3 Initialise component state in init() instead of constructor
This allows component state to be overridden via monkey-patch. ref #246
2015-10-13 16:55:56 +10:30
Toby Zerner
3974235455 Further refinements to admin extensions page 2015-10-13 12:27:10 +10:30
Toby Zerner
b3e52c0474 Revamp admin extensions page
- New look
- Groups extensions by keywords
2015-10-12 15:02:59 +10:30
Toby Zerner
0af6df7f95 Fix extension settings 2015-10-11 23:18:57 +10:30
Toby Zerner
5645c79c31 External helpers are included by default now 2015-10-11 11:37:23 +10:30
Toby Zerner
2032dc20bb Bundle unminified JS; minify via ClosureCompilerService when in production
Falls back to a less effective minification library if ClosureCompilerService errors or is unavailable. Minification takes a while (20 seconds or so), but it only happens when assets are modified. Still, this means enabling/disabling extensions is taking far too long. Possible solutions:

- Don't minify initially; set a process running in the background to do minification, and server unminified assets in the meantime.
- Refactor compiler to send each JS file to CCS individually, only if that particular file has been modified.

flarum/gulp has also been updated to no longer support uglification.

closes #582
2015-10-09 00:33:53 +10:30
Toby Zerner
6bf93ae9f7 Major refactor and improvements
- Reorganised all namespaces and class names for consistency and structure. Following PSR bylaws (Abstract prefix, Interface/Trait suffix).
  - Move models into root of Core, because writing `use Flarum\Core\Discussion` is nice. Namespace the rest by type. (Namespacing by entity was too arbitrary.)
  - Moved some non-domain stuff out of Core: Database, Formatter, Settings.
  - Renamed config table and all references to "settings" for consistency.
  - Remove Core class and add url()/isInstalled()/inDebugMode() as instance methods of Foundation\Application.
  - Cleanup, docblocking, etc.

- Improvements to HTTP architecture
  - API and forum/admin Actions are now actually all the same thing (simple PSR-7 Request handlers), renamed to Controllers.
  - Upgrade to tobscure/json-api 0.2 branch.
  - Where possible, moved generic functionality to tobscure/json-api (e.g. pagination links). I'm quite happy with the backend balance now re: #262

- Improvements to other architecture
  - Use Illuminate's Auth\Access\Gate interface/implementation instead of our old Locked trait. We still use events to actually determine the permissions though. Our Policy classes are actually glorified event subscribers.
  - Extract model validation into Core\Validator classes.
  - Make post visibility permission stuff much more efficient and DRY.

- Renamed Flarum\Event classes for consistency. ref #246
  - `Configure` prefix for events dedicated to configuring an object.
  - `Get` prefix for events whose listeners should return something.
  - `Prepare` prefix when a variable is passed by reference so it can be modified.
  - `Scope` prefix when a query builder is passed.

- Miscellaneous improvements/bug-fixes. I'm easily distracted!
  - Increase default height of post composer.
  - Improve post stream redraw flickering in Safari by keying loading post placeholders with their IDs. ref #451
  - Use a PHP JavaScript minification library for minifying TextFormatter's JavaScript, instead of ClosureCompilerService (can't rely on external service!)
  - Use UrlGenerator properly in various places. closes #123
  - Make Api\Client return Response object. closes #128
  - Allow extensions to specify custom icon images.
  - Allow external API/admin URLs to be optionally specified in config.php. If the value or "url" is an array, we look for the corresponding path inside. Otherwise, we append the path to the base URL, using the corresponding value in "paths" if present. closes #244
2015-10-08 14:28:02 +10:30
dcsjapan
3a35f270be Extract admin strings
Adds app.trans calls for strings used by the admin UI.
- Strings for AddExtensionModal.js not included.
- Corresponding YAML will be sent later w/ more extracted strings.
2015-10-05 19:06:41 +09:00
Toby Zerner
dab6db7907 Add compiled JS 2015-10-03 16:59:53 +09:30
Toby Zerner
1fddd3f157 Merge branch 'master' into composer 2015-10-03 16:41:23 +09:30
Mike Nolan
982e1ba4fa Read documentation link broken
This fixes #510 by putting in the link to the themes documentation
2015-10-02 17:24:01 +01:00
Toby Zerner
60467540fe Use composer.json for extension metadata 2015-10-02 17:49:16 +09:30
dcsjapan
f7c7f96300 Revises the dashboard links to emphasize beta testing procedure.
Closes flarum/core#542
- Includes a disclaimer stating that the software is provided mainly
for testing.
- Directs bug reports to the Support tag in the forums instead of the
issue tracker
- Directs feedback to the Features tag in the forums
2015-09-25 12:55:13 +09:00
Toby Zerner
8a5a3a0624 Improve admin permissions page with icons, visual tweaks 2015-09-22 17:52:16 +09:30
Toby Zerner
7bfc3c3d21 Add abstract SettingsModal component in admin app
Makes building settings modals (that update basic config values) a
whole lot quicker/easier.
2015-09-18 13:13:25 +09:30
Toby Zerner
9544d7dd6a Patch Mithril with a bidi attribute
Enables quick bidirectional bindings. So instead of this:

<input value={prop()} oninput={m.withAttr('value', prop)}/>

... we can do this:

<input bidi={prop}/>
2015-09-18 13:06:37 +09:30
Toby Zerner
6f5433a81c Cleanup, update changelog 2015-09-18 13:01:31 +09:30
Toby Zerner
a602790cb0 Remove "custom" home page input
Also add an API to let extensions define additional default route
options.

Allowing default routes with parameters (e.g. /d/123) is very difficult
because of the way Mithril routing works, and it doesn't have a
convincing use-case to justify the trouble. So I've removed the custom
input altogether.

closes #427
2015-09-17 12:56:39 +09:30
Toby Zerner
1059147e6c Add external authenticator (social login) API
Allows registrations to be completed with a pre-confirmed email address
and no password.
2015-09-15 11:27:31 +09:30
Toby Zerner
ccefb679ad Reorganise dashboard help text 2015-08-27 10:59:50 +09:30
Toby Zerner
430a8cd575 Polish admin dashboard 2015-08-27 10:50:15 +09:30
Toby Zerner
941479edb8 Begin JavaScript cleanup 2015-08-26 16:56:33 +09:30
Toby Zerner
b0c17c8a60 Add ability to uninstall an extension 2015-08-14 12:48:29 +09:30
Toby Zerner
a34cebd94b Improve extensions page
- Allow extensions to define an icon in their flarum.json
- Show a "please wait" modal when enabling/disabling an extension
- Styling tweaks
2015-08-07 08:51:03 +09:30
Toby Zerner
bb89ef276f Implement default route config setting 2015-08-06 12:18:59 +09:30
Toby Zerner
25cc0631c9 Determine user card editing permissions in one place 2015-08-05 16:22:05 +09:30
Toby Zerner
3b9278fa25 Tweak some text/comments 2015-08-04 17:14:54 +09:30
Toby Zerner
cf280e39b4 Move config/permission actions to API; clean up cache flushing 2015-08-04 10:40:04 +09:30
Toby Zerner
95e45e8c7b Validate color fields on appearance page 2015-08-04 10:38:49 +09:30
Toby Zerner
0657bf2d27 Rough implementation of appearance settings 2015-08-03 14:35:51 +09:30
Toby Zerner
299bfc0e0a Rough extension management implementation 2015-08-03 12:03:30 +09:30
Toby Zerner
2f3d9402c9 Make the back button a functional link 2015-08-02 17:26:57 +09:30
Toby Zerner
c6deafde0e Remove modal responsibility for loading UI; using loading button state 2015-08-02 17:25:05 +09:30
Toby Zerner
50215cedfc Finish admin permissions page and clean up everything 2015-07-31 20:16:47 +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
6873f77012 Begin implementing permissions page 2015-07-29 21:00:27 +09:30
Toby Zerner
5f1db93e3d Implement basic settings page 2015-07-29 21:00:09 +09:30
Toby Zerner
f3ef5a123c Get admin area working again 2015-07-29 20:58:22 +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
0e15aafed7 Externalize babel helpers.
Saves 2kB after minify+gzip :D
2015-06-08 15:28:45 +09:30
Toby Zerner
1c80a509f1 Use new flarum-gulp package. 2015-06-08 14:57:23 +09:30
Toby Zerner
c4e18488b9 Fix admin 2015-05-05 09:16:53 +09:30
Toby Zerner
25daca8685 Share bower components between forum/admin 2015-05-05 09:16:34 +09:30
Toby Zerner
b5c95a222f Replace Ember app with Mithril app 2015-04-25 22:28:39 +09:30