Commit Graph

54 Commits

Author SHA1 Message Date
4734dbf46d Release 0.1.0-beta.4 2015-11-05 16:29:13 +10:30
96b85f1330 Use icon instead of "Discussions" text, fix bugs
- Fix admin page crash
- Only show invisible pin button on desktop; hide it completely on ≤ tablet
2015-11-03 15:54:06 +10:30
d497782f65 Release 0.1.0-beta.3 2015-11-03 10:01:52 +10:30
e95cb09caa Recompile JavaScript 2015-10-22 10:16:08 +02:00
49d59089e4 Add third tier to key namespacing
- Changes all `app.trans` calls to `app.translator.trans` calls.
- Changes existing keys to [three-tier namespace structure](https://github.com/flarum/english/pull/12).
- Extracts additional strings for `lib:` namespace.
- Extracts two previously missed strings for EditGroupModal.js.
2015-10-20 13:04:43 +09:00
26a821e3e2 Improve client XHR error handling
The default XHR error handler produce an alert which is appropriate to the response status code. It can be overridden per-request (by specifying the `errorHandler` option) so that the alert can be suppressed or displayed in a different position (e.g. inside a modal).

ref #118
2015-10-20 12:48:26 +10:30
5cd2d6a79f Add error handling to edit group modal 2015-10-19 15:44:00 +10:30
c08b62af80 Refactor translation and validation
We now use Symfony's Translation component. Yay! We get more powerful pluralisation and better a fallback mechanism. Will want to implement the caching mechanism at some point too. The API is replicated in JavaScript, which could definitely use some testing.

Validators have been refactored so that they are decoupled from models completely (i.e. they simply validate arrays of user input). Language packs should include Laravel's validation messages.

ref #267
2015-10-15 22:30:45 +10:30
4b3e1b16d9 Remove forum. prefix from permissions
closes #425
2015-10-14 16:11:00 +10:30
a3c11587b7 Merge pull request #575 from dcsjapan/admin-string-extraction 2015-10-14 14:45:29 +10:30
33dd5fff36 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
6f7cce5adf Further refinements to admin extensions page 2015-10-13 12:27:10 +10:30
4c2ff6e82d Revamp admin extensions page
- New look
- Groups extensions by keywords
2015-10-12 15:02:59 +10:30
208d90293d Fix extension settings 2015-10-11 23:18:57 +10:30
cf42765513 External helpers are included by default now 2015-10-11 11:37:23 +10:30
18def302d6 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
dd67291ce0 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
4725ac4131 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
2223e1a13c Add compiled JS 2015-10-03 16:59:53 +09:30
296b822636 Merge branch 'master' into composer 2015-10-03 16:41:23 +09:30
56e10ce6ba Read documentation link broken
This fixes #510 by putting in the link to the themes documentation
2015-10-02 17:24:01 +01:00
e251cf34c4 Use composer.json for extension metadata 2015-10-02 17:49:16 +09:30
4851596c78 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
5598e885b7 Improve admin permissions page with icons, visual tweaks 2015-09-22 17:52:16 +09:30
6fff3cc0dc 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
0b406a06a1 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
1fc369c59e Cleanup, update changelog 2015-09-18 13:01:31 +09:30
dbd33f687c 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
6beb4fe898 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
d352c49e29 Reorganise dashboard help text 2015-08-27 10:59:50 +09:30
b0db7bf751 Polish admin dashboard 2015-08-27 10:50:15 +09:30
734badb4bc Begin JavaScript cleanup 2015-08-26 16:56:33 +09:30
014bacb7ab Add ability to uninstall an extension 2015-08-14 12:48:29 +09:30
3f809761d3 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
80e13ae289 Implement default route config setting 2015-08-06 12:18:59 +09:30
3f0089e8bb Determine user card editing permissions in one place 2015-08-05 16:22:05 +09:30
186bdc7fd4 Tweak some text/comments 2015-08-04 17:14:54 +09:30
2e4d38b3e7 Move config/permission actions to API; clean up cache flushing 2015-08-04 10:40:04 +09:30
afe031f269 Validate color fields on appearance page 2015-08-04 10:38:49 +09:30
83e8503df1 Rough implementation of appearance settings 2015-08-03 14:35:51 +09:30
70901b1420 Rough extension management implementation 2015-08-03 12:03:30 +09:30
8f4ef28475 Make the back button a functional link 2015-08-02 17:26:57 +09:30
d44ffd1866 Remove modal responsibility for loading UI; using loading button state 2015-08-02 17:25:05 +09:30
fde7afd3e2 Finish admin permissions page and clean up everything 2015-07-31 20:16:47 +09:30
e204794b91 Allow custom variables to be set on the client app 2015-07-31 20:08:27 +09:30
42fd8e26c1 Begin implementing permissions page 2015-07-29 21:00:27 +09:30
f96cac6057 Implement basic settings page 2015-07-29 21:00:09 +09:30
e863bd53d3 Get admin area working again 2015-07-29 20:58:22 +09:30
ab6c03c0cc 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
8f856f85db Externalize babel helpers.
Saves 2kB after minify+gzip :D
2015-06-08 15:28:45 +09:30