Commit Graph

67 Commits

Author SHA1 Message Date
32ac48c6a9 Make Add Extension modal's title translatable 2016-12-27 01:52:54 +01:00
fcdf36b3d0 Added search input types to 3 inputs total, closes #726
* Added type search to search bar (forum)
* Added CSS `box-sizing: inherit` to search <input> because bootstrap styles mess up the search box
* Added type color to both color settings in appearance (admin)
2016-11-27 19:39:47 -05:00
feffe53a86 Add ability to upload a logo + favicon, and add custom header HTML
Closes #268. Not going to bother with a preview SVG or anything fancy for now – we can think about that as part of #746. Right now it's just good to finally get this functionality in!

Also need to think about apple-touch-icon, msTile stuff, and social sharing image. Not sure if this is all too much for core, but it's definitely too much for the current Appearance page layout. Again, something to think about as part of #746.

Code is a bit rough around the edges, but figured there's not much point in using the command bus properly since #870.
2016-06-04 18:05:46 +09:30
786c2fcfa5 Convert EditCustomCssModal into a SettingsModal 2016-06-03 14:51:51 +09:30
240aa9e83b Improve permissions page
- Introduce the concept of "required permissions" - basically a permission dependency tree. In order for a group to be granted one permission, they must also have another.
- Improve redraw performance by not building dropdown menu contents until dropdown is opened

ref #904
2016-05-27 12:42:19 +09:30
f0f668fb93 Fix Permission Name (#965) 2016-05-26 23:54:25 +09:00
9bfb797fdc Refactor the web app bootstrapping code
- All custom JS variables are now preloaded into the `app.data` object, rather than directly on the `app` object. This means that admin settings are available in `app.data.settings` rather than `app.settings`, etc.
- Cleaner route handler generation
- Renamed ConfigureClientView to ConfigureWebApp, though the former still exists and is deprecated
- Partial fix for #881 (strips ?nojs=1 from URL if possible, so that refreshing will attempt to load JS version again)
2016-05-26 19:04:24 +09:30
909f52522b Show post IP address in meta dropdown. closes #956 closes #657 2016-05-21 22:02:42 +09:30
58c9a6164a Automatically support basic HTML tags in translations
This allows front-end translations to use basic (attributeless) HTML tags freely, without the need for the translator call to supply a matching vdom element. Translations can thus make use of styling (<em>, <code>, etc.) as they see fit. The translator call can still optionally supply a vdom element to substitute in more complex tags where necessary (e.g. hyperlinks).

/cc @dcsjapan
2016-05-21 20:25:32 +09:30
0cc75be55e Add a heading to the admin mail page 2016-05-15 20:46:58 +09:00
fa7871cc16 Admin menu: Move email tab closer to the top 2016-05-15 20:31:23 +09:00
a884a3592b Tweak structure of mail settings page
Refs #258 and #933.
2016-05-15 20:28:05 +09:00
9637d27b56 Fix translation keys 2016-05-15 12:08:11 +09:00
18ee8578e8 Remove unused import 2016-05-13 00:25:11 +09:00
6b108d99cb Changed "Advanced" to "Mail"
+ Added labels above inputs
-  Removed Placeholders
2016-04-23 09:19:02 -04:00
45045a2ac1 Added "Advanced" page on admin & SMTP settings
Refs #258
2016-04-17 09:54:41 -04:00
6dd190114d Retain global page components between routes 2016-04-08 13:38:16 +09:30
210bbc800a Fix settings not automatically showing when an extension is enabled 2016-03-31 17:11:23 +10:30
25d18d79fb Revert "Use GroupBadge component since we already have that"
This reverts commit eb76767e7098a373445fb5820b8a2597868cd7fe.
2016-03-29 22:46:23 +09:00
eb76767e70 Use GroupBadge component since we already have that 2016-03-29 22:39:26 +09:00
8087d9ea47 Add missing super.init calls 2016-03-11 13:45:38 +10:30
d1c436c4d5 Dramatically improve performance when typing in a modal
Since Mithril doesn't really offer granular redraw control, typing in a text input on a modal would trigger a redraw for the whole page (including the page content behind the modal) on every keystroke. This commit allows components to be "paused" so that their vdom subtree will be retained instead of reconstructed on subsequent redraws. When a modal is opened, we pause the main page component, and when it's closed, we unpause it. This means that while a modal is visible, only the content inside of the modal will be redrawn, dramatically improving performance.
2016-03-11 13:18:16 +10:30
191589e2b1 Implemented extensions as an object, usable by backend and frontend. 2016-02-10 15:13:51 +01:00
60d78cedef Update bower dependencies, fix redraw regression
- In Mithril, `finally` has been removed from promise objects as it is not part of the ES spec. See https://gist.github.com/jish/e9bcd75e391a2b21206b for info on the substitute.
- Fix a regression introduced in e5a7013 which broke some redraws
2016-01-19 17:59:19 +10:30
be924c4fa0 Extract translations for the Add Extension modal
- Extracts three translations for this placeholder dialog.
- Adds a forum link to one of the translations.
2016-01-19 10:16:07 +09:00
4bfbf68bca Extract leftover strings
Extracts strings that were missed previously in:
- Dashboard page of admin interface.
- Edit Custom CSS modal of admin interface.
- Settings modal of admin interface.
- Post activity list on user page of forum UI.
Hopefully there aren't any more!
2015-11-28 17:14:22 +09: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
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
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
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