Commit Graph

3428 Commits

Author SHA1 Message Date
Franz Liedke
440e7a7b00 Run prettier for all JS files 2020-04-17 11:57:55 +02:00
Franz Liedke
915375fc7c Merge pull request #2099 from flarum/fl/prettier
Install prettier for consistent JS styling
2020-04-17 11:20:52 +02:00
Franz Liedke
da4f835c15 CI: Run prettier to check for JS code formatting 2020-04-17 11:14:37 +02:00
Franz Liedke
45474ccc1b Setup husky for automatic formatting before commit 2020-04-17 10:45:36 +02:00
Franz Liedke
c098423c00 Add NPM shortcut for running prettier 2020-04-17 10:45:05 +02:00
Franz Liedke
19adcf33dd Configure prettier via JSON file 2020-04-17 10:44:36 +02:00
Franz Liedke
37450dabf3 Install prettier 2020-04-17 10:44:31 +02:00
Franz Liedke
bebcf04280 Merge pull request #2117 from flarum/fl/2055-streamline-uploads
Simplify uploads, avoid Application contract
2020-04-15 22:52:03 +02:00
Franz Liedke
699ffec331 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-04-13 09:59:07 +00:00
Franz Liedke
8b30734ffb Tweak event extender (tests)
- Inject contract, not implementation
- Do not dispatch event in test, let the core do that
- Ensure the relevant database tables are reset prior to the test
- Use correct parameter order for assertions

Refs #2097.
2020-04-13 11:58:47 +02:00
Franz Liedke
cde69480bf Tweak mail extender (tests)
- Use private over protected
- Use "public" API for building requests in tests
- Add more assertions
- Formatting
- Use correct parameter order for assertions

