Commit Graph

2303 Commits

Author SHA1 Message Date
Franz Liedke
4ef40435e3 Make StyleCI happy 2016-06-13 21:08:17 +09:00
Franz Liedke
a57c337a24 Log exceptions in error handler middleware 2016-06-12 17:22:28 +09:00
Toby Zerner
6e95762236 Fix updater 2016-06-05 15:07:15 +09:30
Toby Zerner
031456cc86 Give posts with likes/replies a little more bottom padding 2016-06-05 12:10:22 +09:30
Toby Zerner
dbf5c1ac2c Clean up unnecessary alias 2016-06-05 09:53:23 +09:30
Toby Zerner
abecb15232 Display header HTML in layout rather than app wrapper
This is so a custom layout can opt-out of displaying header HTML (e.g. embed extension)
2016-06-05 09:53:08 +09:30
Toby Zerner
55f23cf49b Actually test IlluminateValidationExceptionHandler 2016-06-05 09:25:47 +09:30
Toby Zerner
bdc0bd3d02 Distinguish between attributes/relationships in ValidationException
This exception could be a candidate for inclusion in tobscure/json-api...
2016-06-05 09:25:26 +09:30
Toby Zerner
1d0621951b Make alert control color consistent on focus 2016-06-05 09:23:36 +09:30
Toby Zerner
d2dc0d05e5 Move phpunit.xml into root to make PHPUnit easier to run
This seems to be pretty standard. Can just run `vendor/bin/phpunit` without any arguments. Removes the need for `composer test` (which is not ideal anyway as it removes colours from the output).
2016-06-05 09:16:29 +09:30
Toby Zerner
44d44ef0aa Increase muted text contrast 2016-06-04 18:10:22 +09:30
Toby Zerner
79fff37bce 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
Dominion
1c475ea63f Add newline to locale switch (#974)
- Added to match format of other sections and increase readability.
2016-06-04 13:43:47 +09:30
Toby Zerner
5ca9b43b7e Convert EditCustomCssModal into a SettingsModal 2016-06-03 14:51:51 +09:30
Toby Zerner
1935cca730 Increase text contrast in dark mode 2016-06-03 14:51:00 +09:30
Toby Zerner
9810952d1d Recompile dist JS using latest version of babel 2016-06-03 10:57:42 +09:30
Toby Zerner
ef5fd104f7 Add option to write the config file to a different path 2016-06-03 10:55:50 +09:30
Toby Zerner
c3f0f3b14c Fix up some references to old classes 2016-05-29 16:01:58 +09:30
Toby Zerner
2a75581b13 Use smaller FontAwesome shim repo instead of original
components/font-awesome is ~8 MB smaller than fortawesome/font-awesome because it excludes all examples/docs. Reducing dependency filesize will be important when we want to package up a .zip for distribution.
2016-05-29 10:21:37 +09:30
Toby Zerner
5bc55e4538 Make Post component subclasses build on parent content
Extensions may wish to add attributes/content to all posts, regardless of type, by extending methods on the Post component. Now the subclasses will not overwrite, but rather append to, these additions.
2016-05-28 09:44:44 +09:30
Toby Zerner
971a1a5cdd Make discussion "hidden" state more explicit
Previously a discussion was classified on the front-end as "hidden" if it had zero posts. This was technically a correct statement as the discussion would not be visible to the public... but it also meant that a discussion with zero posts (like one awaiting approval) was impossible for the OP to delete/hide (i.e. indicate that they made a mistake and they don't want the discussion to be approved).
2016-05-28 09:43:21 +09:30
Toby Zerner
ed2257efb0 Remove space characters from in-between list items
They were causing some weirdness with spacing between redraws.
2016-05-28 09:38:58 +09:30
Toby Zerner
97b6b06280 Allow extensions to add default model attributes
Extensions can add default column values in their migrations, but Eloquent doesn't know about this when it first saves a model to the database.

This is useful in flarum-ext-approval where the default value for is_approved on the posts table is true.
2016-05-28 09:37:43 +09:30
Toby Zerner
fb939da898 Fix permission logic priorities
This helps to fix a bug in flarum-ext-tags where a user could not rename or edit the tags of their own discussion if it was in a restricted tag. This was due to the order of GetPermission event listeners – the logic that determines that a user *can't* perform an action because of a restrictive tag was running before (and thus instead of) the logic that determines that a user *can* edit their own stuff.

The solution is to change the "catch-all" methods on Policies to "after" instead of "before" – that is, they will run only if the per-ability methods return null.

We also simplify the GetPermission event by passing the model as a sole "argument", as I can't imagine any cases where we'll need more than one argument.
2016-05-28 09:35:08 +09:30
Toby Zerner
8ab991c299 Make sure deprecated ConfigureClientView event still works 2016-05-27 14:57:27 +09:30
Toby Zerner
e6b16234b6 Fix installer/updater 2016-05-27 14:53:22 +09:30
Toby Zerner
059950ef4a Simplify deleted post toggle CSS
(The animation was buggy anyway)
2016-05-27 13:56:56 +09:30
Toby Zerner
cc36542b40 Only check for reply permission for actual replies. fixes #917 2016-05-27 13:56:04 +09:30
Toby Zerner
d4a333e2b8 Fix notifications dropdown not showing 2016-05-27 13:53:50 +09:30
Toby Zerner
8d26d2ee8f 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
Toby Zerner
3bfd5ee35d Give PostEdited default cursor; make info slightly more compact 2016-05-27 12:39:15 +09:30
Toby Zerner
4c3ebe2538 Fix PostEdited tooltip not updating 2016-05-27 12:38:28 +09:30
Toby Zerner
dc21bbb743 Fix detection of whether or not an asset file is "empty"
We can't rely on files/strings for this, since the Locale JsCompiler doesn't use either, but still has content.
2016-05-27 12:20:14 +09:30
Franz Liedke
558f2103ef Make StyleCI happy and fix some docblocks 2016-05-27 09:07:49 +09:00
Davis
e41a427a6b Trim spaces in getPlainContent, prevent images from loading
fixes #834 closes #963
2016-05-27 07:34:57 +09:30
Toby Zerner
500cdbbcb3 Recompile dist JS 2016-05-27 07:32:36 +09:30
Davis
6061f404f9 Fix Permission Name (#965) 2016-05-26 23:54:25 +09:00
Toby Zerner
7d448e81ff Bring post controls dropdown in front of the composer again
The underlying problem is fixed in flarum-ext-mentions.
2016-05-26 22:25:39 +09:30
Toby Zerner
fbe87416cf Don't write/serve empty asset files
The new locale-specific CSS file doesn't have any content by default, so it's a waste to write it and serve it to the user.
2016-05-26 22:24:56 +09:30
Toby Zerner
ed8a145348 Rename Server register API to extend
More consistent with how extensions work
2016-05-26 19:12:32 +09:30
Toby Zerner
d2bce5d756 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
Franz Liedke
e07b5eb8eb Recompile dist JS 2016-05-23 22:54:48 +09:00
Dominion
afeee3af4b Pluralize Turkish (#967)
- Changes the pluralization category of Turkish.
- See: https://discuss.flarum.org/d/2937-pluralization-problems
2016-05-23 22:53:33 +09:00
Franz Liedke
a7f20e67ea Update TextFormatter to next release
This fixes some minor issues with emojis working correctly in the dropdown,
but not when rendered in the live preview or from the server.
2016-05-23 22:48:59 +09:00
Dominion
682da85dfc Clean up translation keys (#964)
- Corrects the suffix on a key in the Change Email modal.
- Extracts the title of the Edit User modal.
2016-05-21 22:03:57 +09:30
Davis
e4a758dfdf Show post IP address in meta dropdown. closes #956 closes #657 2016-05-21 22:02:42 +09:30
Toby Zerner
6c878cfced Correct order of compiled JavaScript modules 2016-05-21 20:32:06 +09:30
Toby Zerner
363cc4acb1 Add API to allow skeleton to customise the Application instance 2016-05-21 20:31:42 +09:30
Toby Zerner
9f00d8245c Fix crash on reset password page 2016-05-21 20:29:38 +09:30
Toby Zerner
cf1b71e76a Fix wonky avatar display when expanding a deleted post 2016-05-21 20:29:04 +09:30