1
0
mirror of https://github.com/flarum/core.git synced 2025-08-13 20:04:24 +02:00

Compare commits

...

818 Commits

Author SHA1 Message Date
Sami Mazouz
382991648c chore: update changelog 2024-12-08 15:18:49 +01:00
Sami Mazouz
b44d5175b6 fix(regression): cannot pass props 2024-12-08 11:07:58 +01:00
flarum-bot
d9e79608fb Bundled output for commit 5d281b9471
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-12-07 20:07:49 +00:00
Sami Mazouz
5d281b9471 chore: graceful failure from extend/override errors (#4134) 2024-12-07 21:05:10 +01:00
Sami Mazouz
27087cc713 test: use new jest config version 2024-12-07 09:54:35 +01:00
Sami Mazouz
d5f944023c chore: prepare 2.0.0-beta.1 2024-12-07 09:50:31 +01:00
Sami Mazouz
153fb8684e chore: change jest config version 2024-12-07 09:42:15 +01:00
Sami Mazouz
eca21fa1bf chore(testing): add monorepo testing bin 2024-12-06 20:23:34 +01:00
Sami Mazouz
c835bdb59a chore(testing): use sqlite by default 2024-12-06 20:23:17 +01:00
Sami Mazouz
570580dcf0 fix: improve the flarum validator (#4133) 2024-12-06 10:23:45 +01:00
Sami Mazouz
e43449c32d chore: prepare 2.x for subsplitting 2024-12-06 09:20:55 +01:00
flarum-bot
bc695e9865 Bundled output for commit 6d88c99782
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-12-04 20:49:32 +00:00
Daniël Klabbers
6d88c99782 fix: typo in Dropdown.ts 2024-12-04 21:47:02 +01:00
Sami Mazouz
097a54289f feat: separate mariadb driver (#4132)
* feat: separate mariadb driver
* chore: add mariadb install dump
2024-12-02 10:17:27 +01:00
flarum-bot
d90573f8f1 Bundled output for commit f6e84a0dc5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-29 13:58:55 +00:00
Sami Mazouz
f6e84a0dc5 fix(em): production ready check 2024-11-29 14:56:20 +01:00
flarum-bot
22b74d0404 Bundled output for commit 94b0d67a40
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-29 13:41:10 +00:00
Sami Mazouz
94b0d67a40 fix(em): prevent use if missing php functions 2024-11-29 14:38:31 +01:00
StyleCI Bot
9920a9f2f0 Apply fixes from StyleCI 2024-11-29 12:54:36 +00:00
Nicolas Peugnet
08b36149fd test(testing): run flarum/testing package tests (#3844)
* chore(testing): run flarum/testing packages tests back again

These tests were not run on each framework build, I enabled them again.
Two of the tests were failing so I disabled them for now, it is more
important to have some tests running than none at all.

* chore(testing): remove flarum/testing dedicated workflow

It is useless now that the tests are run in the framework repo.
Also this workflow was not working anymore.

---------

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2024-11-29 13:54:20 +01:00
Sami Mazouz
7f001dfe3b fix: validate required cli install args (#4093) 2024-11-29 11:17:30 +01:00
flarum-bot
5fbb9fe9a7 Bundled output for commit 33a72f5c14
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-29 09:57:59 +00:00
33a72f5c14 fix(tags): wrong tag input width with CJK chars (#4127) 2024-11-29 10:55:21 +01:00
Sami Mazouz
af2a32a3a4 fix: larastan changes frequently 2024-11-29 10:37:44 +01:00
dependabot[bot]
bcff06a362 chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 (#4121)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-29 10:12:04 +01:00
Sami Mazouz
e1c82a19dc chore: improve form section group styling 2024-11-23 14:36:03 +01:00
Sami Mazouz
770feabb59 fix(regression): improve discussion list item styling extensibility (#4128) 2024-11-23 14:31:03 +01:00
Sami Mazouz
464b67f848 fix: skip resource eager loading if manually eager loaded 2024-11-23 09:31:38 +01:00
Sami Mazouz
41e5ff2525 feat: recover support for ico favicon (#4126) 2024-11-22 16:53:19 +01:00
Davide Iadeluca
49064f6912 fix: increase length of email field (#4118) 2024-11-22 11:03:04 +01:00
flarum-bot
7cfa560b4e Bundled output for commit 70081a267f
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-22 09:29:22 +00:00
Sami Mazouz
70081a267f fix: passing lazy loaded module to app.current.matches(...) 2024-11-22 10:26:39 +01:00
Sami Mazouz
70158aa0ef fix(regression): reply button width 2024-11-22 10:26:20 +01:00
Sami Mazouz
5e7fbcb0e8 feat: allow adding endpoints before/after others (#4115) 2024-11-22 08:45:26 +01:00
Sami Mazouz
4feb4a3820 fix(regression): unnecessary breaking change 2024-11-15 15:44:55 +01:00
Daniël Klabbers
6323314ad7 fix(regression): cannot cast as json on mariadb 10 (#4110) 2024-11-15 08:46:11 +01:00
Sami Mazouz
3b69af2ae6 feat: add fieldsBefore and fieldsAfter ApiResource extenders (#4106) 2024-11-09 14:50:39 +01:00
flarum-bot
c401e678f3 Bundled output for commit 03fe885b56
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-09 10:16:48 +00:00
Sami Mazouz
03fe885b56 fix: tests 2024-11-09 11:14:13 +01:00
flarum-bot
1ebceab85a Bundled output for commit dd45d75cd8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-09 10:10:16 +00:00
Sami Mazouz
dd45d75cd8 fix: importing extA lazy module from extB 2024-11-09 11:01:36 +01:00
Sami Mazouz
820894a7c9 test: php 8.4 (#4103)
* test: php 8.4

* fix: php 8.4 deprecations

* fix: make argument required

* chore: review changes
2024-11-08 17:33:47 +01:00
flarum-bot
845228f251 Bundled output for commit 8c331038da
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-08 16:24:42 +00:00
Sami Mazouz
8c331038da chore: recover local search component (#4104) 2024-11-08 17:22:12 +01:00
flarum-bot
04fe684db8 Bundled output for commit 75d05ee85d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-08 12:42:46 +00:00
Sami Mazouz
75d05ee85d chore: allow conditionals in Admin extender 2024-11-08 13:40:05 +01:00
flarum-bot
8ba9f14642 Bundled output for commit c2b91ba1cd
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-08 12:27:42 +00:00
Sami Mazouz
c2b91ba1cd chore: allow extensibility of bool gambit 2024-11-08 13:25:08 +01:00
Sami Mazouz
5d10fdc66a chore: laravel MariaDB min is 10.3 2024-11-04 20:22:44 +01:00
Sami Mazouz
d7a54037c2 fix(phpstan): return type 2024-11-04 11:36:41 +01:00
Sami Mazouz
ffea0db012 fix(regression): discussion creation fails 2024-11-04 11:28:57 +01:00
Sami Mazouz
b3a40115af fix: null title error 2024-11-04 11:14:46 +01:00
StyleCI Bot
c754ced61c Apply fixes from StyleCI 2024-11-02 15:29:22 +00:00
Sami Mazouz
849faf8065 revert: recover start method used by ecosystem 2024-11-02 16:29:10 +01:00
flarum-bot
6e90945922 Bundled output for commit cf9d88f334
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-11-02 14:38:55 +00:00
Sami Mazouz
cf9d88f334 chore: remove debugging code 2024-11-02 15:36:13 +01:00
Sami Mazouz
0c32184775 feat: use components for email templating (#4102) 2024-11-02 12:09:51 +01:00
Sami Mazouz
0ac01b9053 chore: class naming 2024-11-01 15:30:19 +01:00
Sami Mazouz
4d227a6dda fix: header list item width 2024-11-01 15:04:50 +01:00
Sami Mazouz
535dbb4a10 fix: margin 2024-11-01 09:47:06 +01:00
Sami Mazouz
bb29e8793e fix: prevent wiping out existing database on install (#4092) 2024-10-25 20:08:13 +01:00
Sami Mazouz
9817cb8a60 fix: phpstan 2024-10-25 16:13:39 +01:00
flarum-bot
ff7b02ac1b Bundled output for commit 9f87bf18c2
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-25 15:03:06 +00:00
Sami Mazouz
9f87bf18c2 fix: header dropdown item might not be linkable 2024-10-25 16:00:32 +01:00
Sami Mazouz
1ead69e9b6 fix: allow use of an attribute named relationships 2024-10-25 16:00:32 +01:00
Sami Mazouz
53ac644516 chore: simplify checking of current composer 2024-10-25 16:00:32 +01:00
Sami Mazouz
6e5180dcfe fix: hard to track error 2024-10-25 16:00:32 +01:00
flarum-bot
d09ff7176c Bundled output for commit 3af78c1a3d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-25 12:49:33 +00:00
Sami Mazouz
3af78c1a3d fix: allow prefixing route names 2024-10-25 13:47:04 +01:00
flarum-bot
38585cf478 Bundled output for commit 5435d1758e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-25 09:38:24 +00:00
Sami Mazouz
5435d1758e fix: missing translation 2024-10-25 10:35:40 +01:00
flarum-bot
d6abfb0e26 Bundled output for commit 11c5a8a8eb
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-25 09:24:02 +00:00
Sami Mazouz
11c5a8a8eb fix: missing translation 2024-10-25 10:21:29 +01:00
flarum-bot
017b90b97d Bundled output for commit 4715293164
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-25 09:15:55 +00:00
Sami Mazouz
4715293164 fix: caught warnings and missing locale 2024-10-25 10:13:11 +01:00
Sami Mazouz
30c7602814 chore: update tsconfig version 2024-10-25 09:39:34 +01:00
Sami Mazouz
3b7b4055f1 test: prevent false negatives 2024-10-24 20:09:27 +01:00
flarum-bot
4d8e6abff6 Bundled output for commit 3b66925a66
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-24 17:49:43 +00:00
Sami Mazouz
3b66925a66 fix: Logout controller allows open redirects (#4091)
Co-authored-by: IanM <16573496+imorland@users.noreply.github.com>
2024-10-24 18:47:06 +01:00
flarum-bot
eae355ddaf Bundled output for commit 91fd28c319
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-24 15:52:33 +00:00
91fd28c319 fix(messages): missing tooltip translation (#4090) 2024-10-24 16:49:55 +01:00
cacf556c9a fix(regression): app header container overflow on mobile (#4089) 2024-10-24 16:49:33 +01:00
Sami Mazouz
73a029641a chore: switch formatter to format-message (#4088)
Co-authored-by: Robert Korulczyk <robert@korulczyk.pl>
2024-10-24 16:48:33 +01:00
Sami Mazouz
0464324485 chore: yarn format 2024-10-23 11:31:45 +01:00
flarum-bot
1af7a36c18 Bundled output for commit e030c1ee8c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-23 10:26:15 +00:00
e030c1ee8c fix: search box animating on small screen (#4076) 2024-10-23 11:23:47 +01:00
flarum-bot
ea9b059f70 Bundled output for commit d041515e19
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-23 10:13:32 +00:00
d041515e19 feat: date time formats from locales (#4029)
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2024-10-23 11:11:07 +01:00
flarum-bot
983d42160d Bundled output for commit dc5a7ac647
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-22 17:26:49 +00:00
dc5a7ac647 fix: alert component broken layout (#4087) 2024-10-22 18:24:20 +01:00
flarum-bot
51015b3ca4 Bundled output for commit 6a3be3301e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-22 12:56:37 +00:00
6a3be3301e fix(messages): timezone is missing from datetime (#4086) 2024-10-22 13:53:43 +01:00
Daniel
f51df1c486 feat(nicknames): allow OAuth to provide a nickname (#4004) 2024-10-22 13:52:25 +01:00
flarum-bot
d8faf25383 Bundled output for commit f729a4d054
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-22 09:11:49 +00:00
Tristian Kelly
f729a4d054 test(mentions): add integration test for reply approval notification (#3748)
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2024-10-22 10:09:18 +01:00
flarum-bot
808a060a0d Bundled output for commit d3002106d5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-22 08:31:21 +00:00
d3002106d5 fix(a11y): false aria-hidden causes inconsistent behavior (#4074) 2024-10-22 09:28:43 +01:00
Sami Mazouz
f97c67e2f9 test: prevent false negatives 2024-10-21 19:16:12 +01:00
flarum-bot
8219e76da4 Bundled output for commit 30a6a9b697
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-21 18:13:23 +00:00
Sami Mazouz
30a6a9b697 chore: ignore deprecation errors in prod (#4072) 2024-10-21 19:10:57 +01:00
Chisato Nishikigi
a0311dfb2b feat(sticky): make excerpt optional in sticky (#4016) 2024-10-21 19:09:48 +01:00
Davide Iadeluca
b86a4a0fe0 fix: inconsistent modal position (#3951) 2024-10-21 17:55:50 +01:00
Sami Mazouz
1584174e1c test: prevent false negatives 2024-10-21 16:09:02 +01:00
flarum-bot
b75a51c271 Bundled output for commit 265d0e1dd1
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-21 15:03:38 +00:00
Viktor Szépe
265d0e1dd1 chore: fix typos (#4021) 2024-10-21 16:00:56 +01:00
Tristian Kelly
084ae6fceb feat: allow resetting settings to default (#3935)
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2024-10-21 15:17:24 +01:00
flarum-bot
ee60a7f8ca Bundled output for commit b9b52d85a7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-21 10:52:15 +00:00
Sami Mazouz
b9b52d85a7 feat: define FLARUM_START constant (#4082) 2024-10-21 11:49:43 +01:00
flarum-bot
57879974ca Bundled output for commit a3333320d7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 19:34:54 +00:00
Sami Mazouz
a3333320d7 fix(ci): skip node_modules typings 2024-10-19 20:32:20 +01:00
flarum-bot
dccf1535f9 Bundled output for commit 6f823731ca
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 18:12:17 +00:00
Sami Mazouz
6f823731ca fix(gh): ci failures on node 20 2024-10-19 19:08:53 +01:00
flarum-bot
caefacbecd Bundled output for commit a47bd2d457
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 17:44:34 +00:00
Sami Mazouz
a47bd2d457 chore: update js dependencies 2024-10-19 18:41:07 +01:00
Sami Mazouz
17ec1567a4 test: fix 2024-10-19 18:05:33 +01:00
flarum-bot
e3f969588c Bundled output for commit e9be7b9aea
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 16:53:04 +00:00
Sami Mazouz
e9be7b9aea perf: store message mentions for better performance (#4079) 2024-10-19 17:49:58 +01:00
flarum-bot
8742790980 Bundled output for commit 321020ab83
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 16:48:34 +00:00
Sami Mazouz
321020ab83 fix: skip major updater if not ready for prod (#4080) 2024-10-19 17:45:30 +01:00
Sami Mazouz
a5a1f6a9d2 test: fix 2024-10-19 17:15:52 +01:00
flarum-bot
53de041194 Bundled output for commit 5d26a72e98
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 11:05:48 +00:00
Sami Mazouz
5d26a72e98 fix: typings 2024-10-19 12:02:06 +01:00
flarum-bot
09c70006c6 Bundled output for commit feff1a1e7a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-19 10:58:33 +00:00
Sami Mazouz
feff1a1e7a fix: post reply error 2024-10-19 11:55:05 +01:00
Sami Mazouz
356f97641e chore: update frontend workflow 2024-10-17 20:18:32 +01:00
Sami Mazouz
bfb82fca4b test: fix 2024-10-17 19:37:45 +01:00
flarum-bot
4acb6e36f5 Bundled output for commit 139adb0e65
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-17 18:31:38 +00:00
Sami Mazouz
139adb0e65 chore: fix typings 2024-10-17 19:28:30 +01:00
flarum-bot
fc8b58945d Bundled output for commit 675c6840ac
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-17 15:58:32 +00:00
Sami Mazouz
675c6840ac chore: phpstan 2024-10-17 16:55:25 +01:00
flarum-bot
b112fec3e7 Bundled output for commit 498b8dfe6a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-17 15:48:18 +00:00
StyleCI Bot
498b8dfe6a Apply fixes from StyleCI 2024-10-17 15:45:09 +00:00
Sami Mazouz
b866623c94 chore: phpstan 2024-10-17 16:44:55 +01:00
Sami Mazouz
07b98030df chore(em): port fix from 1.x 2024-10-17 15:19:31 +01:00
flarum-bot
7264941f91 Bundled output for commit 876a964e1e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-17 12:29:35 +00:00
Sami Mazouz
876a964e1e feat: add option for filtering read stickied on all discussions page (#4073)
Co-authored-by: Adrian McCay <2762877+adrianmccay@users.noreply.github.com>
2024-10-17 13:26:30 +01:00
flarum-bot
db17253ccd Bundled output for commit 0107c96fb7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-16 17:15:53 +00:00
Sami Mazouz
0107c96fb7 feat: extension list UI (#4066) 2024-10-16 18:12:46 +01:00
Sami Mazouz
b0e8f5ca36 refactor: remove listing of posts in the show discussion endpoint (#4067) 2024-10-16 18:02:46 +01:00
flarum-bot
40996de39a Bundled output for commit 7383bc94df
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-16 16:54:33 +00:00
Sami Mazouz
7383bc94df feat: add List-Unsubscribe header to emails (#4069) 2024-10-16 17:51:20 +01:00
flarum-bot
abe1a4cc30 Bundled output for commit f83020cd1f
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-12 13:40:26 +00:00
Sami Mazouz
f83020cd1f feat: add Admin.generalIndexItems extender (#4068)
* feat: add `Admin.generalIndexItems` extender
* docs
2024-10-12 14:37:10 +01:00
flarum-bot
77f3685033 Bundled output for commit 4291918171
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-10-02 20:56:44 +00:00
Vijayan K S
4291918171 chore: convert HeaderPrimary to TypeScript (#4052) 2024-10-02 21:53:35 +01:00
flarum-bot
da441c77ca Bundled output for commit 1a12209fdc
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-29 08:17:50 +00:00
Ngô Quốc Đạt
1a12209fdc chore: update FontAwesome v6 icon search link (#4036) 2024-09-29 09:14:47 +01:00
flarum-bot
e5f124b696 Bundled output for commit f8560ef51b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 16:11:55 +00:00
Ngô Quốc Đạt
f8560ef51b chore: wrap RepositoryModal's fields in Form component (#4034)
* chore: wrap RepositoryModal's fields in Form component

* wip
2024-09-28 17:08:52 +01:00
Ngô Quốc Đạt
40a84fc3d8 chore: do not render form header when label or description is not present (#4035) 2024-09-28 17:07:46 +01:00
flarum-bot
6444ccd6a5 Bundled output for commit 1f3afca482
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 15:15:19 +00:00
Sami Mazouz
1f3afca482 fix: regression in typings 2024-09-28 16:11:50 +01:00
flarum-bot
d818e83235 Bundled output for commit 257be2b9db
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 14:51:19 +00:00
Sami Mazouz
257be2b9db test: add frontend tests (#3991) 2024-09-28 15:47:45 +01:00
c0d3d976fa fix: new webpack config doesn't work on windows (#4030) 2024-09-28 14:04:50 +01:00
flarum-bot
29bb477efe Bundled output for commit feca3d0da6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 13:00:10 +00:00
Ngô Quốc Đạt
feca3d0da6 fix: respect user theme preference (#4033) 2024-09-28 13:56:45 +01:00
flarum-bot
077363a085 Bundled output for commit 5ff66fd033
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 12:41:10 +00:00
Sami Mazouz
5ff66fd033 fix: JS errors 2024-09-28 13:37:29 +01:00
flarum-bot
ae03e6d473 Bundled output for commit 35f76bce60
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 11:55:36 +00:00
Sami Mazouz
35f76bce60 fix: move UserSearchResult to common 2024-09-28 12:52:04 +01:00
Sami Mazouz
124b7968f2 fix: no js tests 2024-09-28 11:51:27 +01:00
flarum-bot
53f4179134 Bundled output for commit 3a266d5195
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 10:48:53 +00:00
Sami Mazouz
3a266d5195 fix: wrong IDE inserted import 2024-09-28 11:45:24 +01:00
flarum-bot
4b2c787c3f Bundled output for commit e5389acd6e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 10:42:10 +00:00
Sami Mazouz
e5389acd6e fix: js errors 2024-09-28 11:38:38 +01:00
flarum-bot
94991862ed Bundled output for commit b74ecbfacf
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 10:16:18 +00:00
Sami Mazouz
b74ecbfacf feat: messages extension (#4028)
* feat: private messages
2024-09-28 11:12:52 +01:00
flarum-bot
bc4356a7f5 Bundled output for commit 5cea3d3b9b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-28 08:38:54 +00:00
Sami Mazouz
5cea3d3b9b feat: admin search UI (#4022) 2024-09-28 09:35:37 +01:00
Ngô Quốc Đạt
e08a9f6146 chore: Bisect should use CacheClearCommand in core instead (#4023) 2024-09-25 17:28:08 +01:00
flarum-bot
3f4b1592af Bundled output for commit c5b4ff7b27
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-20 08:43:37 +00:00
青石
c5b4ff7b27 feat(emoji): allow the user to set the cdn address (#3908) 2024-09-20 09:40:23 +01:00
flarum-bot
9b9fd76045 Bundled output for commit d3144ee234
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-20 07:34:36 +00:00
Daniël Klabbers
d3144ee234 fix: cannot install without prefix (#4001) 2024-09-20 08:31:34 +01:00
Rafał Całka
e1a77fd7c8 fix: tag state loaded for wrong user (#4009) 2024-09-20 08:30:45 +01:00
aafc615d67 fix: reset save button state on failure in admin page (#4010) 2024-09-20 08:28:45 +01:00
Sami Mazouz
f13a1c8387 feat: fontawesome v6 (#4020) 2024-09-20 08:27:08 +01:00
flarum-bot
c28eee59b3 Bundled output for commit 2204157ac0
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-19 21:38:28 +00:00
Sami Mazouz
2204157ac0 fix(a11y): convert empty links to buttons (#3926) 2024-09-19 22:35:20 +01:00
flarum-bot
3a8e8ecab9 Bundled output for commit 7ecc8b0cba
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-19 16:37:22 +00:00
Sami Mazouz
7ecc8b0cba fix 2024-09-19 17:34:05 +01:00
flarum-bot
f66a1b998f Bundled output for commit 1ab3029e78
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-19 16:05:15 +00:00
Sami Mazouz
1ab3029e78 feat: post search adapted with global search (#4019) 2024-09-19 17:01:58 +01:00
Sami Mazouz
06eb613c9b chore: remove leftover debugging code 2024-09-11 12:18:35 +01:00
flarum-bot
9dc5f1572c Bundled output for commit b9037df05c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-09-11 10:33:19 +00:00
Sami Mazouz
b9037df05c fix: code splitting on dev mode 2024-09-11 11:30:10 +01:00
Sami Mazouz
270ba09d08 chore: yarn format 2024-09-11 09:38:53 +01:00
Sami Mazouz
75399117e3 fix: code splitting bug 2024-09-10 18:11:35 +01:00
flarum-bot
4cb6b8fbb9 Bundled output for commit a00b0df4d8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-08-08 14:45:00 +00:00
Sami Mazouz
a00b0df4d8 chore: IndexSidebar class 2024-08-08 15:41:48 +01:00
flarum-bot
09b9b4a083 Bundled output for commit 6663b5dff0
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-08-08 13:53:14 +00:00
Daniël Klabbers
6663b5dff0 fix: 3 char hex color is incorrectly modified to 6 (#4013)
The current logic creates `cdecde` from `cde`, it should be `ccddee`.

@dsevillamartin said this is the code to use instead and chat gpt said he's brilliant so..
2024-08-08 14:50:09 +01:00
Sami Mazouz
6b336c5ea8 chore: update dependencies (#4012)
* chore: phpunit 10

* chore: config

* Apply fixes from StyleCI

* chore: phpunit 11 (php 8.2 minimum requirement)

* feat: laravel 11

* Apply fixes from StyleCI

* feat: carbon v3

* fixes
2024-08-06 16:50:09 +01:00
flarum-bot
2f92a6c739 Bundled output for commit 770f9370af
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-08-02 11:52:43 +00:00
Sami Mazouz
770f9370af fix: 2.0 bugs (#4011) 2024-08-02 12:49:34 +01:00
Daniël Klabbers
2b56129d70 fix: duplicated mentionsUsers in extend.php 2024-06-28 21:42:36 +02:00
StyleCI Bot
873db6e00b Apply fixes from StyleCI 2024-06-22 09:59:48 +00:00
Sami Mazouz
3f6e9e6b0c chore 2024-06-22 10:59:30 +01:00
Ngô Quốc Đạt
19196c219c Simplify variable assignment using null coalescing operator (#4000) 2024-06-22 10:53:00 +01:00
flarum-bot
f3c8921b09 Bundled output for commit c8dc8f6922
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-06-22 09:48:18 +00:00
Davide Iadeluca
c8dc8f6922 refactor: unify frontend initializers naming (#4003)
* refactor: use consistent naming for frontend initializers

* refactor: use arrow functions for frontend initializers
2024-06-22 10:45:17 +01:00
flarum-bot
d52068cf5b Bundled output for commit b91caec30b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-06-22 07:08:06 +00:00
Sami Mazouz
b91caec30b feat: vanilla CSS color scheme changes (#3996)
* feat: vanilla CSS color scheme changes
* chore: scheme mixin
* chore: remove darkmode & colored header less variables
* feat: high contrast schemes
2024-06-22 08:05:07 +01:00
Sami Mazouz
379298acb0 feat: add support for PgSQL (#3985)
* feat: add support for `PgSQL`
* chore: generate dump
* feat: query exception errors db driver hint
* feat: allow defining supported databases
* chore: review comments
* feat: setting for pgsql preferred search config
2024-06-22 08:03:56 +01:00
Daniël Klabbers
d04cda6ca3 fix: homepage screenshot missing after migration 2024-06-21 22:11:37 +02:00
Daniël Klabbers
6339446c82 chore: remove huntr reference in readme 2024-06-21 22:10:56 +02:00
Daniël Klabbers
a002571984 fix: logo is missing 2024-06-21 22:10:36 +02:00
Sami Mazouz
3dd2382ea0 chore: drop the need for a json-api-server fork (#3986)
* chore: drop the need for a json-api-server fork
* chore: custom Serializer
* chore
* chore: adapt
* fix
* phpstan
2024-06-21 10:46:24 +01:00
flarum-bot
d73cd0ecdd Bundled output for commit a8777c6198
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-06-21 08:39:52 +00:00
Sami Mazouz
a8777c6198 refactor: JSON:API (#3971)
* refactor: json:api refactor iteration 1
* chore: delete dead code
* fix: regressions
* chore: move additions/changes to package
* feat: AccessTokenResource
* feat: allow dependency injection in resources
* feat: `ApiResource` extender
* feat: improve
* feat: refactor tags extension
* feat: refactor flags extension
* fix: regressions
* fix: drop bc layer
* feat: refactor suspend extension
* feat: refactor subscriptions extension
* feat: refactor approval extension
* feat: refactor sticky extension
* feat: refactor nicknames extension
* feat: refactor mentions extension
* feat: refactor lock extension
* feat: refactor likes extension
* chore: merge conflicts
* feat: refactor extension-manager extension
* feat: context current endpoint helpers
* chore: minor
* feat: cleaner sortmap implementation
* chore: drop old package
* chore: not needed (auto scoping)
* fix: actor only fields
* refactor: simplify index endpoint
* feat: eager loading
* test: adapt
* test: phpstan
* test: adapt
* fix: typing
* fix: approving content
* tet: adapt frontend tests
* chore: typings
* chore: review
* fix: breaking change
2024-06-21 09:36:32 +01:00
flarum-bot
10514709f1 Bundled output for commit eb6e599df1
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-06-21 06:28:22 +00:00
Sami Mazouz
eb6e599df1 feat: add support for SQLite (#3984)
* feat: add support for sqlite

* chore: add warning on install

* fix: ignore constraints before transaction begins

* chore: update workflow

* Apply fixes from StyleCI

* chore: generate sqlite dump and manually add foreign keys

* chore: fix actions

* chore: fix actions

* chore: fix actions

* chore: fix actions

* chore: fix actions

* chore: fix actions

* test: fix

* Apply fixes from StyleCI

* fix: sqlite with db prefix

* Apply fixes from StyleCI

* fix: statistics sqlite
2024-06-21 07:25:11 +01:00
flarum-bot
5ce1aeab47 Bundled output for commit 389d004ddc
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-06-16 15:55:43 +00:00
Ngô Quốc Đạt
389d004ddc feat: Add conditional rendering for email status in MailPage.tsx (#3997) 2024-06-16 17:52:38 +02:00
Ngô Quốc Đạt
72f89c0209 fix: setting key safe_mode_extensions not exists (#3992) 2024-05-18 18:14:04 +01:00
Davide Iadeluca
1e7eddb61e ci: allow custom actions runner to be defined (#3988) 2024-05-16 17:30:13 +01:00
flarum-bot
1302378141 Bundled output for commit 29ede5aa27
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-05-14 20:13:28 +00:00
Sami Mazouz
29ede5aa27 feat: JS Notification extender (#3974)
* feat: JS `Notification` extender

* fix
2024-05-14 21:10:07 +01:00
flarum-bot
d273b1920f Bundled output for commit b02f8190ea
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-05-03 13:23:30 +00:00
Sami Mazouz
b02f8190ea feat: extension bisect (#3980)
* feat: extension bisect
* Apply fixes from StyleCI
* chore: review
* Apply suggestions from code review
* feat: add stop bisect button
* feat: redirect to result extension page

Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
2024-05-03 14:20:12 +01:00
flarum-bot
e0025df3e7 Bundled output for commit b8e17182e9
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-05-03 13:09:21 +00:00
Sami Mazouz
b8e17182e9 feat: advanced maintenance modes (#3977)
* feat: low maintenance mode (maintenance with admin access) (#3975)
* feat: low maintenance mode (maintenance with admin access)
* Apply fixes from StyleCI
* chore: only required when basic
* chore: more concise code
* chore(review): enum
* feat: enable through settings
* Apply fixes from StyleCI
* core: typing
* feat: safe mode (#3978)
* feat: safe mode
* feat: add extension page warning
* feat: `safe_mode_extensions`
* Apply fixes from StyleCI
2024-05-03 14:05:58 +01:00
Sami Mazouz
2b917372a7 feat: eloquent factories (primarily for tests) (#3982) 2024-05-03 09:20:27 +01:00
Sami Mazouz
270188b5b0 fix: compiling split chunks in production 2024-04-26 14:25:31 +01:00
flarum-bot
9149ecc7aa Bundled output for commit 5fc2bb5eb6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-04-07 12:23:32 +00:00
Sami Mazouz
5fc2bb5eb6 fix: broken assets 2024-04-07 13:19:57 +01:00
flarum-bot
24f3a6829f Bundled output for commit bf523b2325
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-04-06 13:55:44 +00:00
Sami Mazouz
bf523b2325 chore: extract buildSettingComponent method into a FormGroup component (#3927)
* chore: extract `buildSettingComponent` method into a `FormGroup` component

* chore: typings

* feat: move to common
2024-04-06 14:52:13 +01:00
Daniël Klabbers
e771b908d5 Patch vulnerability advisory (#3966)
Seems composer has a vulnerability, see https://github.com/advisories/GHSA-7c6p-848j-wh5h


Affected versions
>= 2.0.0-alpha1, < 2.2.23 -- patched in 2.2.23
>= 2.3.0-rc1, < 2.7.0 -- patched in 2.7.0

---

Let's raise the minimum to enforce the latest.

Thank you @peopleinside for reporting this.
2024-02-22 11:40:56 +01:00
flarum-bot
721e2eae3d Bundled output for commit 3fbe05fd18
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-22 18:01:17 +00:00
Sami Mazouz
3fbe05fd18 feat(em): port extension manager from 1.0 (#3959)
* feat(em): port extension manager from 1.0

* Apply fixes from StyleCI

* chore: phpstan

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-01-22 18:58:08 +01:00
IanM
8f29b7af82 feat: support composer auth (#3961) 2024-01-22 18:57:54 +01:00
Ngô Quốc Đạt
734f4a150c chore: use hex_color rule for color validation (#3936) 2024-01-19 12:09:22 +01:00
flarum-bot
0186ca909e Bundled output for commit 1aa7806244
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-19 11:07:33 +00:00
Ngô Quốc Đạt
1aa7806244 Fix notify for all posts switch field loading state (#3938) 2024-01-19 12:04:25 +01:00
IanM
e3350543af feat: upgrade intervention/image to 3.2 (#3947)
* chore: create standalone imageprovider

* chore: upgrade intervention to v3

* Apply fixes from StyleCI

* use new static instatiation

* Revert "Apply fixes from StyleCI"

This reverts commit 096b4d9a79fa41c948a7572cf65316ebc6b07d36.

* get avatar from remote

* Apply fixes from StyleCI

* fix: incorrect gid exception namespace

* fix test

* remove debug code

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-01-19 11:49:00 +01:00
Sami Mazouz
d400dcbc2f feat: dispatch event to flarum/installation-packages on release (#3625) 2024-01-19 09:54:26 +01:00
Davide Iadeluca
430709bf5b [2.x] fix(Mentions): allow renderer to be used without context (#3954)
* fix(Mentions): allow renderer to be used without context

* test(Mentions): implement test for rendering post without context

* Update UnparsePostMentions.php

* Update PostMentionsTest.php

---------

Co-authored-by: IanM <16573496+imorland@users.noreply.github.com>
2024-01-10 11:17:11 +00:00
flarum-bot
f784f48906 Bundled output for commit 3a34136e36
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-09 21:54:15 +00:00
Sami Mazouz
3a34136e36 feat: search UI/UX revamp (#3941)
* feat: first iteration

* chore: tweak

* feat: second iteration

* chore: incorrect code organization

* feat: gambit input suggestions

* feat: gambit keyboard navigation

* chore: bugs

* feat: negative gambits

* feat: improve gambit highlighting

* refactor: localize gambits

* feat: negative and positive gambit buttons

* fix: permissions

* chore: wat

* per: lazy load search modal

* fix: extensibility and bug fixes

* fix: bugs

* feat: reusable autocomplete dropdown

* chore: format

* fix: tag filter
2024-01-09 21:51:01 +00:00
flarum-bot
fb1703cd9b Bundled output for commit b58fec7ead
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-09 18:13:57 +00:00
Ngô Quốc Đạt
b58fec7ead Fix width issue in edit user modal (#3939)
* Fix width input issue in EditUserModal

* update
2024-01-09 18:10:55 +00:00
flarum-bot
537f97a07a Bundled output for commit c1be00e79a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-09 18:04:43 +00:00
Sami Mazouz
c1be00e79a chore: improve debugging experience (#3944) 2024-01-09 18:01:29 +00:00
dependabot[bot]
91b89bc698 chore(deps): bump follow-redirects from 1.15.2 to 1.15.4 (#3957)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 18:19:28 +01:00
flarum-bot
278617a10d Bundled output for commit f793e5b8f8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-09 17:10:55 +00:00
IanM
f793e5b8f8 fix: ts error causing build to fail (#3956) 2024-01-09 17:07:38 +00:00
IanM
01598555a9 chore: larastan changed namespace (#3955) 2024-01-09 17:07:26 +00:00
StyleCI Bot
5399c86a1b Apply fixes from StyleCI 2024-01-09 15:06:12 +00:00
IanM
74ce4cf1a7 chore: dummy commit for StyleCI purposes 2024-01-09 15:05:47 +00:00
Ngô Quốc Đạt
b4a82e81fc fix: overflowing forum stats (#3940) 2023-12-01 11:42:36 +01:00
Rafał Całka
471ce0ea2a fix(approval): PostWasApproved event triggered incorrectly 2023-11-23 18:50:47 +01:00
IanM
723cb73d48 Enable testing on PHP 8.3 (#3932) 2023-11-23 18:48:24 +01:00
flarum-bot
e4abf93763 Bundled output for commit 9310ce13d8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-23 17:19:53 +00:00
Sami Mazouz
9310ce13d8 chore: yarn format 2023-11-23 18:16:49 +01:00
flarum-bot
d4c532c949 Bundled output for commit 46357ee9a9
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-23 17:14:53 +00:00
Tristian Kelly
46357ee9a9 perf(flags): add pagination to flags list (#3931) 2023-11-23 18:11:46 +01:00
flarum-bot
6cbdfb6aa1 Bundled output for commit 4b126d9f4c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-11 18:46:13 +00:00
Sami Mazouz
4b126d9f4c feat: revamp search (#3893)
* refactor: move gambits to frontend (#3885)
* refactor: move gambits to frontend
* test: GambitManager
* refactor: merge filterer and searcher concepts (#3892)
* chore: drop remaining backend regex gambits
* refactor: merge filterer & searcher concept
* refactor: adapt extenders
* refactor: no longer need to push gambits to `q`
* refactor: filters to gambits
* refactor: drop shred `Query` namespace
* chore: cleanup
* chore: leftover gambit references on the backend (#3894)
* chore: leftover gambit references on the backend
* chore: namespace
* feat: search driver backend extension API (#3902)
* feat: first iteration of search drivers
* feat: indexer API & tweaks
* feat: changes after POC driver
* fix: properly fire custom observables
* chore: remove debugging code
* fix: phpstan
* fix: custom eloquent events
* chore: drop POC usage
* test: indexer extender API
* fix: extension searcher fails without filters
* fix: phpstan
* fix: frontend created gambit
* feat: advanced page and localized driver settings (#3905)
* feat: allow getting total search results and replacing filters (#3906)
* feat: allow accessing total search results
* feat: allow replacing filters
* chore: phpstan
2023-11-11 19:43:09 +01:00
flarum-bot
9e04b010d8 Bundled output for commit 1c0e0933b0
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-11 18:38:17 +00:00
Sami Mazouz
1c0e0933b0 feat: improve emoji autocomplete (#3923)
* feat: improve emoji autocomplete
* chore: improve dropdown header
2023-11-11 19:31:53 +01:00
flarum-bot
60ffa78531 Bundled output for commit 294878291c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-10 22:16:11 +00:00
IanM
294878291c chore: format js 2023-11-10 22:09:50 +00:00
flarum-bot
05a7e24836 Bundled output for commit eaabeab8c9
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-10 22:04:30 +00:00
Sami Mazouz
eaabeab8c9 chore: extract FormModal from Modal (#3922) 2023-11-10 21:59:34 +00:00
flarum-bot
9ef366493c Bundled output for commit 208b94dc12
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-10 21:50:02 +00:00
Sami Mazouz
208b94dc12 chore(mentions,emoji): tie autocomplete to editor instance (#3913) 2023-11-10 21:44:00 +00:00
Sami Mazouz
5e3f8db095 fix: handled API errors break preloaded content (#3920)
* fix: handled API errors break preloaded content

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-10 21:39:08 +00:00
flarum-bot
deb99f0de4 Bundled output for commit 693bce912a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-10 21:38:19 +00:00
Sami Mazouz
693bce912a fix(testing): use cookie for testing authentication (#3924) 2023-11-10 21:35:24 +00:00
Sami Mazouz
3107319812 fix: paginated list limit hard to change (#3918)
* fix: paginated list limit hard to change

* chore: use the default value

* chore: apply to other list states

* chore: remove debugging code

* fix: typings
2023-11-10 21:31:46 +00:00
Sami Mazouz
a9756cb5eb fix: only set actor on events that have it (#3914) 2023-11-10 21:25:10 +00:00
flarum-bot
bbdf3b5aba Bundled output for commit e2281a2123
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-10 21:23:23 +00:00
Sami Mazouz
e2281a2123 chore: handle deprecations from 1.x (#3909)
* chore: drop deprecated `post_number_index` column

* chore: remove deprecated `FlagsWillBeDeleted` event

* chore: `Migration::addSettings` can still be needed

* chore: `settings->get` default can still be needed

* chore: deprecated `$default` in `Settings::serializeToForum` extender

* chore: deprecated request `actor` attribute

* chore: already handled

* chore: remove `RecompileFrontendAssets::whenSettingsSaved`

* chore: remove `getReadIds`

* chore: `Model::dateAttribute` extender

* chore: `evented` js util

* chore: `WelcomeHero` js hidden prop

* chore: attributes pushData with relations

* chore: app request options `extract`

* chore: itemlist deprecations

* chore: `search` state

* chore: `getMentionText`

* chore: deprecated non-registered store type

* chore: `Button` title

* chore: `Modal` deprecations

* chore

* chore: deprecated `less` mixins

* Apply fixes from StyleCI

* fix

* fix: phpstan

* fix

* fix

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-10 21:20:18 +00:00
flarum-bot
d01c0e5210 Bundled output for commit bee50bec73
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-03 13:15:30 +00:00
Sami Mazouz
bee50bec73 fix: color input changes while typing (#3919) 2023-11-03 14:08:40 +01:00
flarum-bot
679d32729e Bundled output for commit e978e29e00
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-11-03 08:10:35 +00:00
IanM
e978e29e00 fix: add history push (#3916) 2023-11-03 09:07:25 +01:00
Sami Mazouz
5cdfa0f640 fix: load event mentioned tags on show discussion endpoint (#3915) 2023-11-01 13:43:00 +00:00
flarum-bot
a3192d2934 Bundled output for commit 96ba2f5f2d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-10-29 13:51:57 +00:00
dependabot[bot]
96ba2f5f2d chore(deps): bump @babel/traverse from 7.20.1 to 7.23.2 (#3901)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.1 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 14:46:38 +01:00
Sami Mazouz
87a83d33b3 chore: avoid using .fa() mixins and @fa-var vars (#3912) 2023-10-29 14:45:50 +01:00
Ngô Quốc Đạt
015529ff1e Use ::class syntax to fetch class name instead of get_class() function (#3910) 2023-10-29 14:43:58 +01:00
flarum-bot
2950290ad1 Bundled output for commit d154388468
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-10-29 12:32:28 +00:00
Sami Mazouz
d154388468 chore: function names 2023-10-29 13:27:34 +01:00
Gary Green
7c885c72fd feat: frontend content flexible order priorities (#3765)
* Fix frontend factory so it includes controller content
* chore: more readable parameter passing
* feat: add priorities to frontend content
2023-10-29 12:59:48 +01:00
Sami Mazouz
577fc3e6a8 fix(webpack-config): split chunks can fail in dev mode (#3911) 2023-10-27 15:27:11 +01:00
IanM
e4e0fbff73 chore: remove ExtenderInterface[] as a conditional option, only support callable or ::class invoke (#3904)
* chore: remove ExtenderInterface[] as a conditional option, only support callable or ::class invoke

* Apply fixes from StyleCI

* stan

* review

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-21 17:37:07 +01:00
IanM
94de8b42b4 fix: console extender does not accept ::class attribute for schedule (#3903) 2023-10-21 17:34:48 +01:00
flarum-bot
db0d9cb006 Bundled output for commit 5ab5257ff5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-10-10 20:41:11 +00:00
Sami Mazouz
5ab5257ff5 feat: theming and extensibility improvements (#3876)
* feat: make page structure customizable across different pages (#3867)

* feat: create `PageStructure` component
* feat: apply to `DiscussionPage`
* feat: apply to `UserPage`
* feat: apply to `TagsPage`
* fix: adapt subscriptions ext
* chore: cleanup

* chore: use grid & flexbox for the discussion list item (#3868)

* chore: rename `DiscussionPage-list` to `DiscussionListPane`
* chore: itemlistify `DiscussionListItem`
* chore: use flex and grid for `DiscussionListItem`

* chore: use flexbox for `App-header` (#3869)

* chore: use flex and grid for `App-header`
* chore: drop search floats
* fix: adapt admin styles

* chore: use flexbox in dropdowns and SplitDropdown for subscriptions (#3874)

* chore: flexbox dropdown menu items
* chore: normalize subscriptions menu (use slit dropdown)
* chore: cleanup

* chore: misc flexbox/grid changes (#3875)

* chore: `TagsPage` to tsx
* chore: `TagsPage` flexbox/grid
* chore: `IndexPage-toolbar` flexbox
* chore: `UserCard` flexbox & itemlists
* fix: `Post` improve spacing logic
* chore: `Post` grid and proper spacing
* fix: avatar editor hover layer layout
* chore: `Button` flex

* chore: normalize form semantics (#3877)

* chore: normalize fieldsets
* fix: `LinkButton` spacing
* chore: consistent form semantics

* fix: styling regressions (#3878)

* fix: post spacing goes off in other pages
* fix: regression

* feat: extract reusable components from `NotificationsDropdown` (#3879)

* feat: extensible global notices (#3880)

* fix: js error on null item list
* feat: extensible global notices

* chore: housekeeping (#3881)

* chore: use CSS variables where still not using
* chore: cleanup suspension modal
* chore: cleanup post flag
* fix: badge vertical align
* chore: use CSS variables for custom coloring
* chore: `icon` helper to `Icon` component
* chore: `avatar` helper to `Avatar` component
* fix: chunk loading fails on admin frontend
* chore: format

* feat: reusable `UploadImageButton` component (#3882)

* chore: convert `UploadImageButton` to tsx
* feat: reusable `UploadImageButton` component
* feat: add `image-upload` setting type

* feat: extensible default footer component (#3883)

* chore: yarn format
2023-10-10 21:36:08 +01:00
flarum-bot
24d13e33bb Bundled output for commit 412cfafb3a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-09-29 15:39:58 +00:00
IanM
412cfafb3a feat: notification unsubscribe & email overhaul with HTML multipart (#3872) 2023-09-29 16:34:54 +01:00
Sami Mazouz
ec5cb98c77 chore: merge the app with the container & implement the ApplicationContract (#3862)
* chore: merge the app with the container & implement the ApplicationContract

Illuminate components always expect the app to be the container, but also expect the app to be implementing the laravel app contract. This means that very often between minor illuminate updates we get a call to a method on the app that doesn't exist in the Flarum app. This fixes the issue once and for all.

* chore: improve concern implementation readability
* chore: service provider no longer has to change app type
* chore: unimplement `terminat(e/ing)`
* Apply fixes from StyleCI
* chore: recover `container` prop
* chore: return types
* fix: phpstan errors
2023-09-15 09:30:24 +01:00
flarum-bot
23fdddf185 Bundled output for commit be9eb16d7d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-09-14 20:09:52 +00:00
Ngô Quốc Đạt
be9eb16d7d chore: use str_contains (#3841) 2023-09-14 21:05:15 +01:00
IanM
ee34217b15 test: add MySQL 8.1 to the suite (#3870)
* Test using MySQL 8.1 also
* fix: db not added to matrix
* chore: add MySQL 8.1 to prefix tests
2023-09-14 21:04:25 +01:00
flarum-bot
e731fb6189 Bundled output for commit 229a7affa5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-08-02 17:04:35 +00:00
Sami Mazouz
229a7affa5 feat: Code Splitting (#3860)
* feat: configure webpack to allow splitting chunks
* feat: `JsDirectoryCompiler` and expose js assets URL
* chore: support es2020 dynamic importing
* feat: control which URL to fetch chunks from
* feat: allow showing async modals & split 'LogInModal'
* feat: split `SignUpModal`
* feat: allow rendering async pages & split `UserSecurityPage`
* fix: module might not be listed in chunk
* feat: lazy load user pages
* feat: track the chunk containing each module
* chore: lightly warn
* chore: split `Composer`
* feat: add common frontend (for split common chunks)
* fix: jsDoc typing imports should be ignored
* feat: split `PostStream` `ForgotPasswordModal` and `EditUserModal`
* fix: multiple inline async imports not picked up
* chore: new `common` frontend assets only needs a jsdir compiler
* feat: add revision hash to chunk import URL
* fix: nothing to split for `admin` frontend yet
* chore: cleanup registry API
* chore: throw an error in debug mode if attempting to import a non-loaded module
* feat: defer `extend` & `override` until after module registration
* fix: plugin not picking up on all module sources
* fix: must override default chunk loader function from webpack plugin
* feat: split tags `TagDiscussionModal` and `TagSelectionModal`
* fix: wrong export name
* feat: import chunked modules from external packages
* feat: extensions compatibility
* feat: Router frontend extender async component
* chore: clean JS output path (removes stale chunks)
* fix: common chunks also need flushing
* chore: flush backend stale chunks
* Apply fixes from StyleCI
* feat: loading alert when async page component is loading
* chore: `yarn format`
* chore: typings
* chore: remove exception
* Apply fixes from StyleCI
* chore(infra): bundlewatch
* chore(infra): bundlewatch split chunks
* feat: split text editor
* chore: tag typings
* chore: bundlewatch
* fix: windows paths
* fix: wrong planned ext import format
2023-08-02 17:57:57 +01:00
Sami Mazouz
2ffbc44b4e chore(infra): bundlewatch
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 16:23:19 +01:00
Sami Mazouz
b2a5a970e8 chore(infra): bundlewatch
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 16:11:38 +01:00
Sami Mazouz
781000e047 chore(infra): bundlewatch
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 15:54:17 +01:00
Sami Mazouz
608e2a7e5a fix(phpstan): code analysis
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 13:52:58 +01:00
Sami Mazouz
7467beb72f fix(regression): avoid overriding laravel schedule command to store last run
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 13:47:56 +01:00
Sami Mazouz
6ec0911cd1 chore: yarn format
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 13:47:25 +01:00
flarum-bot
992d85e3b8 Bundled output for commit 59586e63e1
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-07-27 10:35:35 +00:00
Ngô Quốc Đạt
59586e63e1 chore: simplify if else conditions (#3843)
* chore: simplify if else conditions

* use nullsafe

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-27 11:31:04 +01:00
IanM
76004ed844 feat: add whenExtensionDisabled to Conditional extender (#3847)
* feat: add  to  extender

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-07-27 11:30:05 +01:00
IanM
e014aa0105 feat: make WelcomeHero extensible (#3848)
* chore: make WelcomeHero extensible
* undo import mithril change
* reduce to one itemlist
2023-07-27 11:27:00 +01:00
dependabot[bot]
ce334156d5 chore(deps): bump tough-cookie from 4.1.2 to 4.1.3 (#3852)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 11:25:38 +01:00
dependabot[bot]
4d0190d4b0 chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#3856)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 11:25:14 +01:00
David Sevilla Martin
da1aa2aa92 fix: default labels with SettingDropdown and SelectDropdown (#3854)
* Remove modification to label in SelectDropdown
* Only set 'defaultLabel' if falsy and translate "Custom" default
2023-07-27 11:24:19 +01:00
David Sevilla Martin
c80220ad9b fix(regression): Webpack not working on Windows with new export registry 2023-07-27 11:22:14 +01:00
dependabot[bot]
3593d53795 chore(deps): bump semver from 5.7.1 to 5.7.2 (#3853)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-12 23:04:31 +01:00
Sami Mazouz
07623afacd fix: installation command config path can be null
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-10 14:32:22 +01:00
flarum-bot
f2f7f16c68 Bundled output for commit f3b5313557
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-07-05 13:19:45 +00:00
Sami Mazouz
f3b5313557 chore: merge 1.8.1 mentions changes to 2.x 2023-07-05 14:15:01 +01:00
Sami Mazouz
0b128a5612 Merge branch '2.x' into 1.x 2023-07-05 10:29:03 +01:00
Sami Mazouz
102e31754a chore: not 1.8.2 2023-07-04 11:19:15 +01:00
Sami Mazouz
8538f9c8f6 chore: prepare v1.8.2 release 2023-07-04 11:12:55 +01:00
Sami Mazouz
5a4bb7ccf2 fix: missing slug from post mention links 2023-07-04 11:00:45 +01:00
Sami Mazouz
d2a6329689 fix(mentions): cannot use mentionables extender (#3849) 2023-07-04 10:56:52 +01:00
Sami Mazouz
40dcaf882c chore: cleanup composer deps
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-07-02 14:54:49 +01:00
Rafael Horvat
2bc2899a1d fix(mentions): missed post mentions UI changes (#3832)
Co-authored-by: Ian Morland <ian@morland.me>
2023-07-01 17:44:59 +01:00
flarum-bot
9feb9dd4eb Bundled output for commit 016503d8c3
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-29 18:24:31 +00:00
Sami Mazouz
016503d8c3 feat: export registry (#3842)
* feat: registry first iteration

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: improve webpack auto export loader

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: remove `compat` API

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: cleanup

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-29 18:57:53 +01:00
James
cf70865aa6 chore: corrected typos in routes comments 2023-06-24 09:28:59 +01:00
Ngô Quốc Đạt
b003736d75 chore: Remove unused vars in catch (#3839) 2023-06-21 16:38:24 +01:00
IanM
0cf2001478 chore: upgrade Wikimedia.less to 4.1 (#3837) 2023-06-21 15:28:01 +01:00
Sami Mazouz
5820a16a96 chore: increase phpstan level to 6 (#3836)
* chore: increase phpstan level to 6

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-06-21 14:31:24 +01:00
Nicolas Peugnet
4a966b830f Do not catch exceptions when testing Console commands (#3813)
* Do not catch exceptions when testing Console commands

This allows to easily test a case where a command should throw using `$this->expectException()`.

* Rewrite ConsoleTest to use expectException

Now that the ConsoleApplication is set to not catch exceptions.

---------

Co-authored-by: IanM <16573496+imorland@users.noreply.github.com>
2023-06-21 08:14:12 +01:00
flarum-bot
7799c2fcd5 Bundled output for commit 11b4a810b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-15 17:09:20 +00:00
Sami Mazouz
11b4a810b7 chore: upgrade to mithril 2.2 (#3831)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-15 18:04:41 +01:00
Sami Mazouz
493ffa0538 chore(phpstan): upgrade to be compatible with latest dependency updates (#3835) 2023-06-15 17:49:39 +01:00
Sami Mazouz
64b25b26c3 chore: improve test suite (#3814)
Allows running tests without constantly running `composer install` on each extension.
2023-06-15 13:26:39 +01:00
IanM
6bc19e2e52 chore: Upgrade dependencies (#3830)
* wip: laraval and symfony upgrades

* Apply fixes from StyleCI

* Apply fixes from StyleCI

* bump var dumper to 6.3

* require guzzle 7.7

* remove docbloc

* lock symfony/translation-contracts to 2.5

* fix: require mailgun package

* remove docblock

* fix: flysystem tests

* fix: instance flarum assets for testing

* Apply fixes from StyleCI

* downgrade intervention/image back to 2.x

* Apply fixes from StyleCI

* provide ImageManager to AvatarUploader

* fix larastan

* revert back some other intervention/image changes

* fix image resize

* Update framework/core/src/Http/Middleware/AuthenticateWithHeader.php

Co-authored-by: Daniël Klabbers <luceos@users.noreply.github.com>

* Apply fixes from StyleCI

* Update framework/core/src/Mail/SmtpDriver.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/User/LoginProvider.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* use named attrs

* revert imagemanager in constructor

* revert to using Contract mailer

* reinstate and update FlarumLogTransport

* correct var typo, use one less temp var

* names attrs

* uncomment test

* mailer contract

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Daniël Klabbers <luceos@users.noreply.github.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-14 14:46:15 +01:00
flarum-bot
3757bde4fc Bundled output for commit f67ca5782a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-07 10:45:14 +00:00
Sami Mazouz
f67ca5782a chore: adapt frontend workflow to new main branch
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-07 11:20:29 +01:00
Sami Mazouz
fad818d1e5 chore: add script placeholders to allow running scripts globally
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-07 11:19:59 +01:00
David Wheatley
12ef1bfdbb perf: transpile js to es6 (#3699) 2023-06-07 11:09:34 +01:00
Sami Mazouz
951f58e567 fix(regression): require flarum/testing:2.0
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:53:59 +01:00
Sami Mazouz
082f04d3c3 fix(regression): caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:50:39 +01:00
Sami Mazouz
04fe2616a4 Revert "fix(regression): caught errors"
This reverts commit c94c140484.
2023-05-31 09:47:30 +01:00
Sami Mazouz
c94c140484 fix(regression): caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:45:50 +01:00
Sami Mazouz
7b9605bb4e chore: track 2.x in bundlewatch
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-30 18:56:04 +01:00
StyleCI Bot
6e783b9c78 Apply fixes from StyleCI 2023-05-30 10:36:45 +00:00
Sami Mazouz
6f11e044a7 chore: update codebase to php8.1 (#3827)
* chore: set minimum php version to 8.1

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: update codebase to php8.1

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: update workflow php version

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: more caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: phpstan caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: introduce `Flarum\Locale\TranslatorInterface`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: remove mixin

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: one last error

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-05-30 11:36:12 +01:00
Sami Mazouz
34a04b0746 chore: recover bundlewatch (#3829)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-28 12:16:45 +01:00
flarum-bot
069677b2e3 Bundled output for commit 51bd7a7e32
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-27 18:38:40 +01:00
Darkle
57e05a5eaf Update the scheduler info link in admin (#3826) 2023-05-27 18:38:40 +01:00
Sami Mazouz
b6a6248dff chore: prepare v2.0 development
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-24 08:52:14 +01:00
Sami Mazouz
5437bf5c23 chore: prepare v1.8.1 release
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-23 19:24:51 +01:00
flarum-bot
717af13bb1 Bundled output for commit e72541e35d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-22 21:58:15 +00:00
Sami Mazouz
e72541e35d fix: recover temporary solution for html entities in browser title
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-22 22:49:20 +01:00
Sami Mazouz
577890d89c fix: custom contrast color affected by parents
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-22 22:23:11 +01:00
Sami Mazouz
253a3d281d fix: reply placeholder wrong positioning
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-22 21:58:38 +01:00
flarum-bot
d27f952584 Bundled output for commit e5abffc75b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-20 16:46:42 +00:00
Sami Mazouz
e5abffc75b chore: v1.8 preparations
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-20 16:08:42 +01:00
Sami Mazouz
d1059c1cc7 fix: improve avatar upload functionality
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-20 15:15:53 +01:00
flarum-bot
777c304ab7 Bundled output for commit 789246b621
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-17 10:47:32 +00:00
Sami Mazouz
789246b621 fix(regression): slidable mark read showing for read discussions
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-17 11:37:33 +01:00
Sami Mazouz
980cfd6c28 Update prepare-release.yml 2023-05-17 09:51:06 +01:00
Sami Mazouz
65390a4fc0 test: patch phpstan error
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-16 19:57:57 +01:00
Sami Mazouz
c7c86a77e9 fix(regression): newCollection does not accept base collection
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-16 19:25:23 +01:00
Sami Mazouz
f1f6051deb fix(regression): lost spacing between tag label icon and text
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-16 19:21:04 +01:00
Sami Mazouz
bded3da42d fix(regression): queryVisibleTo accepts nullable actor
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-16 19:17:07 +01:00
Sami Mazouz
231cee1f78 fix(regression): newCollection accepts collections
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-15 17:31:23 +01:00
flarum-bot
f6c9bbb427 Bundled output for commit feb968780a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-14 20:41:53 +00:00
Sami Mazouz
feb968780a fix(regression): missing TagsLabel class
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-14 21:34:34 +01:00
Sami Mazouz
5b89d3e91a chore(regression): use correct imports from core js
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-14 21:34:17 +01:00
Daniël Klabbers
ba7599e6fe chore: bbcode not psr autoloaded 2023-05-09 09:10:37 +02:00
Sami Mazouz
80b34d1164 fix: discussion page showing horizontal scroll on iOS (#3821)
Co-authored-by: David Wheatley <david@davwheat.dev>
2023-05-08 09:28:32 +01:00
Sami Mazouz
3accdc322c fix(regression): fetch promise rejections not handled
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-07 22:44:25 +01:00
flarum-bot
4247e54c64 Bundled output for commit ef35faaded
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 21:37:58 +00:00
Sami Mazouz
ef35faaded fix(regression): wrong app import in forum JS
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-07 22:31:07 +01:00
flarum-bot
715b8c39ae Bundled output for commit 232618aba6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 21:24:30 +00:00
Sami Mazouz
232618aba6 fix: UserSecurityPage not exported
Fixes #3820

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-07 22:18:21 +01:00
flarum-bot
96e1411b7d Bundled output for commit 21b483625e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 17:49:29 +00:00
David Wheatley
21b483625e feat: add user creation to users list page (#3744) 2023-05-07 18:38:37 +01:00
Sami Mazouz
9363682e1c fix: filter values are not validated (#3795) 2023-05-07 18:37:53 +01:00
flarum-bot
c766881e1f Bundled output for commit e63e161be6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 16:49:15 +00:00
David Wheatley
e63e161be6 chore: major frontend JS cleanup (#3609) 2023-05-07 17:40:18 +01:00
Nicolas Peugnet
3264455068 fix(testing): always clear cache in integration test's tearDown (#3818)
This prevent tests from interacting between each other through the cache.
2023-05-02 19:24:14 +01:00
Sami Mazouz
d7fcd8a9e5 fix(bbcode): highlight.js does not work after changing post content (#3817)
* fix(bbcode): highlight.js does not work after changing post content

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore(bbcode): organize bbcode code

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-05-02 09:39:43 +01:00
IanM
b4f3f0558e feat: cli command for enabling or disabling an extension (#3816) 2023-05-01 08:06:52 +01:00
Sami Mazouz
919c3bb770 perf: speed up post creation time (#3808)
* chore: drop unused visibility checking in notif syncer

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: eager load parsed mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: eager load some relations needed for visibility checking

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: trigger mentions notifications in a queueable job

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: broken tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-30 10:10:31 +01:00
Sami Mazouz
7298ccb301 feat(testing): add a trait to flush the formatter cache in tests (#3811) 2023-04-30 09:48:46 +01:00
flarum-bot
cfdd6910eb Bundled output for commit 7ebeb9c0a5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-29 17:42:13 +00:00
Sami Mazouz
7ebeb9c0a5 fix: unreadable badge icon on certain colors (#3810) 2023-04-29 18:35:18 +01:00
Sami Mazouz
af3f91ca5b fix(tags): DiscussionTaggedPost shows tags as deleted (#3812)
* fix(tags): `DiscussionTaggedPost` shows tags as `deleted`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-29 09:48:01 +02:00
Sami Mazouz
4784307e26 fix(bbcode): localize quote wrote string (#3809)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-27 20:26:28 +01:00
flarum-bot
105b22976e Bundled output for commit fea31a8290
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-24 17:10:43 +00:00
Robert Korulczyk
fea31a8290 Fix encoding of page title. (#3768) 2023-04-24 18:00:22 +01:00
Sami Mazouz
accdfde6e1 fix(mentions): mentions XHR fired even after mentioning is done (#3806)
* fix(mentions): mentions XHR fired even after mentioning is done

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: simplify diff

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-24 17:57:41 +01:00
flarum-bot
7684a1086a Bundled output for commit f8577c8078
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-22 08:52:48 +00:00
luk
f8577c8078 fix: isDark() utility can receive null value (#3774)
* Make isDark() not fail as easily with invalid input

Add early return if input looks fishy, minor refactoring and improvements of the entire method.

* Fix double quotes

* Run prettier 🙄

* chore: review

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-22 09:45:51 +01:00
flarum-bot
e55844f3db Bundled output for commit 1d20f4d4aa
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-21 06:52:38 +00:00
Rafael Horvat
1d20f4d4aa Change some methods from private to protected, to be able to extend the affected classes (#3802) 2023-04-21 07:42:42 +01:00
Sami Mazouz
803f0cd0f4 fix(tags): not all tags are loaded in the permission grid (#3804)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-21 07:38:09 +01:00
IanM
8576df1a43 fix: null as 2nd param is deprecated (#3801) 2023-04-19 19:07:10 +02:00
flarum-bot
1792e22639 Bundled output for commit 5e281136f6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 12:05:15 +00:00
Sami Mazouz
5e281136f6 feat(mentions,tags): tag mentions (#3769)
* feat: add tag search

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat(mentions): tag mentions backend

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: tag mention design

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* refactor: revamp mentions autocomplete

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: unauthorized mention of hidden groups

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat(mentions,tags): use hash format for tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* refactor: frontend mention format API with mentionable models

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: implement tag search on the frontend

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: tag color contrast

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: tag suggestions styling

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: works with disabled tags extension

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: move `MentionFormats` to `formats`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: mentions preview bad styling

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* docs: further migration location clarification

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: bad test namespace

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: conditionally add tag related extenders

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* feat(phpstan): evaluate conditional extenders

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: use mithril routing for tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-19 12:58:11 +01:00
flarum-bot
b868c3d763 Bundled output for commit 297a2d8c5c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 11:48:24 +00:00
Sami Mazouz
297a2d8c5c fix: deleting a discussion from the profile does not visually remove it (#3799)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-19 12:37:30 +01:00
flarum-bot
c0af41c305 Bundled output for commit d0669b08aa
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 08:32:02 +00:00
Sami Mazouz
d0669b08aa perf(likes): limit likes relationship results (#3781)
* perf(core,mentions): limit `mentionedBy` post relation results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: include count in show post endpoint

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: consistent locale key format

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: forgot to delete `FilterVisiblePosts`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `mentionedByCount` must not include invisible posts to actor

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: visibility scoping on `mentionedByCount`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `loadAggregates` conflicts with visibility scopers

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf(likes): limit `likes` relationship results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: simplify

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `likesCount` is as expected

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: IanM <16573496+imorland@users.noreply.github.com>
2023-04-19 09:22:41 +01:00
flarum-bot
6b8e9ce1db Bundled output for commit fbbece4bda
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 07:30:05 +00:00
Sami Mazouz
fbbece4bda perf(core,mentions): limit mentionedBy post relation results (#3780)
* perf(core,mentions): limit `mentionedBy` post relation results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: include count in show post endpoint

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: consistent locale key format

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: forgot to delete `FilterVisiblePosts`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `mentionedByCount` must not include invisible posts to actor

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: visibility scoping on `mentionedByCount`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `loadAggregates` conflicts with visibility scopers

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-19 08:23:08 +01:00
dependabot[bot]
13e655aca5 chore(deps): bump webpack from 5.75.0 to 5.76.0 (#3761)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 07:45:00 +01:00
flarum-bot
c00e8706e1 Bundled output for commit 1b5da13e8a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-17 08:14:57 +00:00
Robert Korulczyk
1b5da13e8a fix: infinite scroll not initialized for notifications on big screens (#3733) 2023-04-17 09:07:00 +01:00
flarum-bot
ecfbcd1c30 Bundled output for commit 818a100625
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-17 08:01:58 +00:00
Tristian Kelly
818a100625 feat: add delete own posts permission (#3784) 2023-04-17 08:53:51 +01:00
flarum-bot
176b5540d8 Bundled output for commit 2e76a8ecb5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-16 20:54:45 +00:00
Sami Mazouz
2e76a8ecb5 fix: color input overflowing the input box (#3796)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:33:57 +01:00
Sami Mazouz
11aa7bbb35 fix: unread count in post stream not visible (#3791)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:14:54 +01:00
Sami Mazouz
3a26c29935 feat: provide old content to Revised event (#3789)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:14:17 +01:00
Sami Mazouz
94e92cf24e fix: approving a post does not bump user comment_count (#3790)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:13:57 +01:00
Sami Mazouz
aa33cfd1f8 fix(a11y): reply placeholder not accessible (#3793)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:13:32 +01:00
Sami Mazouz
4901c586ce chore: drop usage of jquery in install and update interfaces (#3797) 2023-04-16 21:12:47 +01:00
Sami Mazouz
7a6d477550 fix: notification subject discussion eager loading fails (#3788) 2023-04-16 21:12:01 +01:00
Sami Mazouz
b89a01c010 chore: extensibility improvements (#3729)
* chore: improve tags page extensibility
* chore: improve discussion list item extensibility
* chore: improve change password modal extensibility
* chore: item-listify tags page
* chore: item-listify change email modal
* chore: simplify data flow

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:05:23 +01:00
flarum-bot
8b11fef3ee Bundled output for commit 8a114cd826
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-16 11:48:33 +00:00
Sami Mazouz
8a114cd826 fix(regression): styling and semantics of header tag are incorrect
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 12:41:51 +01:00
flarum-bot
62c93b4a05 Bundled output for commit fab71f2d01
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-15 15:29:22 +00:00
Sami Mazouz
fab71f2d01 fix(package-manager): available core updates cause an error in the dashboard
Fixes #3776

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-15 16:21:45 +01:00
Sami Mazouz
e8c867dcac fix: circular dependencies disable all involved extensions (#3785) 2023-04-12 21:59:06 +01:00
flarum-bot
1247a7f1dd Bundled output for commit b0aad1a2d6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-10 20:09:56 +00:00
Rafał Całka
b0aad1a2d6 fix(tags): tag discussion modal filters with exact matches only after first index (#3786)
* feat: Update tag filtering to include partial matches

* fix: Case insensitive filtering
2023-04-10 21:01:18 +01:00
flarum-bot
bddc9d96f2 Bundled output for commit d684248492
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-23 08:10:20 +00:00
IanM
d684248492 fix: empty string displayed as SelectDropdown title (#3773)
* fix: empty string displayed as SelectDropdown title

* chore: remove import

* chore: ts-ignore

* Update framework/core/js/src/common/components/SelectDropdown.tsx

Co-authored-by: David Wheatley <david@davwheat.dev>

---------

Co-authored-by: David Wheatley <david@davwheat.dev>
2023-03-23 08:02:59 +00:00
Rafael Horvat
85b63681ae Fix: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous (#3772) 2023-03-21 10:32:23 +00:00
Sami Mazouz
8372363cc2 feat: conditional extenders (#3759) 2023-03-14 21:53:16 +01:00
Ngô Quốc Đạt
a6a067ad48 chore: update to PHP 8.2 in frontend workflow (#3755) 2023-03-12 13:58:06 +01:00
Sami Mazouz
241eba4d0c chore: mark start of 1.8.0 development
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-12 13:56:39 +01:00
Sami Mazouz
a6b12826c3 chore: 1.7.1 preparations
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-12 13:28:04 +01:00
Sami Mazouz
dd868ab44e fix: improve sessions user UI on mobile
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-12 13:21:21 +01:00
flarum-bot
5f3e0d6a09 Bundled output for commit 661b9d7d9a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-12 11:45:23 +00:00
Robert Korulczyk
661b9d7d9a chore: hide developer tokens section in if there is nothing to display or create (#3753) 2023-03-12 12:37:49 +01:00
flarum-bot
b7498d6cb1 Bundled output for commit e7c55532a0
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-12 09:46:12 +00:00
Robert Korulczyk
e7c55532a0 fix: hardcoded language strings in StatusWidget (#3754) 2023-03-12 10:37:57 +01:00
Robert Korulczyk
cce6b74fce fix: missing parameter names in token title translation. (#3752) 2023-03-12 10:33:19 +01:00
flarum-bot
da651c722b Bundled output for commit abc9670659
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-11 08:14:06 +00:00
Sami Mazouz
abc9670659 fix(tags): incorrect max and min primary tags used
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-11 09:05:12 +01:00
Sami Mazouz
b66fe5dd5f chore(release): preparations
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-09 19:00:32 +01:00
flarum-bot
7d79895ae0 Bundled output for commit 3ab4529232
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-09 15:35:22 +00:00
Sami Mazouz
3ab4529232 fix(qa): apply color contrast fix when colored only
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-09 16:28:32 +01:00
flarum-bot
360a2ba1d8 Bundled output for commit eaa4063fef
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-08 19:21:16 +00:00
Sami Mazouz
eaa4063fef fix(qa): attempt to fix akismet error
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-08 20:14:09 +01:00
flarum-bot
72d277bd45 Bundled output for commit 28e3ccfde6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-03-08 17:34:35 +00:00
Sami Mazouz
28e3ccfde6 fix(qa): increase YIQ and fix menu item title
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-08 18:25:04 +01:00
Sami Mazouz
3f864bafc8 fix(regression): custom less validation check
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-06 15:24:03 +01:00
Sami Mazouz
3af0481f30 test: remove use of deprecated phpunit assertion
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-06 15:03:33 +01:00
Sami Mazouz
1761660c98 fix: disallow certain dangerous LESS features
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-04 20:38:19 +01:00
Sami Mazouz
8ddb0feb09 chore: yarn audit-fix
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-01 12:35:59 +01:00
Sami Mazouz
fa30f4f250 fix(regression): cannot delete users (#3746)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-24 18:22:12 +01:00
Robert Korulczyk
79a9b23096 fix: normal logout affects all sessions (#3571)
Previously all user tokens were deleted, which logouts from all sessions.
2023-02-21 17:23:20 +01:00
Tristian Kelly
33e2bd1a77 fix(mentions): post reply mention missing notification on approval (#3738)
* Add PostWasApproved event

* Apply fixes from StyleCI

* fix: phpstan error

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-02-21 15:04:03 +00:00
flarum-bot
a3a39caa44 Bundled output for commit bbf873442a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-21 14:37:00 +00:00
Sami Mazouz
bbf873442a feat: global logout to clear all sessions, access tokens, email tokens and password tokens (#3605)
* chore: re-organize security locale keys alphabetically
* test: can globally logout
* feat: add global logout controller
* feat: add global logout UI to user security page
* test: re-adapt tests to changes
* feat: add boolean to indicate if logout even is global
* chore(review): split loading property
* chore: follow-up branch update

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-21 15:28:55 +01:00
David Wheatley
d35bb873a8 chore: make go-to-page input number-like (#3743) 2023-02-21 15:23:59 +01:00
flarum-bot
598ff21d7d Bundled output for commit 9342903d68
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-21 13:29:36 +00:00
Sami Mazouz
9342903d68 feat: access tokens user management UI (#3587)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: David <hi@davwheat.dev>
2023-02-21 14:14:53 +01:00
Robert Korulczyk
ea7b270f47 fix(tags): clickable tag labels have underline (#3737) 2023-02-21 14:09:37 +01:00
David Wheatley
906b0fb633 feat: add display name column to admin users list (#3740) 2023-02-21 13:04:53 +00:00
David Wheatley
408a92b4ea feat: improved page navigation for users list (#3741)
* feat: add first and last page buttons

* feat: add textbox-based page navigation

* feat: add query parameter page navigation
2023-02-21 13:04:30 +00:00
Robert Korulczyk
0da069ba9f Fix translation key for scheduler dashboard. (#3736) 2023-02-16 17:33:37 +01:00
flarum-bot
d8fa791d9c Bundled output for commit fee6ffe396
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-15 17:50:20 +00:00
Robert Korulczyk
fee6ffe396 feat(seo): Do not use h3 header for poster author in posts stream (#3732)
* Do not use h3 header for poster author in posts stream.

* Change back `.PostUser-name` tag to h3.
2023-02-15 18:44:58 +01:00
flarum-bot
7a60a529da Bundled output for commit 37fd218723
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-15 16:33:15 +00:00
Robert Korulczyk
37fd218723 feat(seo): Use h2 header for discussions on discussions list (#3731)
* Use H2 header for discussions on discussions list.

* Put `DiscussionListPane` in `aside` tag to indicate that its content should not be treated as part of discussion content.

* Update markup for views generated by PHP.
2023-02-15 17:26:43 +01:00
IanM
1ee5cf6ba9 feat(core): PHP 8.2 Support (#3709)
* chore: test with php 8.2
* chore: bump httphandlerunnder
* chore: bump httphandlerunner
* chore: address php8.2 deprecation
* chore: php 8.2
* chore: bump less.php version
* avoid dynamic properties
* avoid another dynamic property
* Apply fixes from StyleCI
* tags php82
* php82
* fix: check for property existence
* Rerun checks after s9e/text-formatter update
* chore: disable deprecation warnings for php 8.2
* chore: PHP8.2 does not accept dynamic properties
* chore: temporarily disable package manager tests workflow

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-14 19:09:56 +01:00
flarum-bot
ced1c2d94f Bundled output for commit f8d856028d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-13 20:20:57 +00:00
Sami Mazouz
f8d856028d fix(regression): admin header styling messed up
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-13 21:14:52 +01:00
Sami Mazouz
748cca6d12 chore: prepare @flarum/jest-config for release
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-12 17:45:00 +01:00
flarum-bot
f4f8369dc0 Bundled output for commit aa0b3288d5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-11 12:36:30 +00:00
Daniël Klabbers
aa0b3288d5 feat(seo): shift h1 tag from logo to discussion title (#3724)
* feat(seo): shift h1 tag from logo to discussion title

Many times have we seen opponents of using h2 as the discussion title. Although
my own SEO knowledge is limited, I have seen the importance of structuring pages
according to the content you wish to prioritize. If we only take that into consideration
there is zero reason for the app-wide identical logo to take precedence over any
other heading.

This change makes the logo a standard (visually identical) element, and
makes the discussion hero title a h1.

* feat(seo): rewrite remainder of hero titles and subtitles
2023-02-11 13:27:46 +01:00
Sami Mazouz
153bb1a53c feat(actions): allow running JS tests in GH actions (#3730)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-11 13:19:57 +01:00
Sami Mazouz
ee1e04cdc2 chore: yarn
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-10 23:20:14 +01:00
flarum-bot
77a0b11bc8 Bundled output for commit 7e6458a125
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-10 22:08:35 +00:00
Sami Mazouz
7e6458a125 feat(jest): mithril component testing (#3679)
* feat(jest): create jest config package for unit testing
* chore: housekeeping
* fix: now we need to explicitly allow importing without extension
* fix: recover EditorDriverInterface import
* feat(jest): mithril component testing
* fix: use separate `tsconfig.test.json`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-10 23:02:50 +01:00
flarum-bot
675cdab658 Bundled output for commit e7fc29a59f
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-08 21:09:22 +00:00
Sami Mazouz
e7fc29a59f feat(jest): create jest config package for unit testing (#3678)
* feat(jest): create jest config package for unit testing
* chore: housekeeping
* fix: now we need to explicitly allow importing without extension
* fix: recover EditorDriverInterface import
* Apply suggestions from code review
* chore: yarn

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-08 22:02:40 +01:00
flarum-bot
08dead81ce Bundled output for commit 47b670aa29
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-08 20:19:47 +00:00
Sami Mazouz
47b670aa29 feat: frontend Model extender (#3646)
* feat: reintroduce frontend extenders
* chore: used `Routes` extender in bundled extensions
* chore: used `PostTypes` extender in bundled extensions
* chore: `yarn format`
* feat: `Model` frontend extender
* chore: naming
* chore(review): attributes can be nullable or undefined
* chore(review): delay extender implementation
* chore(review): unnecessary check
* chore(review): stay consistent
* chore: merge conflicts
* chore: unused import
* chore: multiline extenders
* feat: add Store extender

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-08 21:13:53 +01:00
Nicolas Peugnet
f9a5d485c3 fix(phpstab): adapt phpstan package for extension use (#3727)
- fix "Stub file does not exist" error message as reported in
  <https://github.com/flarum/docs/pull/441#issuecomment-1419668760>
- fix "Ignored error pattern was not matched in reported errors" error
  messages as reported in
  <https://github.com/flarum/docs/pull/441#issuecomment-1420903036>
2023-02-08 10:43:41 +01:00
Darkle
5717a74fcc fix(css): choose tags button misaligned (#3726) 2023-02-05 19:15:15 +01:00
flarum-bot
2e0f026dde Bundled output for commit bf52743510
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-22 13:16:48 +00:00
Sami Mazouz
bf52743510 chore: improve group mentions parsing (#3723)
* chore: improve group mentions color handling
* Avoid storing the `GroupMention--dark` and light classes on the database.
* Avoid recreating YIQ logic on the backend.
* Improve text color flexibility through CSS variables.
* Apply fixes from StyleCI
* chore: tweak tests
* chre: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-22 14:11:13 +01:00
Sami Mazouz
da1bf8da21 chore(phpstan): enable phpstan in bundled extensions (#3667)
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* chore: enable phpstan in bundled extensions
* chore: rebasing conflicts
* chore: rebasing conflicts
* chore: typings for latest 1.7 changes

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-19 21:49:38 +01:00
flarum-bot
ccf9442d79 Bundled output for commit 4bb3b2235d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-17 20:01:25 +00:00
Owen Melbourne
4bb3b2235d The negate field doesn't get used, which means you cant exclude tags (#3713)
e.g. This allows you to

`/api/posts?sort=-createdAt&filter[tag]=14` to include tag 14 and `/api/posts?sort=-createdAt&filter[tag]=-14` to exclude tag 14
2023-01-17 20:47:28 +01:00
IanM
03d2d7eabb feat: expose {time} to eventPost data, fix renamed tooltip (#3698) 2023-01-17 20:47:02 +01:00
ornanovitch
4d292263b5 fix(tags): tag text color contrast (#3653)
* add yiq calculator util
* use the new contast util to differentiate light/dark tags
* fix: invert logic
* feat: add tag-dark and tag-light less config
* fix: convert 3 chars hex to 6 chars hex
* fix: rename import
* fix: clarify util name
* fix: rename function
* fix: invert less variables when dark mode is enabled
* fix: TagTiles contrast
* refactor: simplify logic with a unique variable
* refactor: simplify logic with a unique variable
* feat: add text color variables not depending on the dark/light mode
* refactor: use isDark rather than getContrast
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* fix: TagHero contrast
* fix: DiscussionHero contrast
* fix: newDiscussion contrast
* fix(newDiscussion): restore less rule when tag is not colored
* fix: TagTiles description
* fix: TagTiles last posted
* chore: change `var` to `let`
* refactor: keep it for backwards compatibility
* refactor: keep it for backwards compatibility
* Apply suggestions from code review
* fix: missed this when I was resolving
* fix: remove dist files from pull request
* Revert "Resolved merge conflict"
This reverts commit c7f0d14aa8, reversing
changes made to 6753dfc2af.
* fix: missed this when I was resolving
* fix
* Update isDark.ts
* chore: flexible contrast color fixing
* refactor(isDark): clarify the doc block
* fix(isDark): increase the yiq threshold
* typo
* fix: preserve design coloring through light and dark modes

Co-authored-by: David Wheatley <david@davwheat.dev>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-17 20:45:03 +01:00
flarum-bot
6adae00f72 Bundled output for commit d7f4975330
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-17 18:15:45 +00:00
Sami Mazouz
d7f4975330 feat: introduce frontend extenders (#3645)
* feat: reintroduce frontend extenders
* chore: used `Routes` extender in bundled extensions
* chore: used `PostTypes` extender in bundled extensions
* chore: `yarn format`
* chore: naming
* chore(review): unnecessary check
* chore(review): stay consistent
* chore: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-17 19:10:24 +01:00
Sami Mazouz
5fe3cfd837 feat(phpstan): foundation for usage in extensions (#3666)
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* Update framework/core/src/Extend/Model.php

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-15 15:25:13 +01:00
Sami Mazouz
2d2bf5c504 fix: permissions table on mobile is unusable (#3722) 2023-01-14 19:34:12 +01:00
Sami Mazouz
a4f4ee8e71 chore: Merge 1.6.3 into main 2023-01-13 19:57:31 +01:00
Sami Mazouz
4a38047bfb Merge branch 'main' into merge-1.6.3-into-main 2023-01-13 19:12:11 +01:00
flarum-bot
d5e6f6db5f Bundled output for commit 20e7d245da
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-13 08:37:32 +00:00
Tristian Kelly
20e7d245da feat: Admin User Search (#3712)
* Initial search
* oninput attempt
* Working search!
* forgot to format
* fix debounce, locale
* use core.ref
2023-01-13 09:31:22 +01:00
Sami Mazouz
243bc139b0 chore: changelog
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:22:17 +01:00
Sami Mazouz
adf78bbd95 chore(subscriptions): prepare
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:06:03 +01:00
StyleCI Bot
c8d9f1111e Apply fixes from StyleCI 2023-01-10 14:04:18 +00:00
Sami Mazouz
e5f05166a0 fix(subscriptions): post notifications not getting access checked
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:04:02 +01:00
Sami Mazouz
02556c6ca6 chore: prepare v1.6.3 release
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:38 +01:00
Sami Mazouz
666223fa8c test: make data providers public
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:38 +01:00
Sami Mazouz
12dfcc5c79 Merge pull request from GHSA-hph3-hv3c-7725
* test: add reply creation tests

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: access checking being bypassed for post creation when first post is deleted

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: recover tests

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: make provider public

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:38 +01:00
StyleCI Bot
248a71d9b5 Apply fixes from StyleCI 2023-01-10 15:00:37 +01:00
Sami Mazouz
a131e87911 Merge pull request from GHSA-8gcg-vwmw-rxj4
* fix: notifications grant access to private data of posts

* chore: fix tests

* test: start with tests about notification subject visibility

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: check subject access before sending notification to user

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Daniël Klabbers <daniel@klabbers.email>
2023-01-10 15:00:37 +01:00
StyleCI Bot
be63b28437 Apply fixes from StyleCI 2023-01-10 15:00:37 +01:00
Sami Mazouz
132fdea659 Merge pull request from GHSA-22m9-m3ww-53h3
* fix: check post visibility when mentioning

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `mentionsPosts` include is not used and leaks private posts

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chre: use `PostRepository`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:37 +01:00
dependabot[bot]
fe8480c8f7 chore(deps): bump json5 from 2.2.1 to 2.2.3 (#3717)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 16:54:29 +01:00
IanM
1e8a0f930d fix: load actor.groups (#3716) 2023-01-09 12:00:46 +01:00
Daniël Klabbers
d7b9a03f31 chore: fix php 8.1 on preg_match 2nd argument being null, which also optimizes slightly 2022-12-17 01:05:38 +01:00
flarum-bot
78189f29d2 Bundled output for commit 07f8b6161a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-12-12 10:18:58 +00:00
IanM
07f8b6161a fix: support 3digit hex color input (#3706) 2022-12-12 10:14:59 +00:00
flarum-bot
0eff1f6b2d Bundled output for commit a53a0db2b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-12-12 09:48:42 +00:00
Sami Mazouz
a53a0db2b7 feat(tags): admin tag selection component (reusable tag selection modal) (#3686)
* chore: move `KeyboardNavigation` to `common` first
* feat: exract reusable `TagSelectionModal` from `TagDiscussionModal`
* fix: improve for generic use
* feat: add select tags admin setting component
2022-12-12 10:44:33 +01:00
flarum-bot
a129999132 Bundled output for commit 8f80cde5b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-12-03 21:19:51 +00:00
Sami Mazouz
8f80cde5b7 feat: allow using utf8 characters in tag slugs (#3588)
* feat: allow using utf8 characters in slugs
url-encoded slugs are not read by the backend.
* chore: use as a slug driver
* chore: refactor tests to use data provider
* Apply fixes from StyleCI
* fix: wrong resource used
* fix: forgotten slug from slug manager in serializer
* chore(review): adapt tag slug suggestions on the UI
* chore: introduce modes for slugging
* chore: `yarn format`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-12-03 22:15:34 +01:00
flarum-bot
4de3cd4d9c Bundled output for commit 3dd2cadb9b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-30 16:46:54 +00:00
IanM
3dd2cadb9b fix: undefined showing in dropdown active title (#3700) 2022-11-30 16:39:32 +00:00
Rafael Horvat
605225c851 fix: column id can be ambiguous in group filter with extensions (#3696) 2022-11-27 10:44:06 +01:00
flarum-bot
f33fbdd0b5 Bundled output for commit 5bc47c0278
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-27 09:40:52 +00:00
Sami Mazouz
5bc47c0278 chore: convert Dropdown components to TS (#3608)
* chore: convert `Dropdown` components to TS
* chore(review): `buttonClassName` technically not required
* chore(review): `accessibleToggleLabel` technically not required
* chore(review): use `classList` where possible
* chore: `yarn format`
* Update framework/core/js/src/common/components/Dropdown.tsx
* chore(review): use `includes`
* chore(review): define constant of excluded groups
* chore(review): use `null coalesce` and `logical or` assignments
* chore(review): `null coalesce`
* chore(review): `any` to `typeof Component`
* chore(review): `classList`
* chore(review): `yarn format`
* chore: fix typing issues after typescript update

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-27 10:34:29 +01:00
flarum-bot
0e238a9c82 Bundled output for commit 64fa35f2f3
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-25 17:25:24 +00:00
Sami Mazouz
64fa35f2f3 chore: update JS dependencies (#3695)
* chore: lock mithril to `2.0` because `2.2` has breaking changes with no upgrade guide
* chore: update JS dependencies `yarn upgrade`
* chore: fix typings after js deps updates
* chore(review): better semver

Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-25 18:20:30 +01:00
flarum-bot
c99d04fce2 Bundled output for commit 67c0d75ebc
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-25 11:11:04 +00:00
IanM
67c0d75ebc feat: include current user as forum relation (#3668)
* feat: include current user as forum relation

* Update framework/core/src/Api/Controller/ShowForumController.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Api/Controller/ShowForumController.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Api/Serializer/ForumSerializer.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/forum/ShowTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/forum/ShowTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* No need to call the user endpoint as we already have the data loaded

* chore: return types

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-25 11:00:19 +00:00
IanM
6f4f964ce8 feat: allow push additional items to the end of the poststream (#3691)
* feat: allow push additional items to the end of the poststream

* Update framework/core/js/src/forum/components/PostStream.js

Co-authored-by: David Wheatley <hi@davwheat.dev>

* chore: prettier

* Update framework/core/js/src/forum/components/PostStream.js

Co-authored-by: David Wheatley <hi@davwheat.dev>

Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-25 10:59:23 +00:00
Ian Morland
67dd2c21b6 fix: provide web friendly session driver name (#3690) 2022-11-22 17:02:44 +00:00
flarum-bot
e5d2b8cad9 Bundled output for commit f5c346f1c7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-20 12:08:32 +00:00
Clark Winkelmann
f5c346f1c7 chore: Indicate cross-origin request in generic error message (#3669)
* Indicate cross-origin request in generic error message
* Run javascript format
* Move text to beginning of error message
* Update framework/core/locale/core.yml

Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-20 13:02:41 +01:00
flarum-bot
5bb0593bad Bundled output for commit 47d2053766
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-19 22:30:32 +00:00
Ian Morland
47d2053766 feat: expose queue driver, schedule status (#3593)
* feat: expose queue driver, schedule status

* Apply fixes from StyleCI

* docblock

* fix inheritdoc

* Add info link for scheduler setup

* Remove unsed import

* fix: phpstan error

* Only show scheduler status when jobs are registered

* Apply fixes from StyleCI

* add ItemList priorities

* Add translations

* Include schedule status in info console cmd

* Apply fixes from StyleCI

* Move identifyX logic into shared 'ApplicationInfoProvider'

* Apply fixes from StyleCI

* uniform data layout

* inject queue

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-11-19 22:23:04 +00:00
Sami Mazouz
e0b9dcfbcd Merge branch 'release/v1.6.2'
# Conflicts:
#	framework/core/js/dist/admin.js
#	framework/core/js/dist/admin.js.map
#	framework/core/js/dist/forum.js
#	framework/core/js/dist/forum.js.map
#	framework/core/src/Foundation/Application.php
2022-11-18 23:24:43 +01:00
Sami Mazouz
8a65ad980d chore: v1.6.2 changelog
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-18 22:38:41 +01:00
Sami Mazouz
9a0668effd chore: update version constant to v1.6.2
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-18 22:35:12 +01:00
Sami Mazouz
224b122303 chore: yarn build
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-18 22:34:29 +01:00
Sami Mazouz
ed0cee97f5 fix: evaluated page title content (#3684)
* fix: evaluated page title content
* chore: add comment
* chore: use DOMParser instead
* fix: use `innerHTML` for the actual value

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-18 22:32:24 +01:00
flarum-bot
543c5f2a2e Bundled output for commit 690de9ce0f
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-18 21:16:57 +00:00
Sami Mazouz
690de9ce0f fix: evaluated page title content (#3684)
* fix: evaluated page title content
* chore: add comment
* chore: use DOMParser instead
* fix: use `innerHTML` for the actual value

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-11-18 22:09:22 +01:00
Clark Winkelmann
50253a2eb8 fix: typo in Formatter extender docblock (#3676) 2022-11-17 15:47:09 +01:00
flarum-bot
92473c0967 Bundled output for commit 361234205c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-17 09:23:09 +00:00
Rafael Horvat
361234205c fix: add missing states exports to compat.ts (#3683) 2022-11-17 09:17:16 +00:00
flarum-bot
54798aaa47 Bundled output for commit fe5d543864
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-16 23:26:37 +00:00
David Wheatley
fe5d543864 fix: post dropdown opens all dropdowns in .Post-actions (#3675) 2022-11-16 23:21:57 +00:00
Ian Morland
2517bc0f70 chore: set flarum version to 1.7.0 for dev 2022-11-16 20:59:51 +00:00
Sami Mazouz
b5f324a7b3 chore: v1.6.1 changelog
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-16 12:29:36 +01:00
Sami Mazouz
8ef0df94b2 chore: update app version constant
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-16 12:27:40 +01:00
flarum-bot
c50c924242 Bundled output for commit 18bdd48835
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-16 10:30:13 +00:00
Sami Mazouz
18bdd48835 Merge remote-tracking branch 'origin/main' 2022-11-16 11:22:47 +01:00
Sami Mazouz
f49cf887dc revert: fix typing errors after dependencies update
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-16 11:17:20 +01:00
Sami Mazouz
19793d5617 chore: run yarn-audit-fix
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-16 10:54:04 +01:00
Sami Mazouz
4a2f48ad04 revert: before audit fix and JS dependency updates
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-16 10:50:35 +01:00
Daniël Klabbers
2b413b06c5 Revert "chore: try to fallback on npm as yarn seems to use wrong deps"
This reverts commit bb9f01372f.
2022-11-16 09:58:54 +01:00
Daniël Klabbers
2b89dedc08 Revert "chore: wrong package manager value changed to fix mentions bug"
This reverts commit bc59b8d9ab.
2022-11-16 09:58:41 +01:00
Daniël Klabbers
00a880c467 Revert "chore: lock needed for npm builds"
This reverts commit 92d2adc5fd.
2022-11-16 09:58:30 +01:00
Daniël Klabbers
92d2adc5fd chore: lock needed for npm builds 2022-11-16 09:51:50 +01:00
Daniël Klabbers
bc59b8d9ab chore: wrong package manager value changed to fix mentions bug 2022-11-16 09:41:52 +01:00
Daniël Klabbers
bb9f01372f chore: try to fallback on npm as yarn seems to use wrong deps 2022-11-16 09:26:08 +01:00
flarum-bot
069a29d22a Bundled output for commit 105170b5bc
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-16 07:26:43 +00:00
Daniël Klabbers
105170b5bc chore: recompile assets to fix mentions bug 2022-11-16 08:20:04 +01:00
flarum-bot
b8261ef055 Bundled output for commit d14770188b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-15 23:43:41 +00:00
Ian Morland
d14770188b chore: add fullstop to comment 2022-11-15 23:38:02 +00:00
Ian Morland
e9bb646dbf chore: newline 2022-11-15 23:25:35 +00:00
flarum-bot
46adf40675 Bundled output for commit 6938a13223
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-13 14:37:46 +00:00
Sami Mazouz
6938a13223 fix: typing errors after dependencies update
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-13 15:31:10 +01:00
flarum-bot
ab56aefeaa Bundled output for commit 259db92b9a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-10 23:30:18 +00:00
David Wheatley
259db92b9a fix: update JS dependencies 2022-11-10 23:23:44 +00:00
Daniël Klabbers
094ec77980 chore: js vulnerabilities through audit fix 2022-11-10 13:48:31 +01:00
Daniël Klabbers
bb712693d4 chore: update application constant for version 2022-11-10 13:48:17 +01:00
Daniël Klabbers
1e00e3fdbb chore: dependency on core updated for extensions 2022-11-10 13:48:00 +01:00
Daniël Klabbers
47d7a6e155 chore: changelog for v1.6.0 2022-11-10 13:47:23 +01:00
Daniël Klabbers
45d91212f6 fix: akismet fails when the extension is not on a version 2022-11-09 20:42:49 +01:00
flarum-bot
1a81c98d43 Bundled output for commit c98e6ba5a7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 15:55:28 +00:00
Ian Morland
c98e6ba5a7 fix: groupmentions have poor contrast on some backgrounds (#3672)
* fix: poor text contrast on some backgrounds
* use hexdec()
* fix render test
* appears to be working now
2022-11-07 16:49:47 +01:00
flarum-bot
eeb00cc56b Bundled output for commit 87cdb5b4d8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 15:14:44 +00:00
Ian Morland
87cdb5b4d8 feat: Allow additional reset password params, introduce ForgotPasswordValidator (#3671)
* feat: Allow additional reset password params, introduce 'ForgotPasswordValidator'

* Apply fixes from StyleCI

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-11-07 15:06:00 +00:00
flarum-bot
bc4b0b864c Bundled output for commit 53ab1503e4
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 13:53:51 +00:00
Ian Morland
53ab1503e4 feat: Allow additional login params, Introduce LogInValidator (#3670)
* Allow additional login params, dispatch 'LoggingIn' event

* Update framework/core/js/src/forum/components/LogInModal.tsx

Co-authored-by: David Wheatley <hi@davwheat.dev>

* Introduce 'LogInValidator'

* Apply fixes from StyleCI

Co-authored-by: David Wheatley <hi@davwheat.dev>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-11-07 13:47:04 +00:00
Sami Mazouz
62a396e434 feat: send notifications of a new reply when post is approved (#3656)
* test(subscriptions): approved reply sends out notifications to users

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: send notifications when a post is approved

The code in approval was extracted into a listener because no matter what listeners are always executed before subscribers even if the extension is set to load before.

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-07 11:52:28 +00:00
flarum-bot
2096fa2807 Bundled output for commit 06963df407
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 11:36:10 +00:00
Ian Morland
06963df407 chore: format js 2022-11-07 11:30:01 +00:00
flarum-bot
8fe09815f5 Bundled output for commit fccc3e2188
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 11:28:16 +00:00
ornanovitch
fccc3e2188 feat: contrast util with yiq calculator (#3652)
* add yiq calculator util

* fix: convert 3 chars hex to 6 chars hex

* fix: clarify util name

* feat: add text color variables not depending on the dark/light mode

* refactor: change getContrast to isDark with for a more direct approach

* fix: adjust snippet description

* chore: change `var` to `let`

Co-authored-by: David Wheatley <david@davwheat.dev>
2022-11-07 11:20:02 +00:00
Sami Mazouz
f0a867b20f chore: throw an exception when no serializer is provided to the controller (#3614)
* chore: throw an exception when no serializer is provided to the controller

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* test: no serializer set throws exception

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-06 18:56:07 +00:00
Sami Mazouz
69311ae689 feat: allow specifying extensions when installing an instance (#3655)
* feat: allow specifying extensions when installing an instance

Useful when doing migrations where more than the default extensions are required to migrate the data to flarum. This allows quickly spinning up a flarum database with the necessary schema.

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: consider dependency graph before running migrations

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-06 18:43:13 +00:00
Clark Winkelmann
f005b9e031 Fix tag discussion count decreased by 2 when hiding before deleting (#3660) 2022-11-06 18:27:32 +00:00
flarum-bot
31ced98e0d Bundled output for commit 9964ddd731
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-06 18:26:49 +00:00
David Wheatley
9964ddd731 [statistics] fix: add missing last period to custom date ranges (#3661)
* fix: last node in previous data matches first node of current data

* fix: add previous period support for custom periods

* test: update to show previous period for custom range
2022-11-06 18:21:28 +00:00
flarum-bot
32ac0a8d8f Bundled output for commit 827e905f8e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-05 19:34:25 +00:00
Ian Morland
827e905f8e [mentions] feat: group mentions (#3658)
* wip: group mentions

* Apply fixes from StyleCI

* chore: format

* group mention autocomplete

* chore: format

* remove console.log

* implement notifications

* prevent guest and member groups from being mentioned

* Update extensions/mentions/less/forum.less

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* rename displayname to groupname

* Update extensions/mentions/src/Formatter/FormatGroupMentions.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove redundant unparse

* simplify migrations

* add group deleted translation

* Apply fixes from StyleCI

* handle everything falsy

* Include icon in group mention preview

* remove box-shadow from autocomplete group results

* Add color to preview

* chore: format

* Remove box shadow from group autocomplete results

* Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove unneeded migration

* prevent former group icon from beingdisplayed

* add group searcher with permissions

* Apply fixes from StyleCI

* Search groups based on canSearchGroups permission

* Don't include virtual groups in results

* Add search groups translation

* Revert "remove unneeded migration"

This reverts commit 9347665baa.

* Revert "Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php"

This reverts commit 8406d51df2.

* add searchGroups permission to tests

* Apply fixes from StyleCI

* Add default searchGroups permission

* Apply fixes from StyleCI

* Update extensions/mentions/js/src/forum/addComposerAutocomplete.js

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove unneeded migration, correct table table

* correct table name in down migration

* Remove group searcher

* Apply fixes from StyleCI

* Remove group searching from composer autocomplete

* Add mentionGroups permission

* Apply fixes from StyleCI

* prevent post preview from rendering a group mention when user does not have permission

* remove test changes

* wip: expose ServerRequestInterface to textformatter parse()

* Apply fixes from StyleCI

* Set post content properly

* php 7.x compatibility

* begin adding groupmention tests

* Apply fixes from StyleCI

* test virtual groups don't mention

* Apply fixes from StyleCI

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/extend.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/extend.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* requested changes

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Search/SearchServiceProvider.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Extend/Formatter.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove default permission migration

* try using datetime column instead of timestamp

* Apply fixes from StyleCI

* chore: remove commented code

* add tests

* Apply fixes from StyleCI

* Pass actor to parser instead of ServerRequest

* Allow for  to be null

* Update framework/core/src/Extend/Formatter.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* pass actor instead of request

* Apply fixes from StyleCI

* actor instead of request

* remove serverrequest

* Apply fixes from StyleCI

* remove dupe actor

* Update extensions/mentions/src/Formatter/CheckPermissions.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* fix type in comment

* group does not have the relation, post does

* test: invalid, deleted, fresh data mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: group mentions don't work when editing posts

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-05 19:29:01 +00:00
Sami Mazouz
cdc76567d4 fix: larastan v1 incompatible with phpstan v1.9.0 (#3665)
We can't update to larastan v2 until we update to laravel v9 which has to wait for Flarum v2, so we need to stay on phpstan v1.8

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-03 11:55:52 +01:00
Clark Winkelmann
5898a50463 Log migration path when up/down keys are missing (#3664)
* Log migration path when up/down keys are missing
2022-11-02 15:22:21 +01:00
flarum-bot
72d9ee2010 Bundled output for commit 4e5e4e5c6e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-01 17:53:52 +00:00
David Wheatley
4e5e4e5c6e feat: add statistics chart export button (#3662) 2022-11-01 18:47:22 +01:00
flarum-bot
201d7430fe Bundled output for commit 52f6148876
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-10-18 14:44:18 +00:00
Sami Mazouz
52f6148876 chore: add priorities to profile settings page (#3657)
To give extensions more flexibility
2022-10-18 16:38:25 +02:00
Sami Mazouz
dc215aba59 chore(statistics): prepare v1.5.1
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-10-11 18:22:47 +01:00
flarum-bot
90a68506b8 Bundled output for commit bd0577f435
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-10-02 18:49:08 +00:00
Sami Mazouz
bd0577f435 fix: statistics previous period chart is unclear (#3654)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-10-02 19:43:47 +01:00
Ngô Quốc Đạt
d33f1abffc fix: apply flex for AppearancePage colors input (#3651) 2022-10-01 20:18:03 +02:00
Sami Mazouz
b0b47a0888 test: allow specifying php extensions in workflow
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-30 20:53:50 +01:00
flarum-bot
8c0a14aff2 Bundled output for commit 76788efaba
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-29 11:17:55 +00:00
David Wheatley
76788efaba feat(statistics): support for custom date ranges (#3622)
* feat: backend support for statistics custom date ranges
* feat: use seconds-based timestamps on backend instead
* feat: add frontend date selection option
* feat: add tests for lifetime and timed stats
* fix: add error alert when end date is after start date
* fix: wrong label
* fix: no data when start and end date are same day
* fix: use utc dayjs for formatting custom date range on widget
* chore: add dayjs as project dep
* fix: make end date inclusive
* feat: add integration test for custom date period
* fix: incorrect ts expect error comment
* fix: add missing type
* fix: typing errors
* fix(tests): remove type from class attribute definition
* fix: extract default values to function body
* fix: typo
* chore: use small modal
* fix: add missing `FormControl` class
* fix: cast url params to int to enforce type
* chore: `yarn format`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-29 13:12:54 +02:00
flarum-bot
973ec32e13 Bundled output for commit cf818aae9e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-23 18:59:15 +00:00
Ngô Quốc Đạt
cf818aae9e replace ColorPreviewInput for GroupModal color input (#3650) 2022-09-23 19:52:48 +01:00
flarum-bot
6da0bc63b7 Bundled output for commit 6e1bc2daed
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-23 13:18:01 +00:00
Ngô Quốc Đạt
6e1bc2daed fix: package manager failures not showing alerts (#3647)
* fix: close `LoadingModal` when install falied
* move error handler to catch
2022-09-23 14:11:36 +01:00
Rafael Horvat
7ce9d63ed6 feat(test): Make it possible to extend SetupScript (#3643)
* Make it possible to extend Flarum\Testing\integration\Setup\SetupScript and added public methods to add settings or extensions to in initial installation pipeline

* Fix syntax error, unexpected 'static'

* Remove `addExtensions` method and document `addSettings`
2022-09-23 13:44:17 +02:00
StyleCI Bot
267f6759f8 Apply fixes from StyleCI 2022-09-22 08:21:34 +00:00
Daniël Klabbers
b5874a08e4 fix(approval): posts approved for deleted users error
In certain edge cases posts get approved through moderative action and
throws an error when the user has already been deleted.

Ref: DISCUSS-11K on sentry
2022-09-22 10:20:06 +02:00
flarum-bot
368e08bb9b Bundled output for commit 5f2d7fb7b6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-17 11:36:06 +00:00
Sami Mazouz
5f2d7fb7b6 fix(regression): bad import
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-17 12:29:16 +01:00
flarum-bot
68d6e30143 Bundled output for commit c5c312db0d
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-17 11:07:16 +00:00
Sami Mazouz
c5c312db0d chore: yarn format
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-17 11:54:09 +01:00
flarum-bot
05f80b7b83 Bundled output for commit 31c3cfc4ea
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-16 10:02:55 +00:00
Sami Mazouz
31c3cfc4ea chore(package-manager): set min core version and add warning
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-16 10:54:39 +01:00
Sami Mazouz
fd196454a5 chore(package-manager): config composer to use web php version
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-15 11:07:08 +01:00
Sami Mazouz
f6761843b2 feat: customizable session driver (#3610) 2022-09-14 18:10:30 +01:00
Sami Mazouz
84c31165e5 fix: password reset leaks user existence (#3616) 2022-09-14 15:57:52 +01:00
Sami Mazouz
fc4d5e3d43 chore: Setup PHPStan Level 5 (#3553) 2022-09-14 15:23:56 +01:00
Daniël Klabbers
b2fa28e4b5 chore: remove styleci from changelog 2022-09-13 12:22:45 +02:00
Daniël Klabbers
fc743ba888 chore: set flarum version to dev for 1.6.0 2022-09-13 12:22:29 +02:00
Daniël Klabbers
a35df8c139 chore: v1.5.0 preparations 2022-09-13 10:55:30 +02:00
Sami Mazouz
8aec252452 fix(qa): simpler grid layout fix for overflow
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-08 20:52:33 +01:00
Sami Mazouz
32961d480c fix(qa): grid layout causes overflowing of content
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-08 20:33:32 +01:00
Alexander Skvortsov
27e3d322ec feat: increase margin between notifications list control icons (#3629)
* feat: increase margin between notifications list control icons

This feels cleaner, and reduces the chances of a misclick.

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-06 12:28:09 +02:00
Sami Mazouz
9eab1085da fix(regression): exiting long modal by clicking backdrop fails
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-05 15:32:14 +01:00
flarum-bot
c305f9a105 Bundled output for commit 3b773e2677
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-05 13:31:03 +00:00
Sami Mazouz
3b773e2677 chore: don't pass password field between auth modals (#3626)
* chore: don't pass password field between auth modals
* chore: reset password on failed attempts
* chore: `yarn format`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-05 13:44:11 +01:00
Daniël Klabbers
6e48a0303e Create CODEOWNERS
Start requiring an approval from the core team on PR's
2022-09-05 09:03:20 +02:00
Sami Mazouz
31f1ffd6a5 fix(regression): bad post actions alignment introduced in #3540 (#3619)
* chore: merge media queries
* chore: change discussion page skeleton to grid layout
* chore: use grid areas instead of order

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-03 13:30:44 +01:00
Sami Mazouz
9897f682a0 fix: explicitly select post columns (#3621)
additional columns can be explicitly added by extensions

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-09-03 12:33:38 +01:00
flarum-bot
f3156c65c9 Bundled output for commit 2719042c71
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-31 19:22:47 +00:00
Robert Korulczyk
2719042c71 feat: add custom class for email confirmation alert (#3584) 2022-08-31 21:13:25 +02:00
flarum-bot
ffd0b90a83 Bundled output for commit 87aaaf6971
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-31 09:20:08 +00:00
David Wheatley
87aaaf6971 feat(subscriptions): add option to send notifications when not caught up (#3503) 2022-08-31 11:13:51 +02:00
Sami Mazouz
6ffa9e3736 fix(mentions): accessing id of null user relation (#3618)
* test: editing a post with deleted author and mentions
* fix(mentions): accessing `id` of null `user` relation

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-26 10:38:00 +01:00
Sami Mazouz
434c459246 fix(tags): use default index sortmap (#3615)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-24 12:17:00 +01:00
Sami Mazouz
7f2f3e34f5 chore(statistics): add release notes for 1.4.2
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-22 11:24:29 +01:00
Sami Mazouz
f7dd609b26 feat: discussion UTF-8 slug driver (#3606)
* feat: add utf-8 slug driver
* test: add tests for slugging expectations
* fix: non-word characters aren't removed

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
2022-08-21 15:27:41 +01:00
flarum-bot
ec97ee41f9 Bundled output for commit 335c602cea
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-20 17:30:31 +00:00
Sami Mazouz
335c602cea chore(package-manager): last tweaks before beta tag
chore: fix workflow errors
chore: fix workflow errors
chore: avoid updating an extension that wasn't directly required
chore: prevent job overlap
chore: reorganize code, separate state from view
fix: update checking ui display
chore: minor improvements

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-20 18:21:02 +01:00
flarum-bot
082117d8bc Bundled output for commit 11a9b73610
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-17 13:02:21 +00:00
Hasan Özbey
11a9b73610 fix: use isCollapsed instead of rangeCount (#3581) 2022-08-17 13:56:03 +01:00
flarum-bot
974f003fe3 Bundled output for commit 352a50e3ad
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-16 17:36:57 +00:00
David Wheatley
352a50e3ad perf(statistics): split timed data into per-model XHR requests (#3601)
* chore: kill off timeset offset from statistics extension

* perf: split timed data into per-model requests
2022-08-16 18:30:24 +01:00
Ngô Quốc Đạt
5637fe8041 fix: $events property declared dynamically (#3598) 2022-08-16 17:50:29 +01:00
David Wheatley
3d167749cb fix(subscriptions): add missing table prefix for filter gambit (#3599) 2022-08-15 12:35:03 +02:00
David Wheatley
1a189f4923 fix: typo in error message 2022-08-14 17:16:52 +01:00
Sami Mazouz
6de8113720 test: prevent running both push and pull_request actions at the same time (#3597)
Not a 100% perfect solution, however as us maintainers always push branches directly to the original repository and make PRs from those, this is plenty enough. Instead of having 300+ actions in each PR which takes time, we'll just have the normal 171 `push` actions.

This makes sure to still run `pull_request` actions from contributors as they'd be forking the repo.

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-13 09:33:37 +01:00
Sami Mazouz
f74f7f58cd test: refactor prefix matrix and add MySQL 8.0 & PHP 7.3 to workflows (#3595)
* chore: simplify added prefix tests to matrix without using exclusions
* test: recover 7.3 testing
* test: add mysql 8.0 to matrix
* test: exclude some PHP versions from running with MySQL 8.0 to reduce actions

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-12 19:22:38 +01:00
flarum-bot
34b7686d8a Bundled output for commit 4eb2112282
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-11 20:46:35 +00:00
Ian Morland
4eb2112282 feat: Admin debug mode warning (#3590)
* feat: Admin debug mode warning

* prettier

* Wrap in Alert component

* feat: add `title` and `icon` attributes to the `Alert` component

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* Update framework/core/js/src/admin/components/DebugWarningWidget.js

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/locale/core.yml

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* prettier

* chore: convert to TS

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* Update framework/core/js/src/common/components/Alert.tsx

Co-authored-by: David Wheatley <hi@davwheat.dev>

* chore: add docs link

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-08-11 22:41:54 +02:00
Sami Mazouz
25122fd355 fix: user has wrong discussion read status (#3591)
* test: deleting last post(s) then posting new replies works as expected
* fix: user has wrong discussion read status
2022-08-09 22:43:38 +02:00
Daniël Klabbers
1d14ea6b45 fix(compilation): versioner not inject into compilers (#3589) 2022-08-09 12:12:36 +02:00
flarum-bot
eab5093012 Bundled output for commit 1948f25151
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 21:22:31 +00:00
Sami Mazouz
1948f25151 refactor: convert page components to TypeScript (#3538)
* fix(a11y): color preview fields have no aria label
* refactor: convert page components to TypeScript

Co-authored-by: David Wheatley <hi@davwheat.dev>
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-08 22:11:58 +01:00
flarum-bot
44825f1b94 Bundled output for commit d02bf0faa1
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 18:30:58 +00:00
Ian Morland
d02bf0faa1 feat: Delete all notifications (#3529)
* Add delete all notifications option
* chore: `DELETE /api/notifications` as per conventions
* test: can delete all notifications

Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-08 19:26:16 +01:00
flarum-bot
b28606b8ef Bundled output for commit 631b4c194c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 13:53:39 +00:00
Sami Mazouz
631b4c194c chore: unify JS actions into one (rewritten flarum/action-build) (#3573)
* chore: unify JS actions into one (rewritten `flarum/action-build)`
* chore: maintain backwards compatibility
* fix: wrong default format check script

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-08 14:48:43 +01:00
flarum-bot
b20961cc9d Bundled output for commit 495462183b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 13:04:48 +00:00
David Wheatley
495462183b chore: format code 2022-08-08 14:00:22 +01:00
flarum-bot
40fa7a2c9b Bundled output for commit f69210b6d1
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 12:35:51 +00:00
Jasper Vriends
f69210b6d1 feat(modals): support stacking modals, remove bootstrap modals dependency (#3456)
* Feature: Stackable modals

* Processed feedback

* fix: use position in modal stack rather than key for modal number

* fix: use correct base z-index

* chore: simplify `className` to `class`

* chore: add `key` attribute to ModalManager element

* fix: backdrop flashing as modals are stacked/unstacked

* chore: simplify modal close process

* docs: add TS overload to indicate deprecated modal opening syntax

Require explicit values for `attrs` and `stackModal` from Flarum 2.0, beginning deprecation from now.

* feat: use stackable modal for forgot password modal above sign in

* chore: explicitly check if modal is open before trying to focus trap

* fix(a11y): add missing  `aria-hidden` on main content when modal open

* fix(a11y): add missing `aria-modal` on modal

* chore: remove test code

* chore: remove dead CSS

* chore: remove overload

* fix: lock page scrolling when modal is open

* fix: strange scrolling behaviour

* chore: convert to JSX

* fix: event listener memory leak

* chore: remove unneeded optional chaining

* fix: incorrect return types

* chore: rewrite backdrop system - use one backdrop for all modals

* docs: typos in comment block

* fix: show backdrop directly below top-most modal

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: format

* fix: use an invisible backdrop for each modal to exit

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: remove debugging code

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: remove forgotten debug code

Co-authored-by: David Wheatley <david@davwheat.dev>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-08-08 13:29:14 +01:00
flarum-bot
bb5f7b87bc Bundled output for commit e2f568252b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-08 10:37:13 +00:00
Robert Korulczyk
e2f568252b perf: add loading="lazy" attribute for avatars (#3578)
Co-authored-by: David Wheatley <david@davwheat.dev>
2022-08-08 11:29:52 +01:00
flarum-bot
bca7d48d99 Bundled output for commit 3bdb0af993
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-05 19:27:47 +00:00
David Wheatley
3bdb0af993 fix: intellisense imports defaulting to absolute path from src folder (#3549)
* docs: remove baseUrl recommendation

Fixes https://github.com/flarum/flarum-tsconfig/issues/4

* chore: implement change within framework monorepo
2022-08-05 20:23:45 +01:00
flarum-bot
d345734a8e Bundled output for commit 4b25c2d425
Includes transpiled JS/TS.

[skip ci]
2022-08-05 18:28:35 +00:00
Sami Mazouz
4b25c2d425 test: relying on a third-party for avatar URL tests is unreliable (#3586) 2022-08-05 19:24:43 +01:00
flarum-bot
54e1966ec8 Bundled output for commit f073c22212
Includes transpiled JS/TS.

[skip ci]
2022-08-04 09:55:07 +00:00
Sami Mazouz
f073c22212 chore: remove debug line that slipped in while rebasing a PR (#3580)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-04 10:43:26 +01:00
flarum-bot
71731819fb Bundled output for commit b01b75e367
Includes transpiled JS/TS.

[skip ci]
2022-08-04 08:11:58 +00:00
Daniël Klabbers
b01b75e367 fix: return type hint static is php 8+ 2022-08-04 10:07:48 +02:00
flarum-bot
71b444b6f6 Bundled output for commit bb641144b6
Includes transpiled JS/TS.

[skip ci]
2022-08-02 11:36:01 +00:00
StyleCI Bot
bb641144b6 Apply fixes from StyleCI 2022-08-02 11:28:25 +00:00
Daniël Klabbers
590639f5f3 fix: remove deprecation warning for decoding null values 2022-08-02 13:28:03 +02:00
flarum-bot
b06be43988 Bundled output for commit 237076e5b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-02 10:31:17 +00:00
Ian Morland
237076e5b7 chore(approval, likes): use subscribers (#3577)
* chore: use subscribers

* Apply fixes from StyleCI

* Un-static

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-08-02 11:27:26 +01:00
flarum-bot
737783a8a8 Bundled output for commit 7d3147d4e1
Includes transpiled JS/TS.

[skip ci]
2022-08-02 10:10:01 +00:00
Ian Morland
7d3147d4e1 feat: add createTableIfNotExists migration helper (#3576) 2022-08-02 10:43:31 +01:00
David Wheatley
61c4421bd2 fix: sticky nav content displays below post stream (#3575) 2022-08-02 10:40:51 +01:00
flarum-bot
85d4fb6ce2 Bundled output for commit da855c654e
Includes transpiled JS/TS.

[skip ci]
2022-08-01 22:53:45 +00:00
Ian Morland
da855c654e feat: Restart the queue worker after cache clearing, ext enable/disable, save settings (#3565)
* Add queue restarter
* Update framework/core/src/Queue/QueueRestarter.php
2022-08-02 00:49:58 +02:00
flarum-bot
7147d39975 Bundled output for commit f4ace73a3c
Includes transpiled JS/TS.

[skip ci]
2022-08-01 11:03:26 +00:00
David Wheatley
f4ace73a3c chore(statistics): add release notes for 1.4.1 2022-08-01 11:59:57 +01:00
flarum-bot
0b299d0003 Bundled output for commit 70e483d1b1
Includes transpiled JS/TS.

[skip ci]
2022-07-30 22:16:30 +00:00
Daniël Klabbers
70e483d1b1 fix: prepare release workflow has invalid layout 2022-07-31 00:09:14 +02:00
Daniël Klabbers
628c281c39 fix: update workflow name 2022-07-31 00:02:34 +02:00
Daniël Klabbers
0901e59a58 feat: add new workflow for generating release meta 2022-07-31 00:00:50 +02:00
Daniël Klabbers
5530400b09 chore: getting the release workflow in 2022-07-30 23:33:55 +02:00
flarum-bot
e7af009fbc Bundled output for commit 2b31b185e4
Includes transpiled JS/TS.

[skip ci]
2022-07-30 12:05:59 +00:00
Sami Mazouz
2b31b185e4 feat: clear password & email tokens when appropriate (#3567)
* test: password tokens are generated and deleted on password change
* chore: delete all password tokens when the password is changed
* test: email tokens are generated and deleted on email change
* test: email tokens are deleted after password reset
* chore: delete email tokens after password change
* test: password tokens are deleted after email change
* chore: delete password tokens after email change
* chore: syntactic sugar
* chore: unify event listening
2022-07-30 13:02:06 +01:00
flarum-bot
f96f914576 Bundled output for commit f610f8aa67
Includes transpiled JS/TS.

[skip ci]
2022-07-30 06:22:07 +00:00
Sami Mazouz
f610f8aa67 feat: throttle email change, email confirmation, and password reset endpoints. (#3555)
* chore: move post throttler to separate class
* feat: throttle email change requests
* feat: throttle email activation requests
* feat: throttle password resets for logged-in users
* docs: comment new throttlers
2022-07-30 08:18:51 +02:00
flarum-bot
021793fc52 Bundled output for commit 9ab1680b17
Includes transpiled JS/TS.

[skip ci]
2022-07-29 12:54:55 +00:00
dependabot[bot]
9ab1680b17 chore(deps): bump terser from 5.12.0 to 5.14.2 (#3551)
Bumps [terser](https://github.com/terser/terser) from 5.12.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 13:48:04 +01:00
Soobin Rho
8dde6a27bf docs: link logo at the top with the official website (#3552)
When I was reading README.md, I clicked the logo and I expected to go to the official website https://flarum.org/ but it didn't. So, the image is being linked to the official website in this commit.

Signed-off-by: Soobin Rho <soobinrho@gmail.com>
2022-07-29 13:43:54 +01:00
Ian Morland
44f30ad51e Replace event helper with event dispatcher (#3570) 2022-07-28 21:09:42 +01:00
David Wheatley
6911e3a71d feat: expose assets base url to frontend forum model (#3566) 2022-07-28 19:37:10 +01:00
David Wheatley
cad6280a45 fix: potential static caching memory exhaustion (#3548)
* perf: get notification counts through relation, not model filtering

* chore: rename `queryUnreadNotifications` to `unreadNotifications`

* fix: null coalesce to 0 for notif read time
2022-07-28 19:14:32 +01:00
David Wheatley
7d67cfd1e7 fix: incorrect centring of deleted user avatars in notification list (#3569) 2022-07-28 17:15:29 +01:00
flarum-bot
e911b52b4c Bundled output for commit 2defb17cc2
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-26 12:53:14 +00:00
David Wheatley
2defb17cc2 feat: publish assets on admin dashboard cache clear (#3564)
Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-26 13:48:04 +01:00
flarum-bot
fe20e2c212 Bundled output for commit 795a500adb
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-24 13:06:41 +00:00
Sami Mazouz
795a500adb feat: Queue package manager commands (#3418)
* feat: Queue package manager commands
* adjust tests
* fix: force run whynot command synchronously
* chore: maximize command output box's height
* chore: more user instructions on background queue
* feat: track command peak memory usage
* feat: exit of CLI php version doesn't match web php version
* chore: install deps
* chore: format and typing workflow fix

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-24 14:02:13 +01:00
Daniël Klabbers
75aaef7d76 fix: MyISAM tables for extensions during installation 2022-07-23 23:53:14 +02:00
Daniël Klabbers
f128190f14 Revert "fix: MyISAM tables for extensions during installation"
This reverts commit f926c58e01.
2022-07-23 23:52:57 +02:00
Daniël Klabbers
f926c58e01 fix: MyISAM tables for extensions during installation 2022-07-23 23:42:34 +02:00
flarum-bot
e5a3598bf6 Bundled output for commit 7cafd9f51a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-21 10:54:05 +00:00
David Wheatley
7cafd9f51a fix: titles positioned wrongly with custom header height (#3550) 2022-07-21 11:47:37 +01:00
flarum-bot
e9fec9b22f Bundled output for commit 31a00eeb95
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-19 18:26:37 +00:00
Sami Mazouz
31a00eeb95 fix(regression): loading next discussion list pages fails (#3547)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-19 19:22:45 +01:00
flarum-bot
6b577e6f1f Bundled output for commit 64f0ae7c33
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-19 09:36:41 +00:00
Sami Mazouz
64f0ae7c33 chore: revert tsconfig changes for local development (#3545)
* chore: delete unwanted dist typings
* chore: revert 4e52f0e420

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-19 10:30:23 +01:00
flarum-bot
343fe0e317 Bundled output for commit 07b2f86dcc
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-18 23:14:26 +00:00
Daniël Klabbers
07b2f86dcc fix: minor backward compatible fix for php 8.1 in st_replace 2022-07-19 01:09:43 +02:00
flarum-bot
ffaea861e5 Bundled output for commit 46b3b7a952
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-18 18:21:14 +00:00
Sami Mazouz
46b3b7a952 chore: require guzzle 6 or 7
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-18 19:16:12 +01:00
flarum-bot
78544ce68d Bundled output for commit af3116bce9
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-18 18:12:03 +00:00
David Wheatley
af3116bce9 perf(statistics): rewrite for performance on very large communities (#3531)
Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-18 19:07:38 +01:00
flarum-bot
6dde236d77 Bundled output for commit d0998be8fa
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-18 15:20:01 +00:00
David Wheatley
d0998be8fa fix: html entities shown raw in page title (#3542) 2022-07-18 16:10:34 +01:00
Ian Morland
8dcfa6c474 fix: move guzzle composer requirement to core (#3544) 2022-07-18 16:10:04 +01:00
flarum-bot
744927215a Bundled output for commit 54c21459d6
Includes transpiled JS/TS.

[skip ci]
2022-07-18 14:47:05 +00:00
Ian Morland
54c21459d6 feat(likes): Option to prevent users liking their own posts (#3534)
* Option to prevent users liking their own posts
* test: user can only like own post if setting ON

Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-18 15:32:27 +01:00
flarum-bot
91f8bd34b1 Bundled output for commit 4e52f0e420
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-18 14:30:42 +00:00
Sami Mazouz
4e52f0e420 chore: monorepo local development improvements (#3523)
* chore: centralize editorconfig
* chore: tweak tsconfigs for local development
* revert src path change
* fix: akismet type checking requires flag ext `@types`
* fix: make tags route optional to avoid typescript typing error
2022-07-18 15:19:11 +01:00
Sami Mazouz
ac23d79fe7 fix: unread notifications are globally cached between users. (#3543)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-18 15:17:46 +01:00
David Wheatley
29179e27c6 feat: use position: sticky for discussion side nav (#3540) 2022-07-17 11:06:19 +01:00
flarum-bot
cd610a1cf2 Bundled output for commit 0c017c2aa0
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-15 22:33:28 +00:00
Sami Mazouz
0c017c2aa0 refactor: convert AlertManager IndexPage and UserPage components to TS (#3536)
* chore: convert `AlertManager` component to TypeScript
* chore: `compat.js` to `compat.ts`
* chore: convert `IndexPage` component to TypeScript
* chore: convert `UserPage` component and inheritors to TypeScript
* chore: `yarn format`
* chore: import types instead
2022-07-15 23:27:47 +01:00
David Wheatley
5721a2f487 fix: replace .fa() mixin usage with .fas() (#3537) 2022-07-15 23:16:49 +01:00
David Wheatley
b673d36f33 chore: split FA imports into separate Less file for easy overriding (#3535) 2022-07-15 09:42:02 +01:00
flarum-bot
bacb095382 Bundled output for commit 7471ef64d5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-14 15:02:48 +00:00
Sami Mazouz
7471ef64d5 refactor: convert Badge, Checkbox and Navigation components to TS (#3532)
* chore: convert badge components to TypeScript

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: convert checkbox components to TypeScript

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: convert `Navigation` component to TypeScript

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: import mithril type instead
2022-07-14 15:54:16 +01:00
flarum-bot
707ca2d16d Bundled output for commit 3246f5a8f6
Includes transpiled JS/TS.

[skip ci]
2022-07-14 13:48:19 +00:00
Ian Morland
3246f5a8f6 feat(likes): Add likes tab to user profile (#3528) 2022-07-14 14:38:31 +01:00
David Wheatley
bf6f63cfe1 feat: extender to add custom less variables (#3530) 2022-07-14 13:04:38 +01:00
flarum-bot
819602520a Bundled output for commit 16f59f514b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-14 11:39:02 +00:00
Ian Morland
16f59f514b fix: set translator locale to user preference for email notifications (#3525) 2022-07-14 12:02:55 +01:00
David Wheatley
759f7ef327 fix(a11y): present post streams as feeds, setting busy when loading new pages (#3522) 2022-07-14 12:02:20 +01:00
David Wheatley
9c825aaa2b fix(a11y): set aria-busy when editing a post stream item (#3521)
* fix(a11y): add `aria-busy="true"` to posts being edited

* fix(a11y): add `aria-busy="true"` to reply placeholder
2022-07-14 12:02:12 +01:00
David Wheatley
952a5891bb fix(a11y): add accessible labels to notification grid options (#3520) 2022-07-14 12:02:00 +01:00
flarum-bot
0daa24cf4b Bundled output for commit 33bf2284c7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-14 08:52:21 +00:00
Daniël Klabbers
33bf2284c7 fix: core settings header has no priority
Due to missing sort the category title sorts underneath the core settings nav items.
2022-07-14 10:44:39 +02:00
Sami Mazouz
d3e456a1bf chore: fix github issue templates
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-13 22:39:10 +01:00
Sami Mazouz
51472625ba choe: use github issue template forms (#3526)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-13 22:22:22 +01:00
flarum-bot
ec22162cf4 Bundled output for commit 1af506d4b8
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-07-13 20:47:43 +00:00
Sami Mazouz
1af506d4b8 refactor: convert core modals to TypeScript (#3515)
* refactor: convert core modals to TypeScript
* chore: excplicitly specify return type instead
* chore: `yarn format`

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-13 21:42:45 +01:00
Daniël Klabbers
d86440506d chore: update version constant during cycle 22 2022-07-13 20:01:01 +02:00
Daniël Klabbers
556d461cfb chore: update v1.4 constraints and update issues url 2022-07-12 23:30:03 +02:00
Daniël Klabbers
6cfebe381a chore: update version constant for the v1.4 release 2022-07-12 23:29:45 +02:00
Daniël Klabbers
8ab2827f4c chore: add changelog for v1.4 2022-07-12 23:27:03 +02:00
Sami Mazouz
024155a608 test(likes): like action behavior (#3512)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-11 10:42:21 +01:00
Sami Mazouz
4da21463c1 fix: multiple createdAt columns in query causes conflicts (#3506)
* test: list posts with mentions filter and `createdAt` sort
* fix: multiple `createdAt` columns in query causes conflicts
* chore: link to pull request for context

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-09 10:36:48 +01:00
Sami Mazouz
abc12b4ba5 chore: add .gitattributes to extensions to export-ignore files. (#3513)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 20:38:20 +01:00
Sami Mazouz
d8d4eae9f5 test(suspend): test that suspension works as expected (#3511)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 19:24:59 +01:00
Sami Mazouz
d82a73feed fix(approval): unapproved posts visible to all when no visibility scopers are added
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 19:16:53 +01:00
Sami Mazouz
ab6cee1a25 test(approval): unapproved content can only be seen by allowed users
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 19:16:53 +01:00
Sami Mazouz
2e840dc73d test(sticky): list discussions works as expected with stickies (#3507)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 19:07:03 +01:00
Sami Mazouz
ae9139bd73 chore(subscriptions): enable backend tests
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-07 23:35:29 +01:00
Daniël Klabbers
2e3d6dfa2c chore: upstream changes to dependencies 2022-07-05 21:19:01 +02:00
David Wheatley
7cd28710bc fix: composer title positioning incorrect with custom header height (#3502) 2022-07-04 14:28:44 +01:00
Clark Winkelmann
bc1d6f9e91 fix: assertAdmin sending wrong ability name to gate (#3501) 2022-07-04 14:18:18 +01:00
Sami Mazouz
bf4c543692 fix: restricted sibling tags appearing for unauthorized members on the sidebar (#3419)
* test: user should only be able to see related tags when allowed

* fix: restricted sibling tags appearing for unauthorized members on the sidebar

* fix: apply logic on tags with parents
2022-07-04 12:19:03 +01:00
David Sevilla Martin
709c5566bb fix: overflow notifications group header text with ellipses (#3500)
Fixes #3408
2022-07-04 12:16:59 +01:00
David Wheatley
9a62c32c28 fix: remove return type 2022-07-04 10:52:10 +01:00
flarum-bot
bbf90e42ff Bundled output for commit 0859bb13a5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-21 15:36:15 +00:00
Daniël Klabbers
0859bb13a5 feature: adds advanced link handling in core (#3455)
* feature: adds advanced link handling in core

This PR adds rel and target to textformatter so that these can be easily extended and rendered into the source.

Without using the Extender the default values `ngc nofollow` are provided as a backward compatible way.

The new extender allows conditional overrides, a proof of concept extension is available at https://github.com/luceos/flarum-ext-dofollow; I will probably migrate this into the Blomstra namespace soon.

* Apply fixes from StyleCI

* fix typehints

* fix: mixed typehint is php 8+

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-06-21 17:32:23 +02:00
flarum-bot
62be3e01be Bundled output for commit 613523c9b4
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-20 15:57:13 +00:00
Sami Mazouz
613523c9b4 fix(tags): tag selection modal shown when no tags can be selected (#3448) 2022-06-20 16:53:11 +01:00
flarum-bot
3e56bd3dc6 Bundled output for commit 293e8ab8b6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-20 12:06:42 +00:00
David Wheatley
293e8ab8b6 feat: support custom reusable setting components for buildSettingComponent (#3494) 2022-06-20 13:01:29 +01:00
David Wheatley
824fb2feff chore: enable and set up prettier for flarum/tags (#3496) 2022-06-20 13:00:01 +01:00
flarum-bot
4923253fbf Bundled output for commit 36c296d787
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-20 03:17:23 +00:00
David Wheatley
36c296d787 fix(a11y: DiscussionListItem): controls dropdown not visible when tabbed into (#3450) 2022-06-20 03:52:54 +01:00
David Wheatley
9fc2e5e2c0 fix(extension typings): remove some accessibility modifiers from Component (#3437) 2022-06-20 03:52:25 +01:00
David Wheatley
cb47a9c92e feat(translator): add locale getter (#3451) 2022-06-20 03:51:26 +01:00
Martin Hasoň
5dedec12f9 feat: return error code for failed CLI-based installs (#3452) 2022-06-20 03:50:38 +01:00
flarum-bot
5e81592e18 Bundled output for commit 74bcab866c
Includes transpiled JS/TS.

[skip ci]
2022-06-19 22:54:28 +00:00
Sami Mazouz
74bcab866c fix(suspend): suspension modal shows after suspension is over (#3449) 2022-06-19 23:51:29 +01:00
David Wheatley
1d949a3170 feat: split frontend asset generation into separate steps for more extensibility (#3446) 2022-06-19 22:58:05 +01:00
flarum-bot
79e0f44324 Bundled output for commit 976a03c9e5
Includes transpiled JS/TS.

[skip ci]
2022-06-19 21:30:47 +00:00
Sami Mazouz
976a03c9e5 fix: post mention notification errors with _no content_ subjects (#3493)
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-06-19 22:27:39 +01:00
SychO9
49ab6630d4 chore: run yarn-audit-fix 2022-06-19 20:16:55 +01:00
Sami Mazouz
27fb011bf5 chore: with yarn workspaces we only need a single yarn.lock (#3464)
* chore: yarn workspaces means we only need a single `yarn.lock`
* fix: add a `cache_dependency_path` workflow input
* fix: re-introduce `env.cache_dependency_path`
2022-06-19 19:01:21 +01:00
Sami Mazouz
6466427061 chore: move reusable workflows to monorepo (#3490) 2022-06-19 11:14:21 +01:00
flawedworld
818035f385 feat: split preloaded JSON payload and frontend boot into separate <script> tags (#3461) 2022-06-13 16:11:00 +01:00
flarum-bot
4748f31d93 Bundled output for commit e049e9d7ae
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-09 09:14:05 +00:00
Ian Morland
e049e9d7ae chore: add priorities to AdminNav (#3453) 2022-06-09 10:07:50 +01:00
Rafael Horvat
776f9bf132 feat: add automatic created/updated timestamps for various tables (#3435)
Adds timestamps for various tables:

- groups
- group_user
- group_permission
- tags
- discussion_tag
- post_mentions_post
- post_mentions_user
2022-06-07 20:35:27 +01:00
Daniël Klabbers
f882ff9bb5 update constant for 1.3.1 2022-06-07 14:34:51 +02:00
Daniël Klabbers
535052e3dc v1.3.1 release changelog 2022-06-07 10:53:23 +02:00
Sami Mazouz
c2ba3bb7d5 fix(subscriptions): reply notifications not working (#3445)
* chore: subscriptions backend test infrastructure

* test: reply notification

* fix: fix reply notifications not working
2022-06-03 21:06:30 +02:00
flarum-bot
b7332895db Bundled output for commit 0a3f449f9e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-02 12:44:15 +00:00
Sami Mazouz
0a3f449f9e fix: post mentions with deleted author not rendering (#3432) 2022-06-02 13:38:24 +01:00
naxvog
df1bdd2ad8 chore: point Font Awesome icons link to v5 (#3447)
Update Font Awesome link to represent to currently used major version in order to avoid confusion when choosing icons
2022-06-02 13:34:42 +01:00
flarum-bot
8e2a99c1eb Bundled output for commit e45547c649
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-06-02 01:47:22 +00:00
David Wheatley
e45547c649 docs: ItemList set methods throw errors when keys are not present 2022-06-02 02:43:15 +01:00
Sami Mazouz
29362ed924 fix: empty suspension message uses email template expecting one (#3433) 2022-05-26 18:52:19 +01:00
Sami Mazouz
eb4bac3b8f fix: settings extender working only with first instances (#3439)
* test: settings extender works not only with first extender instance
* fix: settings extender working only with first instances
2022-05-24 17:55:05 +01:00
flarum-bot
584884a3c9 Bundled output for commit 96ead2a4df
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-05-20 19:36:54 +00:00
Ian Morland
96ead2a4df Add priorities to UserCard (#3436) 2022-05-20 20:32:25 +01:00
flarum-bot
556f10ddd8 Bundled output for commit a79e2c20fe
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-05-20 19:06:33 +00:00
Sami Mazouz
a79e2c20fe fix: dropdown show results search button hidden while loading results (#3431) 2022-05-20 20:02:04 +01:00
Sami Mazouz
89b194034b fix: nickname regex validation not working (#3430)
* test: regex validation for nickname on registration
* fix: nickname regex validation not working
* test: regex validation works with valid inputs
2022-05-20 14:04:14 +01:00
flarum-bot
01c54b13c8 Bundled output for commit 24c8c65aa5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-05-19 23:53:18 +00:00
David Wheatley
24c8c65aa5 fix(typings): treat ColorPreview settings component type as specific string, not generic 2022-05-20 00:48:44 +01:00
David Wheatley
17de76f326 docs: add 1.2.1 to changelog and fix 1.3.0 diff link 2022-05-16 19:44:17 +01:00
Ngô Quốc Đạt
d3008d1e62 docs: correct links to documentation (#3426) 2022-05-16 18:49:59 +01:00
2772 changed files with 79093 additions and 113544 deletions

25
.bundlewatch.config.json Normal file
View File

@@ -0,0 +1,25 @@
{
"files": [
{
"path": "./framework/core/js/dist/*.js",
"maxSize": "150KB"
},
{
"path": "./framework/core/js/dist/*/**/*.js",
"maxSize": "30KB"
},
{
"path": "./extensions/*/js/dist/*.js",
"maxSize": "30KB"
},
{
"path": "./extensions/*/js/dist/*/**/*.js",
"maxSize": "30KB"
}
],
"defaultCompression": "gzip",
"ci": {
"repoBranchBase": "2.x",
"trackBranches": ["2.x"]
}
}

View File

@@ -17,3 +17,12 @@ trim_trailing_whitespace = false
[*.{php,xml,json}]
indent_size = 4
[{tsconfig.json,prettierrc.json}]
indent_size = 2
[*.neon]
indent_style = tab
[{install,update}.php]
indent_size = 2

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @flarum/core

View File

@@ -1,39 +0,0 @@
---
name: "🐛 Bug Report"
about: "If something isn't working as expected"
---
## Bug Report
**Current Behavior**
A clear and concise description of the behavior.
**Steps to Reproduce**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected Behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment**
- Flarum version: x.y.z
- Website URL: http://example.com
- Webserver: [e.g. apache, nginx]
- Hosting environment: [e.g. shared, vps]
- PHP version: x.y.z
- Browser: [e.g. chrome 67, safari 11]
```
Output of "php flarum info", run this in terminal in your Flarum directory.
```
**Possible Solution**
<!--- Only if you have suggestions or a fix for the bug -->
**Additional Context**
Add any other context about the problem here.

78
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,78 @@
name: "🐛 Bug Report"
description: If something isn't working as expected
labels: ["type/bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: current_behavior
attributes:
label: Current Behavior
description: A clear and concise description of the behavior.
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to Reproduce
description: The exact steps to reproduce the bug.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error message '....'
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: textarea
id: environment
attributes:
label: Environment
value: |
- Flarum version: x.y.z
- Website URL: http://example.com
- Webserver: [e.g. apache, nginx]
- Hosting environment: [e.g. shared, vps]
- PHP version: x.y.z
- Browser: [e.g. chrome 67, safari 11]
validations:
required: true
- type: textarea
id: php_flarum_info
attributes:
label: "Output of `php flarum info`"
value: |
```
Output of "php flarum info", run this in terminal in your Flarum directory.
```
validations:
required: false
- type: textarea
id: possible_solution
attributes:
label: Possible Solution
description: Only if you have suggestions or a fix for the bug.
validations:
required: false
- type: textarea
id: additional_context
attributes:
label: Additional Context
description: Add any other context about the problem here.
validations:
required: false

17
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: "🚀 Feature Request"
url: https://discuss.flarum.org/t/proposals
about: |
Thanks for taking the time to fill out this feature request!
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future.
For feature requests, ideas and feedback please post in the Flarum Community.
Feature requests are added to GitHub only when they have been accepted by the development team and implementation details have been laid out.
- name: "🙋‍ Support Question"
url: https://discuss.flarum.org/t/support
about: |
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future; for usage and support questions, please check out these resources below. Thanks!
* Flarum Community: https://discuss.flarum.org/
* Discord Chat: https://flarum.org/discord/
* Twitter: https://twitter.com/Flarum

View File

@@ -1,7 +0,0 @@
---
name: "🚀 Feature Request"
about: "If you have a suggestion please head over to our forum!"
---
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future. For feature requests, ideas and feedback please post in the Flarum Community: https://discuss.flarum.org/t/proposals. Feature requests are added to GitHub only when they have been accepted by the development team and implementation details have been laid out.

View File

@@ -1,11 +0,0 @@
---
name: "🙋‍ Support Question"
about: "If you have a question, please check out our forum or Discord!"
---
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future; for usage and support questions, please check out these resources below. Thanks!
* Flarum Community: https://discuss.flarum.org/
* Discord Chat: https://flarum.org/discord/
* Twitter: https://twitter.com/Flarum

280
.github/workflows/REUSABLE_backend.yml vendored Normal file
View File

@@ -0,0 +1,280 @@
name: Flarum Backend Jobs
on:
workflow_call:
inputs:
enable_backend_testing:
description: "Enable Backend Testing?"
type: boolean
default: true
required: false
enable_phpstan:
description: "Enable PHPStan Static Analysis?"
type: boolean
default: false
required: false
backend_directory:
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
type: string
required: false
default: '.'
# Only relevant in mono-repos.
monorepo_tests:
description: "The list of directories to test in a monorepo. This should be a space-separated list of directories relative to the backend directory."
type: string
required: false
php_versions:
description: Versions of PHP to test with. Should be array of strings encoded as JSON array
type: string
required: false
# Keep PHP versions synced with build-install-packages.yml
default: '["8.2", "8.3", "8.4"]'
php_extensions:
description: PHP extensions to install.
type: string
required: false
default: 'curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip'
db_versions:
description: Versions of databases to test with. Should be array of strings encoded as JSON array
type: string
required: false
default: '["mysql:5.7", "mysql:8.0.30", "mysql:8.1.0", "mariadb", "sqlite:3", "postgres:10"]'
php_ini_values:
description: PHP ini values
type: string
required: false
default: error_reporting=E_ALL
runner_type:
description: The type of runner to use for the jobs. This should be one of the types supported by the `runs-on` keyword.
type: string
required: false
default: 'ubuntu-latest'
secrets:
composer_auth:
description: The Composer auth tokens to use for private packages.
required: false
env:
COMPOSER_ROOT_VERSION: dev-main
# `inputs.composer_directory` defaults to `inputs.backend_directory`
FLARUM_TEST_TMP_DIR_LOCAL: tests/integration/tmp
COMPOSER_AUTH: ${{ secrets.composer_auth }}
DB_DATABASE: flarum_test
DB_USERNAME: flarum
DB_PASSWORD: password
jobs:
test:
runs-on: ${{ inputs.runner_type }}
strategy:
matrix:
php: ${{ fromJSON(inputs.php_versions) }}
service: ${{ fromJSON(inputs.db_versions) }}
prefix: ['']
php_ini_values: [inputs.php_ini_values]
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
include:
# Expands the matrix by naming DBs.
- service: 'mysql:5.7'
db: MySQL 5.7
driver: mysql
- service: 'mysql:8.0.30'
db: MySQL 8.0
driver: mysql
- service: mariadb
db: MariaDB
driver: mariadb
- service: 'mysql:8.1.0'
db: MySQL 8.1
driver: mysql
- service: 'sqlite:3'
db: SQLite
driver: sqlite
- service: 'postgres:10'
db: PostgreSQL 10
driver: pgsql
# Include Database prefix tests with only one PHP version.
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'mysql:5.7'
db: MySQL 5.7
driver: mysql
prefix: flarum_
prefixStr: (prefix)
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: mariadb
db: MariaDB
driver: mariadb
prefix: flarum_
prefixStr: (prefix)
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'sqlite:3'
db: SQLite
driver: sqlite
prefix: flarum_
prefixStr: (prefix)
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'postgres:10'
db: PostgreSQL 10
driver: pgsql
prefix: flarum_
prefixStr: (prefix)
# To reduce number of actions, we exclude some PHP versions from running with some DB versions.
exclude:
- php: ${{ fromJSON(inputs.php_versions)[1] }}
service: 'mysql:8.0.30'
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: mariadb
- php: ${{ fromJSON(inputs.php_versions)[1] }}
service: mariadb
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'mysql:8.1.0'
- php: ${{ fromJSON(inputs.php_versions)[1] }}
service: 'mysql:8.1.0'
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'sqlite:3'
- php: ${{ fromJSON(inputs.php_versions)[1] }}
service: 'sqlite:3'
- php: ${{ fromJSON(inputs.php_versions)[0] }}
service: 'postgres:10'
- php: ${{ fromJSON(inputs.php_versions)[1] }}
service: 'postgres:10'
services:
mysql:
image: ${{ matrix.driver == 'mysql' && matrix.service || '' }}
env:
MYSQL_DATABASE: ${{ env.DB_DATABASE }}
MYSQL_USER: ${{ env.DB_USERNAME }}
MYSQL_PASSWORD: ${{ env.DB_PASSWORD }}
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10
mariadb:
image: ${{ matrix.driver == 'mariadb' && matrix.service || '' }}
env:
MARIADB_DATABASE: ${{ env.DB_DATABASE }}
MARIADB_USER: ${{ env.DB_USERNAME }}
MARIADB_PASSWORD: ${{ env.DB_PASSWORD }}
MARIADB_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: ${{ matrix.driver == 'pgsql' && matrix.service || '' }}
env:
POSTGRES_DB: ${{ env.DB_DATABASE }}
POSTGRES_USER: ${{ env.DB_USERNAME }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
ports:
- 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
if: >-
inputs.enable_backend_testing &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: ${{ inputs.php_extensions }}
tools: phpunit, composer:v2
ini-values: ${{ matrix.php_ini_values }}
- name: Install Composer dependencies
run: composer install
working-directory: ${{ inputs.backend_directory }}
# If we have a `inputs.monorepo_tests`, we will run tests for each item of the provided array in a ::group::item
# If we don't have a `inputs.monorepo_tests`, we will run tests for the current repository
# We also have to run the `composer test:setup` script first before running each test
- name: Run tests
run: |
if [ -z "${{ inputs.monorepo_tests }}" ]; then
composer test:setup
composer test
else
for test in ${{ inputs.monorepo_tests }}; do
echo "::group::Running tests for $test"
composer test:setup --working-dir=$test
composer test --working-dir=$test
echo "::endgroup::"
done
fi
working-directory: ${{ inputs.backend_directory }}
env:
DB_HOST: 127.0.0.1
DB_PORT: ${{ (matrix.driver == 'mysql' && job.services.mysql.ports['3306']) || (matrix.driver == 'mariadb' && job.services.mariadb.ports['3306']) || (matrix.driver == 'pgsql' && job.services.postgres.ports['5432']) }}
DB_PREFIX: ${{ matrix.prefix }}
DB_DRIVER: ${{ matrix.driver }}
COMPOSER_PROCESS_TIMEOUT: 600
phpstan:
runs-on: ${{ inputs.runner_type }}
strategy:
matrix:
php: ${{ fromJson(inputs.php_versions) }}
name: 'PHPStan PHP ${{ matrix.php }}'
if: >-
inputs.enable_phpstan &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
steps:
- uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: ${{ inputs.php_extensions }}
tools: phpunit, composer:v2
ini-values: ${{ matrix.php_ini_values }}
- name: Install Composer dependencies
run: composer install
working-directory: ${{ inputs.backend_directory }}
- name: Create MySQL Database
run: |
sudo systemctl start mysql
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 3306
- name: Run PHPStan
run: composer analyse:phpstan
env:
DB_USERNAME: root
DB_PORT: 3306
DB_PASSWORD: root
COMPOSER_PROCESS_TIMEOUT: 600
FLARUM_TEST_TMP_DIR_LOCAL: ./tmp

166
.github/workflows/REUSABLE_frontend.yml vendored Normal file
View File

@@ -0,0 +1,166 @@
name: Flarum Frontend Jobs
on:
workflow_call:
inputs:
build_script:
description: "Script to run for production build. Empty value to disable."
type: string
required: false
default: build
build_typings_script:
description: "Script to run for typings build. Empty value to disable."
type: string
required: false
default: build-typings
format_script:
description: "Script to run for code formatting. Empty value to disable."
type: string
required: false
default: format-check
check_typings_script:
description: "Script to run for tyiping check. Empty value to disable."
type: string
required: false
default: check-typings
type_coverage_script:
description: "Script to run for type coverage. Empty value to disable."
type: string
required: false
default: check-typings-coverage
test_script:
description: "Script to run for tests. Empty value to disable."
type: string
required: false
default: test
enable_bundlewatch:
description: "Enable Bundlewatch?"
type: boolean
default: false
required: false
enable_prettier:
description: "Enable Prettier?"
type: boolean
default: true
required: false
enable_typescript:
description: "Enable TypeScript?"
type: boolean
default: true
required: false
enable_tests:
description: "Enable Tests?"
type: boolean
default: false
required: false
backend_directory:
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
type: string
required: false
default: '.'
frontend_directory:
description: The directory of the project where frontend code is located. This should contain a `package.json` file.
type: string
required: false
default: './js'
main_git_branch:
description: The main git branch to use for the workflow.
type: string
required: false
default: main
node_version:
description: The node version to use for the workflow.
type: number
required: false
default: 20
js_package_manager:
description: "Enable TypeScript?"
type: string
default: yarn
required: false
cache_dependency_path:
description: "The path to the cache dependency file."
type: string
required: false
runner_type:
description: The type of runner to use for the jobs. This should be one of the types supported by the `runs-on` keyword.
type: string
required: false
default: 'ubuntu-latest'
secrets:
bundlewatch_github_token:
description: The GitHub token to use for Bundlewatch.
required: false
composer_auth:
description: The Composer auth tokens to use for private packages.
required: false
env:
COMPOSER_ROOT_VERSION: dev-main
ci_script: ${{ inputs.js_package_manager == 'yarn' && 'yarn install --immutable' || 'npm ci' }}
cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
COMPOSER_AUTH: ${{ secrets.composer_auth }}
DISABLE_V8_COMPILE_CACHE: 1
jobs:
build:
name: Checks & Build
runs-on: ${{ inputs.runner_type }}
if: >-
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
cache: ${{ inputs.js_package_manager }}
cache-dependency-path: ${{ env.cache_dependency_path }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
tools: composer:v2
# Needed since tsconfig draws typings from vendor folder.
- name: Install Composer dependencies
run: composer install
working-directory: ${{ inputs.backend_directory }}
- name: Install JS dependencies
run: ${{ env.ci_script }}
working-directory: ${{ inputs.frontend_directory }}
- name: JS Checks & Production Build
uses: flarum/action-build@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: ${{ inputs.build_script }}
build_typings_script: ${{ inputs.build_typings_script }}
format_script: ${{ inputs.enable_prettier == true && inputs.format_script || '' }}
check_typings_script: ${{ inputs.enable_typescript == true && inputs.check_typings_script || '' }}
type_coverage_script: ${{ inputs.enable_typescript == true && inputs.type_coverage_script || '' }}
test_script: ${{ inputs.enable_tests == true && inputs.test_script || '' }}
package_manager: ${{ inputs.js_package_manager }}
js_path: ${{ inputs.frontend_directory }}
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
- name: Check bundle size change
if: ${{ inputs.enable_bundlewatch }}
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
working-directory: ${{ inputs.frontend_directory }}
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.bundlewatch_github_token }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_BRANCH_BASE: ${{ github.event.pull_request.base.ref }}

11
.github/workflows/backend.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: Backend Tests
on: [workflow_dispatch, push, pull_request]
jobs:
run:
uses: ./.github/workflows/REUSABLE_backend.yml
with:
enable_backend_testing: true
backend_directory: .
monorepo_tests: "framework/core extensions/akismet extensions/approval extensions/flags extensions/likes extensions/mentions extensions/nicknames extensions/statistics extensions/sticky extensions/subscriptions extensions/suspend extensions/tags extensions/messages php-packages/testing/tests"

View File

@@ -0,0 +1,29 @@
name: Build Install Packages
on:
release:
types: [released]
env:
VERSION: ${{ github.event.release.tag_name }}
PHP_VERSIONS: '8.2 8.3 8.4'
INSTALL_PACKAGES_INPUTS: '{ "flarum_version": "{0}", "php_versions": "{1}" }'
jobs:
delay:
name: Wait for packagist to publish new packages
runs-on: ubuntu-latest
steps:
- run: sleep 30m
build:
name: Build Installation Packages
runs-on: ubuntu-latest
steps:
- name: Trigger build in flarum/installation-packages
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build Flarum Install Packages
repo: flarum/installation-packages
token: ${{ secrets.PACKAGES_BUILD_TOKEN }}
inputs: ${{ format(env.INSTALL_PACKAGES_INPUTS, env.VERSION, env.PHP_VERSIONS) }}

View File

@@ -1,15 +0,0 @@
name: Akismet PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/akismet

View File

@@ -1,23 +0,0 @@
name: Akismet JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true
frontend_directory: ./extensions/akismet/js
backend_directory: ./extensions/akismet
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Approval PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/approval

View File

@@ -1,23 +0,0 @@
name: Approval JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/approval/js
backend_directory: ./extensions/approval
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Core PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./framework/core

View File

@@ -1,23 +0,0 @@
name: Core JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: true
enable_prettier: true
enable_typescript: true
frontend_directory: ./framework/core/js
backend_directory: ./framework/core
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Embed PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/embed

View File

@@ -1,23 +0,0 @@
name: Embed JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/embed/js
backend_directory: ./extensions/embed
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Emoji PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/emoji

View File

@@ -1,23 +0,0 @@
name: Emoji JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/emoji/js
backend_directory: ./extensions/emoji
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Flags PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/flags

View File

@@ -1,23 +0,0 @@
name: Flags JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true
frontend_directory: ./extensions/flags/js
backend_directory: ./extensions/flags
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Likes PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/likes

View File

@@ -1,23 +0,0 @@
name: Likes JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/likes/js
backend_directory: ./extensions/likes
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Lock PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/lock

View File

@@ -1,23 +0,0 @@
name: Lock JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/lock/js
backend_directory: ./extensions/lock
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Markdown PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/markdown

View File

@@ -1,23 +0,0 @@
name: Markdown JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/markdown/js
backend_directory: ./extensions/markdown
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Mentions PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/mentions

View File

@@ -1,23 +0,0 @@
name: Mentions JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/mentions/js
backend_directory: ./extensions/mentions
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Nicknames PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/nicknames

View File

@@ -1,23 +0,0 @@
name: Nicknames JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/nicknames/js
backend_directory: ./extensions/nicknames
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Package Manager PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/package-manager

View File

@@ -1,23 +0,0 @@
name: Package Manager JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true
frontend_directory: ./extensions/package-manager/js
backend_directory: ./extensions/package-manager
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Pusher PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/pusher

View File

@@ -1,23 +0,0 @@
name: Pusher JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true
frontend_directory: ./extensions/pusher/js
backend_directory: ./extensions/pusher
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Statistics PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/statistics

View File

@@ -1,23 +0,0 @@
name: Statistics JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true
frontend_directory: ./extensions/statistics/js
backend_directory: ./extensions/statistics
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Sticky PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/sticky

View File

@@ -1,23 +0,0 @@
name: Sticky JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/sticky/js
backend_directory: ./extensions/sticky
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Subscriptions PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/subscriptions

View File

@@ -1,23 +0,0 @@
name: Subscriptions JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/subscriptions/js
backend_directory: ./extensions/subscriptions
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Suspend PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
backend_directory: ./extensions/suspend

View File

@@ -1,23 +0,0 @@
name: Suspend JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
frontend_directory: ./extensions/suspend/js
backend_directory: ./extensions/suspend
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

View File

@@ -1,15 +0,0 @@
name: Tags PHP
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
backend_directory: ./extensions/tags

View File

@@ -1,22 +0,0 @@
name: Tags JS
on: [workflow_dispatch, push, pull_request]
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
# This will break your current script.
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
jobs:
run:
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: false
enable_typescript: true
frontend_directory: ./extensions/tags/js
backend_directory: ./extensions/tags
js_package_manager: yarn
main_git_branch: main
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

18
.github/workflows/frontend.yml vendored Executable file
View File

@@ -0,0 +1,18 @@
name: Frontend Workflow
on: [workflow_dispatch, push, pull_request]
jobs:
run:
uses: ./.github/workflows/REUSABLE_frontend.yml
with:
frontend_directory: ./
backend_directory: ./
js_package_manager: yarn
cache_dependency_path: ./yarn.lock
main_git_branch: 2.x
enable_tests: true
enable_bundlewatch: true
secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

11
.github/workflows/phpstan.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: Static Code Analysis
on: [workflow_dispatch, push, pull_request]
jobs:
run:
uses: ./.github/workflows/REUSABLE_backend.yml
with:
enable_backend_testing: false
enable_phpstan: true
backend_directory: .

26
.github/workflows/prepare-release.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Prepare Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
type: string
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare release
uses: flarum/action-release@master
with:
next_tag: ${{ inputs.version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
open_collective_token: ${{ secrets.OPEN_COLLECTIVE_TOKEN }}

View File

@@ -1,8 +1,421 @@
# Changelog
## [1.3.0](https://github.com/flarum/framework/compare/v1.2.0...v1.3.0)
## [v2.0.0-beta.1](https://github.com/flarum/framework/compare/v1.8.9...v2.0.0-beta.1)
### Changed
- php 8.4 [#4103]
- JSON:API refactor [#3971]
- (mentions) allow renderer to be used without context [#3954]
- (flags) add pagination to flags list [#3931]
- (mentions) add integration test for reply approval notification [#3748]
- (mentions,emoji) tie autocomplete to editor instance [#3913]
- (phpstan) upgrade to be compatible with latest dependency updates [#3835]
- (tags) prevent loading tag state if loaded previously [#4009]
- (testing) run flarum/testing packages tests back again [#3844]
- Do not catch exceptions when testing Console commands [#3813]
- Patch vulnerability advisory [#3966]
- Search box improvements on tablet devices [#4076]
- Test using MySQL 8.1 [#3870]
- Upgrade dependencies [#3830], [#4012]
- Upgrade `intervention/image` to 3.2 [#3947]
- Upgrade Wikimedia/less.php to 4.1 [#3837]
- Upgrade Mithril to 2.2 [#3831]
- (tags) Wrong tag input width if contains CJK characters [#4127]
- allow custom actions runner to be defined [#3988]
- avoid using `.fa()` mixins and `@fa-var` vars [#3912]
- cleanup composer deps (40dcaf882cd017463ca792762d4aa11de8c5c7da)
- corrected typos in routes comments [#3840]
- extract `FormModal` from `Modal` [#3922]
- extract `buildSettingComponent` method into a `FormGroup` component [#3927]
- fix typos [#4021]
- function names (d15438846895a5cf7b5a584479ef63a6e3119925)
- handle deprecations from 1.x [#3909]
- ignore deprecation errors in prod [#4072]
- improve debugging experience [#3944]
- improve test suite [#3814]
- increase phpstan level to 6 [#3836]
- `HeaderPrimary.js` converted to typescript [#4052]
- merge the app with the container & implement the ApplicationContract [#3862]
- recover bundlewatch [#3829]
- remove ExtenderInterface[] as a conditional option, only support callable or ::class invoke [#3904]
- remove listing of posts in the show discussion endpoint [#4067]
- remove unused vars in catch [#3839]
- simplify if else conditions [#3843]
- simplify variable assignment using null coalescing operator [#4000]
- support composer auth in workflows [#3961]
- switch formatter to `format-message` [#4088]
- transpile js to es6 [#3699]
- unify frontend initializers naming [#4003]
- update FontAwesome v6 icon search link [#4036]
- use `::class` syntax to fetch class name instead of `get_class()` function [#3910]
- use `hex_color` rule for color validation [#3936]
- use `str_contains` instead of `strpos` [#3841]
- graceful failure from extend/override errors [#4134]
### Fixed
- (a11y) convert empty links to buttons [#3926]
- (approval) `PostWasApproved` event triggered incorrectly [#3930]
- (em) prevent use if missing php functions (94b0d67a4020e1b7027e0df53dee1d681dc822e1)
- (em) production ready check (f6e84a0dc576d1cfe8539b7438244edf156e3b1a)
- (testing) use cookie for testing authentication [#3924]
- 3 char hex color is incorrectly modified to 6 [#4013]
- Add conditional rendering for email status in MailPage.tsx [#3997]
- Logout controller allows open redirects [#3948], [#4091]
- allow use of an attribute named `relationships` (1ead69e9b66ae9bc335be663498b7ea706adbf73)
- cannot install without db prefix [#4001]
- change length of email field [#4118]
- color input changes while typing [#3919]
- console extender does not accept `::class` attribute for schedule [#3903]
- default labels with `SettingDropdown` and `SelectDropdown` [#3854]
- duplicated `mentionsUsers` in extend.php (2b56129d70d18686a73d044ff65b418eef83f388)
- handled API errors break preloaded content [#3920]
- improve the flarum validator [#4133]
- installation command config path can be null (07623afacde590c45a20537add3b72a919050819)
- larastan changed namespace [#3955]
- larastan changes frequently (af2a32a3a4f50874c63785f5168e1df60f947553)
- load event mentioned tags on show discussion endpoint [#3915]
- move `UserSearchResult` to common (35f76bce60361caac8001c41c421de30f567b221)
- notify for all posts switch field loading state [#3938]
- only set actor on events that have it [#3914]
- overflowing forum stats [#3940]
- paginated list limit hard to change [#3918]
- prevent wiping out existing database on install [#4092]
- reset save button state when an error occurs in admin page [#4010]
- usage of `aria-hidden=false` might cause inconsistent behavior [#4074]
- use dynamic viewport units for height of Modals [#3951]
- user pages history not registered [#3916]
- validate required cli install args [#4093]
- make `WelcomeHero` extensible [#3848]
- Update the scheduler info link in admin (#3826)
### Added
- Export Registry [#3842]
- Code Splitting [#3860]
- Fontawesome v6 [#4020]
- extension bisect [#3980]
- extension list UI [#4066]
- admin search UI [#4022]
- add support for `PgSQL` [#3985]
- add support for `SQLite` [#3984]
- separate `MariaDB` driver [#4132]
- advanced maintenance modes [#3977]
- notification unsubscribe links [#3872]
- email overhaul with HTML multipart [#3872]
- date time formats from locales [#4029]
- messages extension [#4028]
- search drivers (revamp search system) [#3893]
- search UI/UX revamp [#3941]
- post search adapted with global search [#4019]
- vanilla CSS color scheme changes [#3996]
- (emoji) allow the user to set the CDN address [#3908]
- (nicknames) allow OAuth to provide a nickname [#4004]
- (sticky) make excerpt optional in sticky [#4016]
- JS `Notification` extender [#3974]
- add `whenExtensionDisabled` to `Conditional` extender [#3847]
- add option for filtering read stickied on all discussions page [#4073]
- allow resetting settings to default [#3935]
- define `FLARUM_START` constant [#4082]
- dispatch event to `flarum/installation-packages` on release [#3625]
- eloquent factories (primarily for tests) [#3982]
- frontend content flexible order priorities [#3765]
- improve emoji autocomplete [#3923]
- recover support for ico favicon [#4126]
- theming and extensibility improvements [#3876]
From v1.2.1 on all bundled Flarum extensions and flarum/core are merged into one mono repo.
## [v1.8.1](https://github.com/flarum/framework/compare/v1.8.0...v1.8.1)
### Fixed
* recover temporary solution for html entities in browser title (e72541e35de4f71f9d870bbd9bb46ddf586bdf1d)
* custom contrast color affected by parents (577890d89c593ae5b6cb96083fab69e2f1ae600c)
* reply placeholder wrong positioning (253a3d281dbf5ce3fa712b629b80587cf67e7dbe)
* (mentions) missed post mentions UI changes with lazy loading [#3832]
* (mentions) cannot use newly introduced mentionables extender [#3849]
* (mentions) missing slug from post mention links ([5a4bb7c](5a4bb7ccf226f66dd44816cb69b3d7cfe4ad7f7c))
## [v1.8.0](https://github.com/flarum/framework/compare/v1.7.1...v1.8.0)
### Fixed
- (a11y) reply placeholder not accessible [#3793]
- (bbcode) highlight.js does not work after changing post content [#3817]
- (bbcode) localize quote `wrote` string [#3809]
- (mentions) mentions XHR fired even after mentioning is done [#3806]
- (package-manager) available core updates cause an error in the dashboard ([fab71f2](fab71f2d01fa20ce9b3002833339dc5ea3ea6301))
- (tags) not all tags are loaded in the permission grid [#3804]
- (tags) tag discussion modal filters with exact matches only after first index [#3786]
- (testing) always clear cache in integration test's tearDown [#3818]
- `UserSecurityPage` not exported ([232618a](232618aba604ab003425df38b895208c863d3260))
- `isDark()` utility can receive null value [#3774]
- approving a post does not bump user `comment_count` [#3790]
- circular dependencies disable all involved extensions [#3785]
- color input overflowing the input box [#3796]
- deleting a discussion from the profile does not visually remove it [#3799]
- discussion page showing horizontal scroll on iOS [#3821]
- empty string displayed as SelectDropdown title [#3773]
- filter values are not validated [#3795]
- infinite scroll not initialized for notifications on big screens [#3733]
- notification subject discussion eager loading fails [#3788]
- null as 2nd param in `preg_match` is deprecated [#3801]
- unread count in post stream not visible [#3791]
- unreadable badge icon on certain colors [#3810]
- integrity constraint violation [#3772]
### Changed
- (core,mentions) limit `mentionedBy` post relation results [#3780]
- (likes) limit `likes` relationship results [#3781]
- Change some methods from private to protected, to be able to extend the affected classes [#3802]
- Do not catch exceptions when testing Console commands [#3813]
- drop usage of jquery in `install` and `update` interfaces [#3797]
- extensibility improvements [#3729]
- major frontend JS cleanup [#3609]
- revert ineffective code for encoding of page title [#3768]
- speed up post creation time [#3808]
### Added
- (mentions,tags) tag mentions [#3769]
- add delete own posts permission [#3784]
- add a trait to flush the formatter cache in tests [#3811]
- add user creation to users list page [#3744]
- cli command for enabling or disabling an extension [#3816]
- conditional extenders [#3759]
- provide old content to `Revised` event [#3789]
## [v1.7.1](https://github.com/flarum/framework/compare/v1.7.0...v1.7.1)
### Fixed
- (tags) composer tag selection modal using wrong primary max & min numbers (abc9670659426b765274376945b818b70d84848c)
- missing parameter names in token title translation. (#3752)
- hardcoded language strings in StatusWidget (#3754)
- hide developer tokens section in if there is nothing to display or create (#3753)
- improve sessions user UI on mobile (dd868ab44e11e892d020e3b9412553c6a789e68d)
## [v1.7.0](https://github.com/flarum/framework/compare/v1.6.3...v1.7.0)
### Added
- (actions) allow running JS tests in GH actions [#3730]
- (core) PHP 8.2 Support [#3709]
- (jest) create jest config package for unit testing [#3678]
- (jest) mithril component testing [#3679]
- (phpstan) foundation for usage in extensions [#3666]
- (seo) Do not use h3 header for poster author in posts stream [#3732]
- (seo) Use h2 header for discussions on discussions list [#3731]
- (seo) shift h1 tag from logo to discussion title [#3724]
- (tags) admin tag selection component (reusable tag selection modal) [#3686]
- Admin User Search [#3712]
- access tokens user management UI [#3587]
- add display name column to admin users list [#3740]
- allow push additional items to the end of the poststream [#3691]
- allow using utf8 characters in tag slugs [#3588]
- expose queue driver, schedule status [#3593]
- expose {time} to eventPost data, fix renamed tooltip [#3698]
- frontend `Model` extender [#3646]
- global logout to clear all sessions, access tokens, email tokens and password tokens [#3605]
- improved page navigation for users list [#3741]
- introduce frontend extenders [#3645]
### Fixed
- (mentions) correctly convert a 3 char. hex color to a 6 char. one [#3694]
- (mentions) post reply mention missing notification on approval [#3738]
- (phpstan) adapt phpstan package for extension use [#3727]
- (tags) clickable tag labels have underline [#3737]
- (tags) tag text color contrast [#3653]
- 3 digit hex color value in color input not supported [#3706]
- column `id` can be ambiguous in group filter with extensions [#3696]
- disallow certain dangerous LESS features ([1761660](1761660c98ea5a3e9665fb8e6041d1f2ee62a444))
- evaluated page title content [#3684]
- invalid translation key for scheduler dashboard [#3736]
- load actor.groups on showforumcontroller [#3716]
- make go-to-page input number-like [#3743]
- normal logout affects all sessions [#3571]
- permissions table on mobile is unusable [#3722]
- post dropdown opens all dropdowns in `.Post-actions` [#3675]
- typo in Formatter extender docblock [#3676]
- undefined showing in dropdown active title [#3700]
### Changed
- (phpstan) enable phpstan in bundled extensions [#3667]
- Add missing states exports to `compat.ts` [#3683]
- Indicate cross-origin request in generic error message [#3669]
- Merge branch 'release/v1.6.2' ([e0b9dcf](e0b9dcfbcd7db175368dbc98255f9223da8df17d))
- The negate field doesn't get used, which means you cant exclude tags [#3713]
- Update forum.less to fix the misalignment of the choose tags button [#3726]
- `yarn audit-fix` ([8ddb0fe](8ddb0feb097dad06c5763107d7a7f7b5a55562c4))
- `yarn` ([ee1e04c](ee1e04cdc26b3e63057a58899f32f482901a95fd))
- convert `Dropdown` components to TS [#3608]
- fix php 8.1 on preg_match 2nd argument being null, which also optimizes slightly ([d7b9a03](d7b9a03f31847c39631ba495df8f515509774610))
- improve group mentions parsing [#3723]
- prepare `@flarum/jest-config` for release ([748cca6](748cca6d12f8b1744a6017c09395725bdbb4a118))
- remove use of deprecated phpunit assertion ([3af0481](3af0481f304277f5380fac9c9b169a7fa651f53b))
- set flarum version to 1.7.0 for dev ([2517bc0](2517bc0f70b0f0e3d3ea3f6ae06af8604d89b25d))
- update JS dependencies [#3695]
## [v1.6.3](https://github.com/flarum/framework/compare/v1.6.2...v1.6.3)
### Fixed
* Post mentions can be used to read any post on the forum without access control (ab1c868b978e8b0d09a5d682c54665dae17d0985).
* Notifications can leak restricted content (d0a2b95dca57d3dae9a0d77b610b1cb1d0b1766a).
* Any user including unactivated can reply in public discussions whose first post was permanently deleted (12f14112a0ecd1484d97330b82beb2a145919015).
* (subscriptions) Post notifications not getting access checked (https://github.com/flarum/framework/commit/e5f05166a062a9a6eb7c12e28728bfd5db7270e3).
## [v1.6.2](https://github.com/flarum/framework/compare/v1.6.1...v1.6.2)
### Fixed
* XSS Vulnerability in core (https://github.com/flarum/framework/pull/3684).
## [v1.6.1](https://github.com/flarum/framework/compare/v1.6.0...v1.6.1)
### Fixed
* JS dependencies update breaks utilities.
## [v1.6.0](https://github.com/flarum/framework/compare/v1.5.0...v1.6.0)
### Fixed
- (approval) posts approved for deleted users error ([b5874a0](b5874a08e482196f50af50aa78e43c93c29fb647))
- (regression) bad import ([5f2d7fb](5f2d7fb7b6e430d40cf2bb05eca7c73f6ca5a2cc))
- akismet fails when the extension is not on a version ([45d9121](45d91212f6bfa777cae9fc06c55c85d01ffd174d))
- apply flex for AppearancePage colors input [#3651]
- groupmentions have poor contrast on some backgrounds [#3672]
- larastan v1 incompatible with phpstan v1.9.0 [#3665]
- package manager failures not showing alerts [#3647]
- password reset leaks user existence [#3616]
- statistics previous period chart is unclear [#3654]
### Changed
- (package-manager) config composer to use web php version ([fd19645](fd196454a5641776784fa80886cc7577c840f8ed))
- (package-manager) set min core version and add warning ([31c3cfc](31c3cfc4eab4c314260b9b0d11e53ac2d4be158d))
- (statistics) prepare v1.5.1 ([dc215ab](dc215aba59145dfd7b0d6efad4388444f30e47fb))
- Apply fixes from StyleCI ([267f675](267f6759f80bd06f468337245ea6045635e827d9))
- Fix tag discussion count decreased by 2 when hiding before deleting [#3660]
- Log migration path when up/down keys are missing [#3664]
- Make it possible to extend SetupScript [#3643]
- Setup PHPStan Level 5 [#3553]
- `yarn format` ([c5c312d](c5c312db0d800e3b84b94a4abb9691e348dea742))
- add missing last period to custom date ranges [#3661]
- add priorities to profile settings page [#3657]
- allow specifying php extensions in workflow ([b0b47a0](b0b47a0888f513a459b67e9f89e72a61de38f1ce))
- format js ([06963df](06963df4079373fc8fc51b7479e9576f02beb098))
- group mentions [#3658]
- remove styleci from changelog ([b2fa28e](b2fa28e4b57094e46dbdb3d79fab74f290a17d17))
- set flarum version to dev for 1.6.0 ([fc743ba](fc743ba88872031db13597d7365a063b8004c78f))
- throw an exception when no serializer is provided to the controller [#3614]
### Added
- (statistics) support for custom date ranges [#3622]
- Allow additional login params, Introduce `LogInValidator` [#3670]
- Allow additional reset password params, introduce `ForgotPasswordValidator` [#3671]
- add statistics chart export button [#3662]
- allow specifying extensions when installing an instance [#3655]
- contrast util with yiq calculator [#3652]
- customizable session driver [#3610]
- replace `ColorPreviewInput` for GroupModal color input [#3650]
- send notifications of a new reply when post is approved [#3656]
## [v1.5.0](https://github.com/flarum/framework/compare/v1.4.0...v1.5.0)
### Fixed
- (a11y) add accessible labels to notification grid options [#3520]
- (a11y) present post streams as feeds [#3522]
- (a11y) set `aria-busy` when editing a post stream item [#3521]
- (compilation) versioner not inject into compilers [#3589]
- (mentions) accessing `id` of null `user` relation [#3618]
- (subscriptions) add missing table prefix for filter gambit [#3599]
- (tags) use default index sortmap [#3615]
- Move guzzle requirement to core [#3544]
- MyISAM tables for extensions during installation ([75aaef7](75aaef7d76317bc8578eac1439fed8091c87213b), [f926c58](f926c58e0143fe75a4a4c2e93810970c5910afc8))
- Set the translator locale to user preference for email notifications [#3525]
- `$events` property declared dynamically [#3598]
- core settings header has no priority ([33bf228](33bf2284c77863a1bb18d71d87b8516483056a74))
- html entities shown raw in page title [#3542]
- incorrect centring of deleted user avatars in notification list [#3569]
- intellisense imports defaulting to absolute path from `src` folder [#3549]
- minor backward compatible fix for php 8.1 in st_replace ([07b2f86](07b2f86dcc90a3ef17c8ee19a1a07e99a4b17360))
- post query wildcard selection causes ambiguity [#3621]
- potential static caching memory exhaustion [#3548]
- prepare release workflow has invalid layout ([70e483d](70e483d1b185332910be9513fd06cc6342830d49))
- remove deprecation warning for decoding null values ([590639f](590639f5f3e1fe883f28c41e1f175c2826b4b5f4))
- replace `.fa()` mixin usage with `.fas()` [#3537]
- return type hint static is php 8+ ([b01b75e](b01b75e36790d8026dd27ce59051d9581ad47940))
- sticky nav content displays below post stream [#3575]
- titles positioned wrongly with custom header height [#3550]
- typo in error message ([1a189f4](1a189f492320071365286a8835bc49d5a9571753))
- unread notifications are globally cached between users. [#3543]
- update workflow name ([628c281](628c281c39855f01069ddc40b698d80d29fec870))
- user has wrong discussion read status [#3591]
### Changed
- (approval, likes) use subscribers [#3577]
- (package-manager) last tweaks before beta tag ([335c602](335c602cea3fbaee9ad7c32ceecaaf222e5d89a7))
- (statistics) add release notes for 1.4.1 ([f4ace73](f4ace73a3c59434b8717efb2d83f50084f470fe4))
- (statistics) rewrite for performance on very large communities [#3531]
- (statistics) split timed data into per-model XHR requests [#3601]
- (tags) Replace event helper with event dispatcher [#3570]
- Add `loading="lazy"` attribute for avatars [#3578]
- Create CODEOWNERS ([6e48a03](6e48a0303e45bcf210e550ba3e0772bc8443a207))
- MyISAM tables for extensions during installation" ([f128190](f128190f143398dd1262fd1379e634794daee4c1))
- convert `AlertManager` `IndexPage` and `UserPage` components to TS [#3536]
- convert `Badge` `Checkbox` and `Navigation` components to TS [#3532]
- convert core modals to TypeScript [#3515]
- convert page components to TypeScript [#3538]
- debug line slipped in while rebasing a PR [#3580]
- don't pass password field between auth modals [#3626]
- fix github issue templates ([d3e456a](d3e456a1bf42d13b7cd2542c371f392712247c09))
- format code ([4954621](495462183bfb3b33046b293e6b1088ab225968df))
- getting the release workflow in ([5530400](5530400b093b5fd07d670e5c92d8a7da96634cfe))
- link logo at the top with the official website [#3552]
- prevent running both `push` and `pull_request` actions at the same time [#3597]
- refactor prefix matrix and add `MySQL 8.0` & `PHP 7.3` to workflows [#3595]
- relying on a third-party for avatar URL tests is unreliable [#3586]
- require guzzle 6 or 7 ([46b3b7a](46b3b7a9527b935c3c52269aaad2010c75dcb6d8))
- split FA imports into separate Less file for easy overriding [#3535]
- unify JS actions into one (rewritten `flarum/action-build`) [#3573]
- update version constant during cycle 22 ([d864405](d86440506dd37101e60adec591d4b017e7765ec6))
- use `isCollapsed` instead of `rangeCount` [#3581]
- use github issue template forms [#3526]
### Added
- (likes) Add likes tab to user profile [#3528]
- (likes) Option to prevent users liking their own posts [#3534]
- (modals) support stacking modals, remove bootstrap modals dependency [#3456]
- (subscriptions) add option to send notifications when not caught up [#3503]
- Add custom class for email confirmation alert [#3584]
- Admin debug mode warning [#3590]
- Delete all notifications [#3529]
- Queue package manager commands [#3418]
- Restart the queue worker after cache clearing, ext enable/disable, save settings [#3565]
- add createTableIfNotExists migration helper [#3576]
- add new workflow for generating release meta ([0901e59](0901e59a58a3e1f017762583a2adf419f7f34257))
- clear password & email tokens when appropriate [#3567]
- discussion UTF-8 slug driver [#3606]
- expose assets base url to frontend forum model [#3566]
- extender to add custom less variables [#3530]
- publish assets on admin dashboard cache clear [#3564]
- throttle email change, email confirmation, and password reset endpoints. [#3555]
## [1.4.0](https://github.com/flarum/framework/compare/v1.3.1...v1.4.0)
### Added
- `created_at` and `updated_at` columns added to several tables (https://github.com/flarum/framework/pull/3435)
- Priorities added to AdminNav links (https://github.com/flarum/framework/pull/3453)
- `app.translator` allows retrieving and setting locale (https://github.com/flarum/framework/pull/3451)
- Extensions can now declare custom settings components for use with `buildSettingComponent` (https://github.com/flarum/framework/pull/3494)
- Implement extensibility on `rel` and `target` attributes on links (https://github.com/flarum/framework/pull/3455)
- New backend tests were added to some of the bundled extensions (https://github.com/flarum/framework/issues/3508)
### Changed
- Split boot script for Flarum in HTML footer into two parts for CSP hashing (https://github.com/flarum/framework/pull/3461)
- Split asset compilation by giving assembling compilers its own method (https://github.com/flarum/framework/pull/3446)
- Increase visibility of Component typescript class for better extensibility (https://github.com/flarum/framework/pull/3437)
### Fixed
- Mentioning an event post breaks the notification dropdown (https://github.com/flarum/framework/pull/3493)
- Suspension modal shows after suspension is over (https://github.com/flarum/framework/pull/3449)
- CLI based installations don't exit with an error code on failure (https://github.com/flarum/framework/pull/3452)
- Tabbing through dropdown controls doesn't make them visible (https://github.com/flarum/framework/pull/3450)
- Requiring zero tags on new discussions forces the user to select tags (https://github.com/flarum/framework/pull/3448)
- Long topic titles in the notification list don't overflow (https://github.com/flarum/framework/pull/3500)
- Subtags of tags the user has access to are visible even if these are not accessible (https://github.com/flarum/framework/pull/3419)
- `assertAdmin` tests access based on wrong gate ability (https://github.com/flarum/framework/pull/3501)
- Increasing the composer header size causes elements to slip underneath (https://github.com/flarum/framework/pull/3502)
- The profile mentions tab errors when sorting by `created_at` (https://github.com/flarum/framework/pull/3506)
## [1.3.1](https://github.com/flarum/framework/compare/v1.3.0...v1.3.1)
### Changed
- UserCard now has ItemList for easier extending (https://github.com/flarum/framework/pull/3436)
### Fixed
- Button to go directly to all results page is hidden while API request for search hasn't completed (https://github.com/flarum/framework/pull/3431)
- Setting extender does not register modifications beyond first fluent call (https://github.com/flarum/framework/pull/3439)
- Link to font awesome icons list no longer works (https://github.com/flarum/framework/commit/df1bdd2ad84e992414c0e1e7be576558b4b0fe29)
- Mentions: mentions with deleted authors not showing (https://github.com/flarum/framework/pull/3432)
- Nicknames: regex validation isn't functional (https://github.com/flarum/framework/pull/3430)
- Subscriptions: reply notifications not working (https://github.com/flarum/framework/pull/3445)
- Suspend: not providing suspension reason breaks mail (https://github.com/flarum/framework/pull/3433)
<!-- One-time commit-based diff due to monorepo rework. Diffing against the 1.2.1 tag doesn't work due to unrelated histories. -->
## [1.3.0](https://github.com/flarum/framework/compare/33d939cb012716ed6309ea02236737ad4f25a75b...v1.3.0)
From v1.2.1 on all bundled Flarum extensions and `flarum/core` are merged into one monorepo. As a result of this, the full code diff linked above
looks rather complex and messy compared to the full list of changes made for this release.
### Added
- [A11Y] Added role feed to DiscussionList (https://github.com/flarum/framework/pull/3359)
@@ -30,6 +443,10 @@ From v1.2.1 on all bundled Flarum extensions and flarum/core are merged into one
- [A11Y] Tags: focus to input and layout of tag selection modal are off (https://github.com/flarum/framework/pull/3412)
- Subscriptions: searching inside the following page will search in all discussions (https://github.com/flarum/framework/pull/3376)
## [1.2.1](https://github.com/flarum/framework/compare/v1.2.0...v1.2.1)
### Fixed
- Don't escape single quotes in discussion title meta tags (60600f4d2b8f0c5dac94c329041427a0a08fad42)
## [1.2.0](https://github.com/flarum/framework/compare/v1.1.1...v1.2.0)
@@ -172,7 +589,7 @@ From v1.2.1 on all bundled Flarum extensions and flarum/core are merged into one
- Pass filter params to getApiDocument (https://github.com/flarum/framework/pull/3037)
- Use author filter instead of gambit to get a user's discussions (https://github.com/flarum/framework/pull/3068)
- [A11Y] Accessibility improvements for the Search component (https://github.com/flarum/framework/pull/3017)
- Add determinsm to extension order resolution (https://github.com/flarum/framework/pull/3076)
- Add determinism to extension order resolution (https://github.com/flarum/framework/pull/3076)
- Add cache control headers to the admin area (https://github.com/flarum/framework/pull/3097)
### Fixed

View File

@@ -1,11 +1,12 @@
<p align="center"><img src="https://flarum.org/assets/img/logo.png"></p>
<p align="center">
<a href="https://flarum.org/"><img src="https://flarum.org/images/flarum.svg"></a>
</p>
<p align="center">
<a href="https://github.com/flarum/core/actions?query=workflow%3ATests"><img src="https://github.com/flarum/core/workflows/Tests/badge.svg" alt="PHP Tests"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/dt/flarum/core" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/github/v/release/flarum/core?sort=semver" alt="Latest Version"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/l/flarum/core" alt="License"></a>
<a href="https://huntr.dev/bounties/disclose/?target=https://github.com/flarum/core"><img src="https://cdn.huntr.dev/huntr_security_badge_mono.svg" alt="huntr"></a>
<a href="https://github.styleci.io/repos/28257573"><img src="https://github.styleci.io/repos/28257573/shield?style=flat" alt="StyleCI"></a>
</p>
@@ -19,7 +20,7 @@
* **Powerful and extensible.** Customize, extend, and integrate Flarum to suit your community. Flarums architecture is amazingly flexible, with a powerful Extension API.
![Screenshot of a Flarum instance, showing multiple discussions and tags.](https://flarum.org/assets/img/home-screenshot.png)
![Screenshot of a Flarum instance, showing multiple discussions and tags.](https://flarum.org/assets/flarum/home-screenshot.png)
## Installation
@@ -36,3 +37,4 @@ If you discover a security vulnerability within Flarum, please send an e-mail to
## License
Flarum is open-source software licensed under the [MIT License](https://github.com/flarum/flarum/blob/master/LICENSE).

16
bin/test.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
MONOREPO_TEST="framework/core extensions/akismet extensions/approval extensions/flags extensions/likes extensions/mentions extensions/nicknames extensions/statistics extensions/sticky extensions/subscriptions extensions/suspend extensions/tags extensions/messages php-packages/testing/tests"
for test in $MONOREPO_TEST; do
echo ""
echo "===> Testing $test"
echo ""
# composer test:setup --working-dir=$test
composer test --working-dir=$test
echo ""
echo "===> Done testing $test"
echo ""
done

View File

@@ -29,8 +29,8 @@
}
],
"support": {
"issues": "https://github.com/flarum/core/issues",
"source": "https://github.com/flarum/core",
"issues": "https://github.com/flarum/framework/issues",
"source": "https://github.com/flarum/framework",
"docs": "https://docs.flarum.org",
"forum": "https://discuss.flarum.org",
"chat": "https://flarum.org/chat"
@@ -40,18 +40,20 @@
"Flarum\\": "framework/core/src",
"Flarum\\Akismet\\": "extensions/akismet/src",
"Flarum\\Approval\\": "extensions/approval/src",
"Flarum\\BBCode\\": "extensions/bbcode/src",
"Flarum\\Flags\\": "extensions/flags/src",
"Flarum\\Likes\\": "extensions/likes/src",
"Flarum\\Lock\\": "extensions/lock/src",
"Flarum\\Mentions\\": "extensions/mentions/src",
"Flarum\\Nicknames\\": "extensions/nicknames/src",
"Flarum\\PackageManager\\": "extensions/package-manager/src",
"Flarum\\ExtensionManager\\": "extensions/package-manager/src",
"Flarum\\Pusher\\": "extensions/pusher/src",
"Flarum\\Statistics\\": "extensions/statistics/src",
"Flarum\\Sticky\\": "extensions/sticky/src",
"Flarum\\Subscriptions\\": "extensions/subscriptions/src",
"Flarum\\Suspend\\": "extensions/suspend/src",
"Flarum\\Tags\\": "extensions/tags/src",
"Flarum\\Messages\\": "extensions/messages/src",
"Flarum\\PHPStan\\": "php-packages/phpstan/src",
"Flarum\\Testing\\": "php-packages/testing/src"
},
@@ -59,6 +61,27 @@
"framework/core/src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Flarum\\Tests\\": "tests",
"Flarum\\Akismet\\Tests\\": "extensions/akismet/tests",
"Flarum\\Approval\\Tests\\": "extensions/approval/tests",
"Flarum\\Flags\\Tests\\": "extensions/flags/tests",
"Flarum\\Likes\\Tests\\": "extensions/likes/tests",
"Flarum\\Lock\\Tests\\": "extensions/lock/tests",
"Flarum\\Mentions\\Tests\\": "extensions/mentions/tests",
"Flarum\\Nicknames\\Tests\\": "extensions/nicknames/tests",
"Flarum\\ExtensionManager\\Tests\\": "extensions/package-manager/tests",
"Flarum\\Pusher\\Tests\\": "extensions/pusher/tests",
"Flarum\\Statistics\\Tests\\": "extensions/statistics/tests",
"Flarum\\Sticky\\Tests\\": "extensions/sticky/tests",
"Flarum\\Subscriptions\\Tests\\": "extensions/subscriptions/tests",
"Flarum\\Suspend\\Tests\\": "extensions/suspend/tests",
"Flarum\\Tags\\Tests\\": "extensions/tags/tests",
"Flarum\\Messages\\Tests\\": "extensions/messages/tests",
"Flarum\\Testing\\Tests\\": "php-packages/testing/tests"
}
},
"replace": {
"flarum/core": "self.version",
"flarum/akismet": "self.version",
@@ -73,75 +96,84 @@
"flarum/markdown": "self.version",
"flarum/mentions": "self.version",
"flarum/nicknames": "self.version",
"flarum/package-manager": "self.version",
"flarum/extension-manager": "self.version",
"flarum/pusher": "self.version",
"flarum/statistics": "self.version",
"flarum/sticky": "self.version",
"flarum/subscriptions": "self.version",
"flarum/suspend": "self.version",
"flarum/tags": "self.version",
"flarum/messages": "self.version",
"flarum/phpstan": "self.version",
"flarum/testing": "self.version"
},
"require": {
"php": "^8.2",
"ext-json": "*",
"php": ">=7.3",
"axy/sourcemap": "^0.1.4",
"components/font-awesome": "^5.14.0",
"composer/composer": "^2.0",
"dflydev/fig-cookies": "^3.0.0",
"doctrine/dbal": "^2.7",
"dragonmantank/cron-expression": "^3.1.0",
"franzl/whoops-middleware": "^2.0.0",
"guzzlehttp/guzzle": "^7.4",
"illuminate/bus": "^8.0",
"illuminate/cache": "^8.0",
"illuminate/config": "^8.0",
"illuminate/console": "^8.0",
"illuminate/container": "^8.0",
"illuminate/contracts": "^8.0",
"illuminate/database": "^8.0",
"illuminate/events": "^8.0",
"illuminate/filesystem": "^8.0",
"illuminate/hashing": "^8.0",
"illuminate/mail": "^8.0",
"illuminate/queue": "^8.0",
"illuminate/session": "^8.0",
"illuminate/support": "^8.0",
"illuminate/validation": "^8.0",
"illuminate/view": "^8.0",
"intervention/image": "2.5.* || ^2.6.1",
"laminas/laminas-diactoros": "^2.4.1",
"laminas/laminas-httphandlerrunner": "^1.2.0",
"laminas/laminas-stratigility": "^3.2.2",
"league/flysystem": "^1.0.11",
"components/font-awesome": "^6.5.2",
"composer/composer": "^2.7",
"dflydev/fig-cookies": "^3.0",
"doctrine/dbal": "^3.6.2",
"dragonmantank/cron-expression": "^3.3",
"fakerphp/faker": "^1.9.1",
"flarum/json-api-server": "^0.1.0",
"franzl/whoops-middleware": "2.0",
"guzzlehttp/guzzle": "*",
"illuminate/bus": "^11.0",
"illuminate/cache": "^11.0",
"illuminate/config": "^11.0",
"illuminate/console": "^11.0",
"illuminate/container": "^11.0",
"illuminate/contracts": "^11.0",
"illuminate/database": "^11.0",
"illuminate/events": "^11.0",
"illuminate/filesystem": "^11.0",
"illuminate/hashing": "^11.0",
"illuminate/mail": "^11.0",
"illuminate/queue": "^11.0",
"illuminate/session": "^11.0",
"illuminate/support": "^11.0",
"illuminate/validation": "^11.0",
"illuminate/view": "^11.0",
"intervention/image": "^3.2",
"jenssegers/agent": "^2.6",
"laminas/laminas-diactoros": "^3.0",
"laminas/laminas-httphandlerrunner": "^2.6",
"laminas/laminas-stratigility": "^3.10",
"league/flysystem": "^3.15",
"league/flysystem-memory": "^3.15",
"matthiasmullie/minify": "^1.3",
"middlewares/base-path": "^2.0.1",
"middlewares/base-path": "^v2.1",
"middlewares/base-path-router": "^2.0.1",
"middlewares/request-handler": "^2.0.1",
"monolog/monolog": "^1.16.0",
"nesbot/carbon": "^2.0",
"nikic/fast-route": "^0.6",
"psr/http-message": "^1.0",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"pusher/pusher-php-server": "^2.2",
"s9e/text-formatter": "^2.3.6",
"symfony/config": "^5.2.2",
"symfony/console": "^5.2.2",
"symfony/event-dispatcher": "^5.2.2",
"symfony/mime": "^5.2.0",
"symfony/polyfill-intl-messageformatter": "^1.22.0",
"symfony/translation": "^5.1.5",
"symfony/yaml": "^5.2.2",
"tobscure/json-api": "^0.3.0",
"wikimedia/less.php": "^3.0"
"middlewares/request-handler": "^2.0.2",
"monolog/monolog": "^3.3",
"nesbot/carbon": "^3.0",
"nikic/fast-route": "^1.3",
"psr/http-message": "^1.1",
"psr/http-server-handler": "^1.0.2",
"psr/http-server-middleware": "^1.0.2",
"pusher/pusher-php-server": "^7.2",
"s9e/text-formatter": "^2.13",
"sycho/sourcemap": "^2.0.0",
"symfony/config": "^7.0",
"symfony/console": "^7.0",
"symfony/event-dispatcher": "^7.0",
"symfony/http-client": "^7.0",
"symfony/mailgun-mailer": "^7.0",
"symfony/mime": "^7.0",
"symfony/polyfill-intl-messageformatter": "^1.27",
"symfony/postmark-mailer": "^7.0",
"symfony/translation": "^7.0",
"symfony/yaml": "^7.0",
"wikimedia/less.php": "^4.1"
},
"require-dev": {
"mockery/mockery": "^1.4",
"phpunit/phpunit": "^9.0",
"phpstan/phpstan-php-parser": "^1.0",
"phpstan/phpstan": "^1.2"
"mockery/mockery": "^1.5",
"phpunit/phpunit": "^11.0",
"phpstan/phpstan": "^1.10.0",
"larastan/larastan": "2.9.12",
"symfony/var-dumper": "^7.0",
"flarum/testing-tests": "*@dev"
},
"config": {
"sort-packages": true
@@ -168,15 +200,29 @@
"extensions/sticky",
"extensions/subscriptions",
"extensions/suspend",
"extensions/tags"
"extensions/tags",
"extensions/messages"
],
"branch-alias": {
"dev-main": "1.x-dev"
"dev-main": "2.x-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
}
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
"clear-cache:phpstan": "phpstan clear-result-cache"
},
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis"
},
"repositories": [
{
"type": "path",
"url": "php-packages/testing/tests"
}
]
}

20
extensions/akismet/.gitattributes vendored Normal file
View File

@@ -0,0 +1,20 @@
**/.gitattributes export-ignore
**/.gitignore export-ignore
**/.gitmodules export-ignore
**/.github export-ignore
**/.travis export-ignore
**/.travis.yml export-ignore
**/.editorconfig export-ignore
**/.styleci.yml export-ignore
**/phpunit.xml export-ignore
**/tests export-ignore
**/js/dist/**/* -diff
**/js/dist/**/* linguist-generated
**/js/dist-typings/**/* -diff
**/js/dist-typings/**/* linguist-generated
**/js/yarn.lock -diff
**/js/package-lock.json -diff
* text=auto eol=lf

View File

@@ -4,6 +4,7 @@ composer.phar
.DS_Store
Thumbs.db
tests/.phpunit.cache
tests/.phpunit.result.cache
/tests/integration/tmp
.vagrant

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2019-2021 Stichting Flarum (Flarum Foundation)
Copyright (c) 2019-2024 Stichting Flarum (Flarum Foundation)
Copyright (c) 2014-2019 Toby Zerner (toby.zerner@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@@ -7,7 +7,7 @@
],
"license": "MIT",
"support": {
"issues": "https://github.com/flarum/core/issues",
"issues": "https://github.com/flarum/framework/issues",
"source": "https://github.com/flarum/akismet",
"forum": "https://discuss.flarum.org"
},
@@ -19,9 +19,8 @@
}
],
"require": {
"flarum/core": "^1.3",
"flarum/approval": "^1.2",
"guzzlehttp/guzzle": "^7.4"
"flarum/core": "^2.0.0-beta.1",
"flarum/approval": "^2.0"
},
"autoload": {
"psr-4": {
@@ -30,7 +29,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
"dev-main": "2.x-dev"
},
"flarum-extension": {
"title": "Akismet",
@@ -76,7 +75,7 @@
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
},
"require-dev": {
"flarum/testing": "^1.0.0"
"flarum/testing": "^2.0"
},
"repositories": [
{

View File

@@ -13,6 +13,7 @@ use Flarum\Approval\Event\PostWasApproved;
use Flarum\Extend;
use Flarum\Post\Event\Hidden;
use Flarum\Post\Event\Saving;
use Flarum\Post\Post;
return [
(new Extend\Frontend('forum'))
@@ -30,4 +31,7 @@ return [
(new Extend\ServiceProvider())
->register(AkismetProvider::class),
(new Extend\Model(Post::class))
->cast('is_spam', 'bool'),
];

2
extensions/akismet/js/dist-typings/admin/extend.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare const _default: import("flarum/common/extenders/Admin").default[];
export default _default;

View File

@@ -1 +1 @@
export {};
export { default as extend } from './extend';

View File

@@ -1,2 +1,2 @@
(()=>{var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var r in a)e.o(a,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const a=flarum.core.compat["admin/app"];var r=e.n(a);r().initializers.add("flarum-akismet",(function(){r().extensionData.for("flarum-akismet").registerSetting({setting:"flarum-akismet.api_key",type:"text",label:r().translator.trans("flarum-akismet.admin.akismet_settings.api_key_label")}).registerSetting({setting:"flarum-akismet.delete_blatant_spam",type:"boolean",label:r().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_label"),help:r().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_help")}).registerPermission({icon:"fas fa-vote-yea",label:r().translator.trans("flarum-akismet.admin.permissions.bypass_akismet"),permission:"bypassAkismet"},"start")}))})(),module.exports=t})();
(()=>{var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var s in a)e.o(a,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:a[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{extend:()=>n});const a=flarum.reg.get("core","admin/app");var s=e.n(a);const r=flarum.reg.get("core","common/extenders"),n=[(new(e.n(r)().Admin)).setting((()=>({setting:"flarum-akismet.api_key",type:"text",label:s().translator.trans("flarum-akismet.admin.akismet_settings.api_key_label")}))).setting((()=>({setting:"flarum-akismet.delete_blatant_spam",type:"boolean",label:s().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_label"),help:s().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_help")}))).permission((()=>({icon:"fas fa-vote-yea",label:s().translator.trans("flarum-akismet.admin.permissions.bypass_akismet"),permission:"bypassAkismet"})),"start")];s().initializers.add("flarum-akismet",(()=>{}))})(),module.exports=t})();
//# sourceMappingURL=admin.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCExDC,IAAAA,aAAAA,IAAqB,kBAAkB,WACrCA,IAAAA,cAAAA,IACO,kBACJC,gBAAgB,CACfC,QAAS,yBACTC,KAAM,OACNC,MAAOJ,IAAAA,WAAAA,MAAqB,yDAE7BC,gBAAgB,CAEfC,QAAS,qCACTC,KAAM,UACNC,MAAOJ,IAAAA,WAAAA,MAAqB,mEAC5BK,KAAML,IAAAA,WAAAA,MAAqB,oEAE5BM,mBACC,CACEC,KAAM,kBACNH,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BQ,WAAY,iBAEd,a","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/akismet/./src/admin/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-akismet', () => {\n app.extensionData\n .for('flarum-akismet')\n .registerSetting({\n setting: 'flarum-akismet.api_key',\n type: 'text',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label'),\n })\n .registerSetting({\n //https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/\n setting: 'flarum-akismet.delete_blatant_spam',\n type: 'boolean',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),\n help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-vote-yea',\n label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),\n permission: 'bypassAkismet',\n },\n 'start'\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","registerSetting","setting","type","label","help","registerPermission","icon","permission"],"sourceRoot":""}
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oBCE5D,IAAgB,I,MAAI,WAAeW,SAAQ,KAAM,CAC/CA,QAAS,yBACTC,KAAM,OACNC,MAAO,eAAeC,MAAM,2DAC1BH,SAAQ,KAAM,CAEhBA,QAAS,qCACTC,KAAM,UACNC,MAAO,eAAeC,MAAM,mEAC5BC,KAAM,eAAeD,MAAM,sEACzBE,YAAW,KAAM,CACnBC,KAAM,kBACNJ,MAAO,eAAeC,MAAM,mDAC5BE,WAAY,mBACV,UCdJ,iBAAiBE,IAAI,kBAAkB,Q","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/akismet/./src/admin/extend.tsx","webpack://@flarum/akismet/./src/admin/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","import Extend from 'flarum/common/extenders';\nimport app from 'flarum/admin/app';\nexport default [new Extend.Admin().setting(() => ({\n setting: 'flarum-akismet.api_key',\n type: 'text',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label')\n})).setting(() => ({\n // https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/\n setting: 'flarum-akismet.delete_blatant_spam',\n type: 'boolean',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),\n help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help')\n})).permission(() => ({\n icon: 'fas fa-vote-yea',\n label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),\n permission: 'bypassAkismet'\n}), 'start')];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-akismet', () => {\n // ...\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","setting","type","label","trans","help","permission","icon","add"],"sourceRoot":""}

View File

@@ -1,2 +1,2 @@
(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=t.n(r);const n=flarum.core.compat["forum/utils/PostControls"];var m=t.n(n);const s=flarum.core.compat["forum/components/CommentPost"];var l=t.n(s);a().initializers.add("flarum-akismet",(function(){(0,o.extend)(m(),"destructiveControls",(function(t,e){if(t.has("approve")){var o=e.flags();if(o&&o.some((function(t){return"akismet"===(null==t?void 0:t.type())}))){var r=t.get("approve");r&&"object"==typeof r&&"children"in r&&(r.children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,o.override)(l().prototype,"flagReason",(function(t,e){return"akismet"===e.type()?a().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(e)}))}))})(),module.exports=e})();
(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=flarum.reg.get("core","common/extend"),r=flarum.reg.get("core","forum/app");var o=e.n(r);const a=flarum.reg.get("core","forum/utils/PostControls");var n=e.n(a);const s=flarum.reg.get("core","forum/components/Post");var m=e.n(s);o().initializers.add("flarum-akismet",(()=>{(0,t.extend)(n(),"destructiveControls",(function(e,t){if(e.has("approve")){const r=t.flags();if(r&&r.some((e=>"akismet"===e?.type()))){const t=e.get("approve");t&&"object"==typeof t&&"children"in t&&(t.children=o().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,t.override)(m().prototype,"flagReason",(function(e,t){return"akismet"===t.type()?o().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):e(t)}))}))})(),module.exports={}})();
//# sourceMappingURL=forum.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCSxDC,IAAAA,aAAAA,IAAqB,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAmCC,GACvF,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEnB,GAAIA,GAASA,EAAMC,MAAK,SAACC,GAAD,MAA2B,aAAb,MAAJA,OAAA,EAAAA,EAAMC,WAAuB,CAC7D,IAAMC,EAAcP,EAAMf,IAAI,WAC1BsB,GAAsC,iBAAhBA,GAA4B,aAAcA,IAClEA,EAAYC,SAAWX,IAAAA,WAAAA,MAAqB,oDAMpDY,EAAAA,EAAAA,UAASC,IAAAA,UAAuB,cAAc,SAAUC,EAAUN,GAChE,MAAoB,YAAhBA,EAAKC,OACAT,IAAAA,WAAAA,MAAqB,kDAGvBc,EAASN,U","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport type Post from 'flarum/common/models/Post';\nimport type ItemList from 'flarum/common/utils/ItemList';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport type Mithril from 'mithril';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList<Mithril.Children>, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag?.type() === 'akismet')) {\n const approveItem = items.get('approve');\n if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n }\n });\n\n override(CommentPost.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n\n return original(flag);\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","PostControls","items","post","has","flags","some","flag","type","approveItem","children","override","CommentPost","original"],"sourceRoot":""}
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,mBCAlF,MAAM,EAA+BI,OAAOC,IAAIP,IAAI,OAAQ,iBCAtD,EAA+BM,OAAOC,IAAIP,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BM,OAAOC,IAAIP,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BM,OAAOC,IAAIP,IAAI,OAAQ,yB,aCI5D,iBAAiBQ,IAAI,kBAAkB,MACrC,IAAAC,QAAO,IAAc,uBAAuB,SAAUC,EAAOC,GAC3D,GAAID,EAAME,IAAI,WAAY,CACxB,MAAMC,EAAQF,EAAKE,QACnB,GAAIA,GAASA,EAAMC,MAAKC,GAAyB,YAAjBA,GAAMC,SAAuB,CAC3D,MAAMC,EAAcP,EAAMV,IAAI,WAC1BiB,GAAsC,iBAAhBA,GAA4B,aAAcA,IAClEA,EAAYC,SAAW,eAAeC,MAAM,6CAEhD,CACF,CACF,KACA,IAAAC,UAAS,cAAyB,cAAc,SAAUC,EAAUN,GAClE,MAAoB,YAAhBA,EAAKC,OACA,eAAeG,MAAM,kDAEvBE,EAASN,EAClB,GAAE,G","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'forum/utils/PostControls')\"","webpack://@flarum/akismet/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/PostControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport PostComponent from 'flarum/forum/components/Post';\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items, post) {\n if (items.has('approve')) {\n const flags = post.flags();\n if (flags && flags.some(flag => flag?.type() === 'akismet')) {\n const approveItem = items.get('approve');\n if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n }\n });\n override(PostComponent.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n return original(flag);\n });\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","flarum","reg","add","extend","items","post","has","flags","some","flag","type","approveItem","children","trans","override","original"],"sourceRoot":""}

View File

@@ -9,18 +9,18 @@
"analyze": "cross-env ANALYZER=true yarn run build",
"format": "prettier --write src",
"format-check": "prettier --check src",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report",
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report"
},
"devDependencies": {
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.2",
"flarum-tsconfig": "^2.0.0",
"prettier": "^2.5.1",
"flarum-webpack-config": "^2.0.0",
"webpack": "^5.65.0",
"flarum-webpack-config": "^3.0.0",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1",
"typescript": "^4.5.4",
"typescript-coverage-report": "^0.6.1"

View File

@@ -0,0 +1,26 @@
import Extend from 'flarum/common/extenders';
import app from 'flarum/admin/app';
export default [
new Extend.Admin()
.setting(() => ({
setting: 'flarum-akismet.api_key',
type: 'text',
label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label'),
}))
.setting(() => ({
// https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/
setting: 'flarum-akismet.delete_blatant_spam',
type: 'boolean',
label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),
help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help'),
}))
.permission(
() => ({
icon: 'fas fa-vote-yea',
label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),
permission: 'bypassAkismet',
}),
'start'
),
];

View File

@@ -1,26 +1,7 @@
import app from 'flarum/admin/app';
export { default as extend } from './extend';
app.initializers.add('flarum-akismet', () => {
app.extensionData
.for('flarum-akismet')
.registerSetting({
setting: 'flarum-akismet.api_key',
type: 'text',
label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label'),
})
.registerSetting({
//https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/
setting: 'flarum-akismet.delete_blatant_spam',
type: 'boolean',
label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),
help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help'),
})
.registerPermission(
{
icon: 'fas fa-vote-yea',
label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),
permission: 'bypassAkismet',
},
'start'
);
// ...
});

View File

@@ -4,7 +4,7 @@ import type Post from 'flarum/common/models/Post';
import type ItemList from 'flarum/common/utils/ItemList';
import PostControls from 'flarum/forum/utils/PostControls';
import CommentPost from 'flarum/forum/components/CommentPost';
import PostComponent from 'flarum/forum/components/Post';
import type Mithril from 'mithril';
app.initializers.add('flarum-akismet', () => {
@@ -21,7 +21,7 @@ app.initializers.add('flarum-akismet', () => {
}
});
override(CommentPost.prototype, 'flagReason', function (original, flag) {
override(PostComponent.prototype, 'flagReason', function (original, flag) {
if (flag.type() === 'akismet') {
return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');
}

View File

@@ -4,14 +4,18 @@
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
// and also tells your Typescript server to read core's global typings for
// access to `dayjs` and `$` in the global namespace.
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
"include": [
"src/**/*",
"../../../framework/core/js/dist-typings/@types/**/*",
"../../flags/js/dist-typings/@types/**/*",
"@types/**/*"
],
"compilerOptions": {
// This will output typings to `dist-typings`
"declarationDir": "./dist-typings",
"baseUrl": ".",
"paths": {
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
"flarum/flags/*": ["../vendor/flarum/flags/js/dist-typings/*"]
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
"ext:flarum/flags/*": ["../../flags/js/dist-typings/*"]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -15,22 +15,19 @@ use Psr\Http\Message\ResponseInterface;
class Akismet
{
private $apiKey;
private $apiUrl;
private $flarumVersion;
private $extensionVersion;
private string $apiUrl;
private array $params = [];
private $params = [];
public function __construct(string $apiKey, string $homeUrl, string $flarumVersion, string $extensionVersion, bool $inDebugMode = false)
{
$this->apiKey = $apiKey;
public function __construct(
private readonly string $apiKey,
string $homeUrl,
private readonly string $flarumVersion,
private readonly string $extensionVersion,
bool $inDebugMode = false
) {
$this->apiUrl = "https://$apiKey.rest.akismet.com/1.1";
$this->params['blog'] = $homeUrl;
$this->flarumVersion = $flarumVersion;
$this->extensionVersion = $extensionVersion;
if ($inDebugMode) {
$this->params['is_test'] = true;
}
@@ -50,7 +47,7 @@ class Akismet
$client = new Client();
return $client->request('POST', "$this->apiUrl/$type", [
'headers' => [
'headers' => [
'User-Agent' => "Flarum/$this->flarumVersion | Akismet/$this->extensionVersion",
],
'form_params' => $this->params,
@@ -73,7 +70,7 @@ class Akismet
/**
* @throws GuzzleException
*/
public function submitSpam()
public function submitSpam(): void
{
$this->sendRequest('submit-spam');
}
@@ -81,7 +78,7 @@ class Akismet
/**
* @throws GuzzleException
*/
public function submitHam()
public function submitHam(): void
{
$this->sendRequest('submit-ham');
}
@@ -90,7 +87,7 @@ class Akismet
* Allows you to set additional parameter
* This lets you use Akismet features not supported directly in this util.
*/
public function withParam(string $key, $value): Akismet
public function withParam(string $key, mixed $value): Akismet
{
$new = clone $this;
$new->params[$key] = $value;

View File

@@ -14,17 +14,12 @@ use Flarum\Approval\Event\PostWasApproved;
class SubmitHam
{
/**
* @var Akismet
*/
protected $akismet;
public function __construct(Akismet $akismet)
{
$this->akismet = $akismet;
public function __construct(
protected Akismet $akismet
) {
}
public function handle(PostWasApproved $event)
public function handle(PostWasApproved $event): void
{
if (! $this->akismet->isConfigured()) {
return;

View File

@@ -14,17 +14,12 @@ use Flarum\Post\Event\Hidden;
class SubmitSpam
{
/**
* @var Akismet
*/
protected $akismet;
public function __construct(Akismet $akismet)
{
$this->akismet = $akismet;
public function __construct(
protected Akismet $akismet
) {
}
public function handle(Hidden $event)
public function handle(Hidden $event): void
{
if (! $this->akismet->isConfigured()) {
return;

View File

@@ -18,22 +18,13 @@ use Flarum\Settings\SettingsRepositoryInterface;
class ValidatePost
{
/**
* @var Akismet
*/
protected $akismet;
/**
* @var SettingsRepositoryInterface
*/
private $settings;
public function __construct(Akismet $akismet, SettingsRepositoryInterface $settings)
{
$this->akismet = $akismet;
$this->settings = $settings;
public function __construct(
protected Akismet $akismet,
protected SettingsRepositoryInterface $settings
) {
}
public function handle(Saving $event)
public function handle(Saving $event): void
{
if (! $this->akismet->isConfigured()) {
return;
@@ -50,7 +41,7 @@ class ValidatePost
->withContent($post->content)
->withAuthorName($post->user->username)
->withAuthorEmail($post->user->email)
->withType($post->number == 1 ? 'forum-post' : 'reply')
->withType($post->number === 1 ? 'forum-post' : 'reply')
->withIp($post->ip_address)
->withUserAgent($_SERVER['HTTP_USER_AGENT'])
->checkSpam();

View File

@@ -20,7 +20,7 @@ use Illuminate\Container\Container;
class AkismetProvider extends AbstractServiceProvider
{
public function register()
public function register(): void
{
$this->container->bind(Akismet::class, function (Container $container) {
/** @var SettingsRepositoryInterface $settings */
@@ -38,7 +38,7 @@ class AkismetProvider extends AbstractServiceProvider
$settings->get('flarum-akismet.api_key'),
$url->to('forum')->base(),
$app::VERSION,
$extensions->getExtension('flarum-akismet')->getVersion(),
$extensions->getExtension('flarum-akismet')->getVersion() ?? 'unknown',
$config->inDebugMode()
);
});

View File

@@ -7,10 +7,6 @@
* LICENSE file that was distributed with this source code.
*/
use Flarum\Testing\integration\Setup\SetupScript;
require __DIR__.'/../../vendor/autoload.php';
$setup = new SetupScript();
$setup = require __DIR__.'/../../../../php-packages/testing/bootstrap/monorepo.php';
$setup->run();

View File

@@ -1,21 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
stopOnFailure="false"
bootstrap="../../../php-packages/testing/bootstrap/monorepo.php"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">../src/</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Flarum Integration Tests">
<directory suffix="Test.php">./integration</directory>

View File

@@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="../../../php-packages/testing/bootstrap/monorepo.php"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">../src/</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Flarum Unit Tests">
<directory suffix="Test.php">./unit</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
</listeners>
</phpunit>

20
extensions/approval/.gitattributes vendored Normal file
View File

@@ -0,0 +1,20 @@
**/.gitattributes export-ignore
**/.gitignore export-ignore
**/.gitmodules export-ignore
**/.github export-ignore
**/.travis export-ignore
**/.travis.yml export-ignore
**/.editorconfig export-ignore
**/.styleci.yml export-ignore
**/phpunit.xml export-ignore
**/tests export-ignore
**/js/dist/**/* -diff
**/js/dist/**/* linguist-generated
**/js/dist-typings/**/* -diff
**/js/dist-typings/**/* linguist-generated
**/js/yarn.lock -diff
**/js/package-lock.json -diff
* text=auto eol=lf

View File

@@ -4,6 +4,7 @@ composer.phar
.DS_Store
Thumbs.db
tests/.phpunit.cache
tests/.phpunit.result.cache
/tests/integration/tmp
.vagrant

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2019-2021 Stichting Flarum (Flarum Foundation)
Copyright (c) 2019-2024 Stichting Flarum (Flarum Foundation)
Copyright (c) 2014-2019 Toby Zerner (toby.zerner@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@@ -7,7 +7,7 @@
],
"license": "MIT",
"support": {
"issues": "https://github.com/flarum/core/issues",
"issues": "https://github.com/flarum/framework/issues",
"source": "https://github.com/flarum/approval",
"forum": "https://discuss.flarum.org"
},
@@ -19,8 +19,8 @@
}
],
"require": {
"flarum/core": "^1.3",
"flarum/flags": "^1.2"
"flarum/core": "^2.0.0-beta.1",
"flarum/flags": "^2.0"
},
"autoload": {
"psr-4": {
@@ -29,7 +29,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
"dev-main": "2.x-dev"
},
"flarum-extension": {
"title": "Approval",
@@ -52,7 +52,7 @@
"prettier": true,
"typescript": false,
"bundlewatch": false,
"backendTesting": false,
"backendTesting": true,
"editorConfig": true,
"styleci": true
}
@@ -65,5 +65,28 @@
}
],
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"autoload-dev": {
"psr-4": {
"Flarum\\Approval\\Tests\\": "tests/"
}
},
"scripts": {
"test": [
"@test:unit",
"@test:integration"
],
"test:unit": "phpunit -c tests/phpunit.unit.xml",
"test:integration": "phpunit -c tests/phpunit.integration.xml",
"test:setup": "@php tests/integration/setup.php"
},
"scripts-descriptions": {
"test": "Runs all tests.",
"test:unit": "Runs all unit tests.",
"test:integration": "Runs all integration tests.",
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
},
"require-dev": {
"flarum/testing": "^2.0"
}
}

View File

@@ -7,15 +7,15 @@
* LICENSE file that was distributed with this source code.
*/
use Flarum\Api\Serializer\BasicDiscussionSerializer;
use Flarum\Api\Serializer\PostSerializer;
use Flarum\Api\Resource;
use Flarum\Api\Schema;
use Flarum\Approval\Access;
use Flarum\Approval\Api\PostResourceFields;
use Flarum\Approval\Event\PostWasApproved;
use Flarum\Approval\Listener;
use Flarum\Discussion\Discussion;
use Flarum\Extend;
use Flarum\Post\CommentPost;
use Flarum\Post\Event\Saving;
use Flarum\Post\Post;
use Flarum\Tags\Tag;
@@ -29,30 +29,28 @@ return [
// Discussions should be approved by default
(new Extend\Model(Discussion::class))
->default('is_approved', true),
->default('is_approved', true)
->cast('is_approved', 'bool'),
// Posts should be approved by default
(new Extend\Model(Post::class))
->default('is_approved', true),
->default('is_approved', true)
->cast('is_approved', 'bool'),
(new Extend\ApiSerializer(BasicDiscussionSerializer::class))
->attribute('isApproved', function ($serializer, Discussion $discussion) {
return (bool) $discussion->is_approved;
}),
(new Extend\ApiResource(Resource\DiscussionResource::class))
->fields(fn () => [
Schema\Boolean::make('isApproved'),
]),
(new Extend\ApiSerializer(PostSerializer::class))
->attribute('isApproved', function ($serializer, Post $post) {
return (bool) $post->is_approved;
})->attribute('canApprove', function (PostSerializer $serializer, Post $post) {
return (bool) $serializer->getActor()->can('approvePosts', $post->discussion);
}),
(new Extend\ApiResource(Resource\PostResource::class))
->fields(PostResourceFields::class),
new Extend\Locales(__DIR__.'/locale'),
(new Extend\Event())
->listen(Saving::class, [Listener\ApproveContent::class, 'approvePost'])
->listen(Saving::class, [Listener\UnapproveNewContent::class, 'unapproveNewPosts'])
->listen(PostWasApproved::class, [Listener\ApproveContent::class, 'approveDiscussion']),
->listen(PostWasApproved::class, Listener\UpdateDiscussionAfterPostApproval::class)
->subscribe(Listener\ApproveContent::class)
->subscribe(Listener\UnapproveNewContent::class),
(new Extend\Policy())
->modelPolicy(Tag::class, Access\TagPolicy::class),
@@ -64,8 +62,8 @@ return [
->scope(Access\ScopePrivateDiscussionVisibility::class, 'viewPrivate'),
(new Extend\ModelPrivate(Discussion::class))
->checker([Listener\UnapproveNewContent::class, 'markUnapprovedContentAsPrivate']),
->checker(Listener\UnapproveNewContent::markUnapprovedContentAsPrivate(...)),
(new Extend\ModelPrivate(CommentPost::class))
->checker([Listener\UnapproveNewContent::class, 'markUnapprovedContentAsPrivate']),
->checker(Listener\UnapproveNewContent::markUnapprovedContentAsPrivate(...)),
];

View File

@@ -1,2 +1,2 @@
(()=>{var r={n:s=>{var e=s&&s.__esModule?()=>s.default:()=>s;return r.d(e,{a:e}),e},d:(s,e)=>{for(var a in e)r.o(e,a)&&!r.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:e[a]})},o:(r,s)=>Object.prototype.hasOwnProperty.call(r,s),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},s={};(()=>{"use strict";r.r(s);const e=flarum.core.compat["common/extend"],a=flarum.core.compat["admin/app"];var o=r.n(a);o().initializers.add("flarum-approval",(function(){(0,e.extend)(o(),"getRequiredPermissions",(function(r,s){"discussion.startWithoutApproval"===s&&r.push("startDiscussion"),"discussion.replyWithoutApproval"===s&&r.push("discussion.reply")})),o().extensionData.for("flarum-approval").registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.start_discussions_without_approval_label"),permission:"discussion.startWithoutApproval"},"start",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.reply_without_approval_label"),permission:"discussion.replyWithoutApproval"},"reply",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.approve_posts_label"),permission:"discussion.approvePosts"},"moderate",65)}))})(),module.exports=s})();
(()=>{var e={n:r=>{var s=r&&r.__esModule?()=>r.default:()=>r;return e.d(s,{a:s}),s},d:(r,s)=>{for(var o in s)e.o(s,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:s[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>i});const s=flarum.reg.get("core","common/extend"),o=flarum.reg.get("core","admin/app");var a=e.n(o);const t=flarum.reg.get("core","common/extenders"),i=[(new(e.n(t)().Admin)).permission((()=>({icon:"fas fa-check",label:a().translator.trans("flarum-approval.admin.permissions.start_discussions_without_approval_label"),permission:"discussion.startWithoutApproval"})),"start",95).permission((()=>({icon:"fas fa-check",label:a().translator.trans("flarum-approval.admin.permissions.reply_without_approval_label"),permission:"discussion.replyWithoutApproval"})),"reply",95).permission((()=>({icon:"fas fa-check",label:a().translator.trans("flarum-approval.admin.permissions.approve_posts_label"),permission:"discussion.approvePosts"})),"moderate",65)];a().initializers.add("flarum-approval",(()=>{(0,s.extend)(a(),"getRequiredPermissions",(function(e,r){"discussion.startWithoutApproval"===r&&e.push("startDiscussion"),"discussion.replyWithoutApproval"===r&&e.push("discussion.reply")}))}))})(),module.exports=r})();
//# sourceMappingURL=admin.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCGxDC,IAAAA,aAAAA,IAAqB,mBAAmB,YACtCC,EAAAA,EAAAA,QAAOD,IAAK,0BAA0B,SAAUE,EAAUC,GACrC,oCAAfA,GACFD,EAASE,KAAK,mBAEG,oCAAfD,GACFD,EAASE,KAAK,uBAIlBJ,IAAAA,cAAAA,IACO,mBACJK,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,8EAC5BG,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,kEAC5BG,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,yDAC5BG,WAAY,2BAEd,WACA,Q","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/approval/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/approval/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\n\napp.initializers.add('flarum-approval', () => {\n extend(app, 'getRequiredPermissions', function (required, permission) {\n if (permission === 'discussion.startWithoutApproval') {\n required.push('startDiscussion');\n }\n if (permission === 'discussion.replyWithoutApproval') {\n required.push('discussion.reply');\n }\n });\n\n app.extensionData\n .for('flarum-approval')\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.start_discussions_without_approval_label'),\n permission: 'discussion.startWithoutApproval',\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),\n permission: 'discussion.replyWithoutApproval',\n },\n 'reply',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),\n permission: 'discussion.approvePosts',\n },\n 'moderate',\n 65\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","required","permission","push","registerPermission","icon","label"],"sourceRoot":""}
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oBCE5D,IAAgB,I,MAAI,WAAeW,YAAW,KAAM,CAClDC,KAAM,eACNC,MAAO,eAAeC,MAAM,8EAC5BH,WAAY,qCACV,QAAS,IAAIA,YAAW,KAAM,CAChCC,KAAM,eACNC,MAAO,eAAeC,MAAM,kEAC5BH,WAAY,qCACV,QAAS,IAAIA,YAAW,KAAM,CAChCC,KAAM,eACNC,MAAO,eAAeC,MAAM,yDAC5BH,WAAY,6BACV,WAAY,KCXhB,iBAAiBI,IAAI,mBAAmB,MACtC,IAAAC,QAAO,IAAK,0BAA0B,SAAUC,EAAUN,GACrC,oCAAfA,GACFM,EAASC,KAAK,mBAEG,oCAAfP,GACFM,EAASC,KAAK,mBAElB,GAAE,G","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/approval/./src/admin/extend.tsx","webpack://@flarum/approval/./src/admin/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","import Extend from 'flarum/common/extenders';\nimport app from 'flarum/admin/app';\nexport default [new Extend.Admin().permission(() => ({\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.start_discussions_without_approval_label'),\n permission: 'discussion.startWithoutApproval'\n}), 'start', 95).permission(() => ({\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),\n permission: 'discussion.replyWithoutApproval'\n}), 'reply', 95).permission(() => ({\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),\n permission: 'discussion.approvePosts'\n}), 'moderate', 65)];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-approval', () => {\n extend(app, 'getRequiredPermissions', function (required, permission) {\n if (permission === 'discussion.startWithoutApproval') {\n required.push('startDiscussion');\n }\n if (permission === 'discussion.replyWithoutApproval') {\n required.push('discussion.reply');\n }\n });\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","permission","icon","label","trans","add","extend","required","push"],"sourceRoot":""}

View File

@@ -1,2 +1,2 @@
(()=>{var o={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},d:(t,r)=>{for(var e in r)o.o(r,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t);const r=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var a=o.n(e);const p=flarum.core.compat["common/models/Discussion"];var n=o.n(p);const s=flarum.core.compat["common/models/Post"];var i=o.n(s);const c=flarum.core.compat["common/components/Badge"];var u=o.n(c);const l=flarum.core.compat["forum/components/DiscussionListItem"];var d=o.n(l);const v=flarum.core.compat["forum/components/Post"];var f=o.n(v);const A=flarum.core.compat["forum/components/CommentPost"];var y=o.n(A);const b=flarum.core.compat["common/components/Button"];var g=o.n(b);const h=flarum.core.compat["forum/utils/PostControls"];var _=o.n(h);a().initializers.add("flarum-approval",(function(){n().prototype.isApproved=n().attribute("isApproved"),(0,r.extend)(n().prototype,"badges",(function(o){this.isApproved()||o.has("hidden")||o.add("awaitingApproval",m(u(),{type:"awaitingApproval",icon:"fas fa-gavel",label:a().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),i().prototype.isApproved=i().attribute("isApproved"),i().prototype.canApprove=i().attribute("canApprove"),(0,r.extend)(d().prototype,"elementAttrs",(function(o){this.attrs.discussion.isApproved()||(o.className+=" DiscussionListItem--unapproved")})),(0,r.extend)(f().prototype,"elementAttrs",(function(o){this.attrs.post.isApproved()||(o.className+=" Post--unapproved")})),(0,r.extend)(y().prototype,"headerItems",(function(o){this.attrs.post.isApproved()||this.attrs.post.isHidden()||o.add("unapproved",a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,r.override)(f().prototype,"flagReason",(function(o,t){return"approval"===t.type()?a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):o(t)})),(0,r.extend)(_(),"destructiveControls",(function(o,t){!t.isApproved()&&t.canApprove()&&o.add("approve",m(g(),{icon:"fas fa-check",onclick:_().approveAction.bind(t)},a().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),_().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports=t})();
(()=>{var t={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return t.d(r,{a:r}),r},d:(o,r)=>{for(var e in r)t.o(r,e)&&!t.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:r[e]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o)};(()=>{"use strict";const o=flarum.reg.get("core","common/extend"),r=flarum.reg.get("core","forum/app");var e=t.n(r);const a=flarum.reg.get("core","common/models/Discussion");var n=t.n(a);const p=flarum.reg.get("core","common/models/Post");var s=t.n(p);const i=flarum.reg.get("core","common/components/Badge");var c=t.n(i);const u=flarum.reg.get("core","forum/components/DiscussionListItem");var l=t.n(u);const d=flarum.reg.get("core","forum/components/Post");var v=t.n(d);const f=flarum.reg.get("core","forum/components/CommentPost");var g=t.n(f);const A=flarum.reg.get("core","common/components/Button");var h=t.n(A);const b=flarum.reg.get("core","forum/utils/PostControls");var y=t.n(b);e().initializers.add("flarum-approval",(()=>{n().prototype.isApproved=n().attribute("isApproved"),(0,o.extend)(n().prototype,"badges",(function(t){this.isApproved()||t.has("hidden")||t.add("awaitingApproval",m(c(),{type:"awaitingApproval",icon:"fas fa-gavel",label:e().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),s().prototype.isApproved=s().attribute("isApproved"),s().prototype.canApprove=s().attribute("canApprove"),(0,o.extend)(l().prototype,"elementAttrs",(function(t){this.attrs.discussion.isApproved()||(t.className+=" DiscussionListItem--unapproved")})),(0,o.extend)(v().prototype,"elementAttrs",(function(t){this.attrs.post.isApproved()||(t.className+=" Post--unapproved")})),(0,o.extend)(g().prototype,"headerItems",(function(t){this.attrs.post.isApproved()||this.attrs.post.isHidden()||t.add("unapproved",e().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,o.override)(v().prototype,"flagReason",(function(t,o){return"approval"===o.type()?e().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):t(o)})),(0,o.extend)(y(),"destructiveControls",(function(t,o){!o.isApproved()&&o.canApprove()&&t.add("approve",m(h(),{icon:"fas fa-check",onclick:y().approveAction.bind(o)},e().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),y().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports={}})();
//# sourceMappingURL=forum.js.map

File diff suppressed because one or more lines are too long

View File

@@ -5,8 +5,8 @@
"prettier": "@flarum/prettier-config",
"devDependencies": {
"prettier": "^2.5.1",
"flarum-webpack-config": "^2.0.0",
"webpack": "^5.65.0",
"flarum-webpack-config": "^3.0.0",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1",
"@flarum/prettier-config": "^1.0.0"
},

View File

@@ -1,43 +1,33 @@
import { extend } from 'flarum/common/extend';
import Extend from 'flarum/common/extenders';
import app from 'flarum/admin/app';
app.initializers.add('flarum-approval', () => {
extend(app, 'getRequiredPermissions', function (required, permission) {
if (permission === 'discussion.startWithoutApproval') {
required.push('startDiscussion');
}
if (permission === 'discussion.replyWithoutApproval') {
required.push('discussion.reply');
}
});
app.extensionData
.for('flarum-approval')
.registerPermission(
{
export default [
new Extend.Admin()
.permission(
() => ({
icon: 'fas fa-check',
label: app.translator.trans('flarum-approval.admin.permissions.start_discussions_without_approval_label'),
permission: 'discussion.startWithoutApproval',
},
}),
'start',
95
)
.registerPermission(
{
.permission(
() => ({
icon: 'fas fa-check',
label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),
permission: 'discussion.replyWithoutApproval',
},
}),
'reply',
95
)
.registerPermission(
{
.permission(
() => ({
icon: 'fas fa-check',
label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),
permission: 'discussion.approvePosts',
},
}),
'moderate',
65
);
});
),
];

View File

@@ -0,0 +1,15 @@
import { extend } from 'flarum/common/extend';
import app from 'flarum/admin/app';
export { default as extend } from './extend';
app.initializers.add('flarum-approval', () => {
extend(app, 'getRequiredPermissions', function (required, permission) {
if (permission === 'discussion.startWithoutApproval') {
required.push('startDiscussion');
}
if (permission === 'discussion.replyWithoutApproval') {
required.push('discussion.reply');
}
});
});

View File

@@ -0,0 +1,15 @@
{
// Use Flarum's tsconfig as a starting point
"extends": "flarum-tsconfig",
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
// and also tells your Typescript server to read core's global typings for
// access to `dayjs` and `$` in the global namespace.
"include": ["src/**/*", "../../../*/*/js/dist-typings/@types/**/*", "@types/**/*"],
"compilerOptions": {
// This will output typings to `dist-typings`
"declarationDir": "./dist-typings",
"paths": {
"flarum/*": ["../../../framework/core/js/dist-typings/*"]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -14,11 +14,7 @@ use Illuminate\Database\Eloquent\Builder;
class ScopePrivateDiscussionVisibility
{
/**
* @param Builder $query
* @param User $actor
*/
public function __invoke(User $actor, Builder $query)
public function __invoke(User $actor, Builder $query): void
{
// All statements need to be wrapped in an orWhere, since we're adding a
// subset of private discussions that should be visible, not restricting the visible

View File

@@ -9,17 +9,14 @@
namespace Flarum\Approval\Access;
use Closure;
use Flarum\Discussion\Discussion;
use Flarum\User\User;
use Illuminate\Database\Eloquent\Builder;
class ScopePrivatePostVisibility
{
/**
* @param Builder $query
* @param User $actor
*/
public function __invoke(User $actor, Builder $query)
public function __invoke(User $actor, Builder $query): void
{
// All statements need to be wrapped in an orWhere, since we're adding a
// subset of private posts that should be visible, not restricting the visible
@@ -39,14 +36,23 @@ class ScopePrivatePostVisibility
});
}
private function discussionWhereCanApprovePosts(User $actor)
/**
* Looks if the actor has permission to approve posts,
* within the discussion which the post is a part of.
*
* For example, the tags extension,
* turns the `approvePosts` ability into per tag basis.
*/
private function discussionWhereCanApprovePosts(User $actor): Closure
{
return function ($query) use ($actor) {
$query->selectRaw('1')
->from('discussions')
->whereColumn('discussions.id', 'posts.discussion_id')
->where(function ($query) use ($actor) {
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
$query->whereRaw('1 != 1')->orWhere(function ($query) use ($actor) {
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
});
});
};
}

View File

@@ -15,10 +15,7 @@ use Flarum\User\User;
class TagPolicy extends AbstractPolicy
{
/**
* @return bool|null
*/
public function addToDiscussion(User $actor, Tag $tag)
public function addToDiscussion(User $actor, Tag $tag): bool
{
return $actor->can('discussion.startWithoutApproval', $tag);
}

View File

@@ -0,0 +1,29 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Approval\Api;
use Flarum\Api\Context;
use Flarum\Api\Schema;
use Flarum\Post\Post;
class PostResourceFields
{
public function __invoke(): array
{
return [
Schema\Boolean::make('isApproved')
->writable(fn (Post $post, Context $context) => $context->getActor()->can('approve', $post))
// set by the ApproveContent listener.
->set(fn () => null),
Schema\Boolean::make('canApprove')
->get(fn (Post $post, Context $context) => $context->getActor()->can('approvePosts', $post->discussion)),
];
}
}

Some files were not shown because too many files have changed in this diff Show More