Refs #2012.
2020-04-13 11:58:46 +02:00
flarum-bot
88bd7fc53f Bundled output for commit e98145d627 [skip ci] 2020-04-13 09:22:40 +00:00
Alexander Skvortsov
e98145d627 Add year, localization support for displaying things older than 1 year (#2034) 2020-04-13 11:21:27 +02:00
Alexander Skvortsov
0245df0573 Mail Extender (#2012)
This allows registering new drivers, or overwriting existing ones.
2020-04-13 10:46:33 +02:00
Alexander Skvortsov
f0adb6a120 Add event extender (used for domain events) (#2097) 2020-04-13 10:45:34 +02:00
Alexander Skvortsov
83e69dc61d Improved UI of Switch with loading indicator (#2039)
* Moved loading indicator outside of checkboxes to improve ui
* Made loading indicator more visible, fade label when switch is loading
2020-04-10 22:51:58 +02:00
flarum-bot
24dc0fc143 Bundled output for commit 2fe7d96288 [skip ci] 2020-04-10 19:18:00 +00:00
w-4
2fe7d96288 Fix PostStreamScrubber click (#1945) 2020-04-10 21:16:57 +02:00
Franz Liedke
8ee2edc3ff ForumSerializer: Use UrlGenerator for base URLs
The test from the previous commit proves this works as intended. :)

This is one more step in trying to avoid the widespread usage of the
`Application` godclass.

Refs #2055.
2020-04-10 17:46:15 +02:00
Franz Liedke
c9f0673f4b Add integration test for API root endpoint 2020-04-10 17:46:15 +02:00
Hasan Özbey
762c021f86 Fix mobile notification bubble on colored header (#2109) 2020-04-10 12:50:36 +02:00
flarum-bot
9329fd6d21 Bundled output for commit 236bedde45 [skip ci] 2020-04-10 10:32:46 +00:00
Taraflex
236bedde45 Protect dismissible modals from closing by ESC key 2020-04-10 12:30:56 +02:00
Franz Liedke
ebdef578c0 Permissions page: Tweak icon styling
- Give them a fixed width (independent of font library)
- Center the icons in their column
- De-emphasize the icons by applying a muted color

Fixes #2016, closes #2018.
2020-04-10 12:01:04 +02:00
Franz Liedke
a9f092cf4b Simplify uploads, inject filesystem instances
This avoids injecting the Application god class and assembling default
file locations in multiple places.

In addition, we no longer use the `MountManager` for these uploads. It
only added complexity (by moving tmp files around) and will not be
available in the next major release of Flysystem.

Note: Passing PSR upload streams to Intervention Image requires an
explicit upgrade of the library. (Very likely, users have already
updated to the newer versions, as the old constraint allowed it, but
we should be explicit for correctness' sake.)
2020-04-10 11:38:57 +02:00
Franz Liedke
46ec54d52d Validate PSR-compatible file upload
Instead of converting the uploaded file object to an UploadedFile
instance from Symfony, because the latter is compatible with
Laravel's validation, let's re-implement the validation for the
three rules we were using.

The benefit: we can now avoid copying the uploaded file to a
temporary location just to do the wrapping.

In the next step, we will remove the temporary file and let the
uploader / Intervention Image handle the PSR stream directly.
2020-04-10 11:38:55 +02:00
Charlie
085d3cdba6 Change default discussion comment count
This allows new public discussions to be immediately visible by users.
2020-04-08 01:13:52 +02:00
Alexander Skvortsov
d627d01544 Added CSRF Extender (#2095) 2020-04-03 21:32:18 +02:00
flarum-bot
6a7cac7704 Bundled output for commit 4ded0ffbb5 [skip ci] 2020-04-03 19:27:57 +00:00
Sami Mazouz
4ded0ffbb5 Fix new post injected above unread sticky (#1868)
Refresh the discussion list instead of prepending the new post
2020-04-03 21:26:51 +02:00
Alexander Skvortsov
c84dd4d5bf Add console extender (#2057)
* Made the console command system extender-friendly

* Added console extender

* Added ConsoleTestCase to integration tests

* Added integration tests for console extender

* Marked event-based console extension system as deprecated

* Moved trimming command output of whitespace into superclass

* Renamed 'add' to 'command'

* Added special processing for laravel commands

* Code style fixes

* More style fixes

* Fixed $this->container
2020-04-03 19:38:54 +02:00
Alexander Skvortsov
ca32879e1e Send emails through the queue 2020-04-03 13:47:12 +02:00
flarum-bot
7286889e88 Bundled output for commit 1f20cea653 [skip ci] 2020-04-03 10:03:45 +00:00
Franz Liedke
1f20cea653 Update JS dependencies to secure versions 2020-04-03 12:02:18 +02:00
Franz Liedke
2db82ffe96 Deprecations: Add removal dates and replacements 2020-04-03 11:46:32 +02:00
Hasan Özbey
10ffef032f fix extensions page layout 2020-04-03 11:44:02 +02:00
Franz Liedke
e43f091582 Revert BC breaks around notification blueprints
No need for breaking backwards compatibility here - encapsulating the
logic for `getAttributes()` in one place turns out to be quite useful.

Refs #1931.
2020-04-03 11:33:33 +02:00
flarum-bot
0ff870c02c Bundled output for commit eed1b9cbd0 [skip ci] 2020-04-01 12:42:05 +00:00
Daniël Klabbers
eed1b9cbd0 fixed an issue with Post--by-start-user for discussions that contain posts of deleted users 2020-04-01 14:40:40 +02:00
flarum-bot
76fcd7faac Bundled output for commit e7b8c05a77 [skip ci] 2020-03-30 19:19:56 +00:00
Hasan Özbey
e7b8c05a77 Update ModalManager.js 2020-03-30 21:18:48 +02:00
Hasan Özbey
90c2e7602b Update Modal.less 2020-03-30 21:18:48 +02:00
Hasan Özbey
192b003173 fix modals 2020-03-30 21:18:48 +02:00
Franz Liedke
2ed194666b Use UrlGenerator over Application for base URL
We need to get rid of this god class, as Laravel's Application contract
gets even bigger with 5.8. To avoid having to add all these methods, we
should try to stop using it where we can.
2020-03-28 11:17:45 +01:00
Franz Liedke
e446c91a27 Laravel: Stop calling deprecated fire() method
This has been deprecated and removed from the contract for a long time,
and it will be completely dropped in v5.8, our next upgrade target.
2020-03-28 11:08:44 +01:00
Franz Liedke
3246fb3fea Make tests compatible with PHPUnit 8 2020-03-28 11:06:47 +01:00
Franz Liedke
f47a4879c4 Merge pull request #1931 from flarum/dk/1869-queue-notifications
Notifications into the queue
2020-03-27 23:06:36 +01:00
Franz Liedke
119662f6ce Add new method to DiscussionRenamedBlueprint 2020-03-27 16:22:39 +01:00
Franz Liedke
cf3e0cc5bc Add BC layer for notification blueprints
This gives extension authors time to add the new `getAttributes()`
method to their `BlueprintInterface` implementations.

The layer itself is easy to remove in beta.14.
2020-03-27 16:22:38 +01:00
Franz Liedke
4c363fe76c Remove unnecessary constructor parameter 2020-03-27 16:22:38 +01:00