mirror of
https://github.com/flarum/core.git
synced 2025-08-17 13:54:18 +02:00
Compare commits
89 Commits
as/better-
...
v1.3.1
Author | SHA1 | Date | |
---|---|---|---|
|
535052e3dc | ||
|
c2ba3bb7d5 | ||
|
b7332895db | ||
|
0a3f449f9e | ||
|
df1bdd2ad8 | ||
|
8e2a99c1eb | ||
|
e45547c649 | ||
|
29362ed924 | ||
|
eb4bac3b8f | ||
|
584884a3c9 | ||
|
96ead2a4df | ||
|
556f10ddd8 | ||
|
a79e2c20fe | ||
|
89b194034b | ||
|
01c54b13c8 | ||
|
24c8c65aa5 | ||
|
17de76f326 | ||
|
d3008d1e62 | ||
|
471947dfa7 | ||
|
2f506f1b24 | ||
|
81cf6047f9 | ||
|
57d3c9a99a | ||
|
999b345db1 | ||
|
5e2f952fe6 | ||
|
899b931b89 | ||
|
0431f15ac0 | ||
|
6c57470b13 | ||
|
6ca2ebc437 | ||
|
dd915c126c | ||
|
62ffe5ffdf | ||
|
592039c483 | ||
|
2f64f023b2 | ||
|
316a2067b6 | ||
|
de8d0d1d37 | ||
|
aea1a4cf63 | ||
|
7f5593021d | ||
|
f9ae7cd67f | ||
|
843a613cda | ||
|
da83e0c1a0 | ||
|
903026a7e4 | ||
|
1954d0383e | ||
|
2e89ba3c94 | ||
|
b14c0780d2 | ||
|
d465fd27bc | ||
|
ffc9f9f5a4 | ||
|
290bc19922 | ||
|
863a8ddfff | ||
|
b8df3863d1 | ||
|
4cb15501a2 | ||
|
42602a099f | ||
|
be2da3e12f | ||
|
09bed537b3 | ||
|
fb717db57c | ||
|
cca97f32c6 | ||
|
c658eb10f4 | ||
|
f667faa1bd | ||
|
542cc42538 | ||
|
518b39610e | ||
|
6de1ea0194 | ||
|
b5e5ae8c4c | ||
|
b0fa795cc9 | ||
|
c944fd0029 | ||
|
98e607a704 | ||
|
9a0bdf9a04 | ||
|
431ba30434 | ||
|
45aba446b3 | ||
|
9f7c5defaa | ||
|
2541349c68 | ||
|
1d27f62c15 | ||
|
9d9594a098 | ||
|
7c3da27fb3 | ||
|
402ace2070 | ||
|
ca7055f5d0 | ||
|
4dfbaa3271 | ||
|
cd8ed6cf66 | ||
|
cf8359daa4 | ||
|
803f4cc792 | ||
|
a7dd0b2b61 | ||
|
00b9151864 | ||
|
e25c53c00f | ||
|
6839c9436f | ||
|
3ae113b897 | ||
|
6a65993ea5 | ||
|
65dd37278b | ||
|
e429558d0e | ||
|
105481a181 | ||
|
b95b3646d3 | ||
|
b64003cba5 | ||
|
46f8cf4628 |
23
.github/ISSUE_TEMPLATE/feature-request.md
vendored
23
.github/ISSUE_TEMPLATE/feature-request.md
vendored
@@ -1,26 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: "🚀 Feature Request"
|
name: "🚀 Feature Request"
|
||||||
about: "I have a suggestion (and may want to implement it!)"
|
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.
|
||||||
IMPORTANT: Feature requests on this GitHub issue tracker are only accepted in case they have been approved by a core developer or contain extensive argumentation and directions for implementation. For all other feature requests, ideas and feedback please post in the Flarum Community: https://discuss.flarum.org/t/feedback.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. eg. I have an issue when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A detailed description of your proposed solution. Include:
|
|
||||||
- How the feature would work/behave
|
|
||||||
- Any potential drawbacks
|
|
||||||
- Maybe a screenshot, design, or example code
|
|
||||||
|
|
||||||
**Justify why this feature belongs in Flarum's core, rather than in a third-party extension**
|
|
||||||
Consider who this change will be useful to – most Flarum forums, or just a few?
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
2
.github/ISSUE_TEMPLATE/support-question.md
vendored
2
.github/ISSUE_TEMPLATE/support-question.md
vendored
@@ -4,7 +4,7 @@ about: "If you have a question, please check out our forum or Discord!"
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below. Thanks!
|
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/
|
* Flarum Community: https://discuss.flarum.org/
|
||||||
* Discord Chat: https://flarum.org/discord/
|
* Discord Chat: https://flarum.org/discord/
|
||||||
|
15
.github/workflows/flarum-package-manager-backend.yml
vendored
Normal file
15
.github/workflows/flarum-package-manager-backend.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
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
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
vendor
|
||||||
|
composer.lock
|
||||||
|
File diff suppressed because it is too large
Load Diff
182
composer.json
Normal file
182
composer.json
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
{
|
||||||
|
"name": "flarum/framework",
|
||||||
|
"description": "Delightfully simple forum software.",
|
||||||
|
"keywords": [
|
||||||
|
"forum",
|
||||||
|
"discussion"
|
||||||
|
],
|
||||||
|
"homepage": "https://flarum.org/",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Flarum",
|
||||||
|
"email": "info@flarum.org",
|
||||||
|
"homepage": "https://flarum.org/team"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "other",
|
||||||
|
"url": "https://flarum.org/donate"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/flarum/core/issues",
|
||||||
|
"source": "https://github.com/flarum/core",
|
||||||
|
"docs": "https://docs.flarum.org",
|
||||||
|
"forum": "https://discuss.flarum.org",
|
||||||
|
"chat": "https://flarum.org/chat"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\": "framework/core/src",
|
||||||
|
"Flarum\\Akismet\\": "extensions/akismet/src",
|
||||||
|
"Flarum\\Approval\\": "extensions/approval/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\\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\\PHPStan\\": "php-packages/phpstan/src",
|
||||||
|
"Flarum\\Testing\\": "php-packages/testing/src"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"framework/core/src/helpers.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"flarum/core": "self.version",
|
||||||
|
"flarum/akismet": "self.version",
|
||||||
|
"flarum/approval": "self.version",
|
||||||
|
"flarum/bbcode": "self.version",
|
||||||
|
"flarum/embed": "self.version",
|
||||||
|
"flarum/emoji": "self.version",
|
||||||
|
"flarum/flags": "self.version",
|
||||||
|
"flarum/lang-english": "self.version",
|
||||||
|
"flarum/likes": "self.version",
|
||||||
|
"flarum/lock": "self.version",
|
||||||
|
"flarum/markdown": "self.version",
|
||||||
|
"flarum/mentions": "self.version",
|
||||||
|
"flarum/nicknames": "self.version",
|
||||||
|
"flarum/package-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/phpstan": "self.version",
|
||||||
|
"flarum/testing": "self.version"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"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",
|
||||||
|
"matthiasmullie/minify": "^1.3",
|
||||||
|
"middlewares/base-path": "^2.0.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"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"phpunit/phpunit": "^9.0",
|
||||||
|
"phpstan/phpstan-php-parser": "^1.0",
|
||||||
|
"phpstan/phpstan": "^1.2"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"extra": {
|
||||||
|
"flarum-subextensions": [
|
||||||
|
"extensions/akismet",
|
||||||
|
"extensions/approval",
|
||||||
|
"extensions/bbcode",
|
||||||
|
"extensions/embed",
|
||||||
|
"extensions/emoji",
|
||||||
|
"extensions/flags",
|
||||||
|
"extensions/lang-english",
|
||||||
|
"extensions/likes",
|
||||||
|
"extensions/lock",
|
||||||
|
"extensions/markdown",
|
||||||
|
"extensions/mentions",
|
||||||
|
"extensions/nicknames",
|
||||||
|
"extensions/package-manager",
|
||||||
|
"extensions/pusher",
|
||||||
|
"extensions/statistics",
|
||||||
|
"extensions/sticky",
|
||||||
|
"extensions/subscriptions",
|
||||||
|
"extensions/suspend",
|
||||||
|
"extensions/tags"
|
||||||
|
],
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.x-dev"
|
||||||
|
},
|
||||||
|
"phpstan": {
|
||||||
|
"includes": [
|
||||||
|
"extension.neon"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.3",
|
||||||
"flarum/approval": "^1.2",
|
"flarum/approval": "^1.2",
|
||||||
"guzzlehttp/guzzle": "^7.4"
|
"guzzlehttp/guzzle": "^7.4"
|
||||||
},
|
},
|
||||||
|
2
extensions/akismet/js/dist/forum.js
generated
vendored
2
extensions/akismet/js/dist/forum.js
generated
vendored
@@ -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 u=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();o&&o.some((function(t){return"akismet"===t.type()}))&&(t.get("approve").children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}})),(0,o.override)(u().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 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})();
|
||||||
//# sourceMappingURL=forum.js.map
|
//# sourceMappingURL=forum.js.map
|
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
@@ -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,aCQxDC,IAAAA,aAAAA,IAAqB,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAiBC,GACrE,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEfA,GAASA,EAAMC,MAAK,SAACC,GAAD,MAA0B,YAAhBA,EAAKC,YACrCN,EAAMf,IAAI,WAAWsB,SAAWV,IAAAA,WAAAA,MAAqB,mDAK3DW,EAAAA,EAAAA,UAASC,IAAAA,UAAuB,cAAc,SAAUC,EAAUL,GAChE,MAAoB,YAAhBA,EAAKC,OACAT,IAAAA,WAAAA,MAAqB,kDAGvBa,EAASL,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';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Post from 'flarum/common/models/Post';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag.type() === 'akismet')) {\n items.get('approve').children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\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","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,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":""}
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.3",
|
||||||
"flarum/flags": "^1.2"
|
"flarum/flags": "^1.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@@ -24,7 +24,7 @@ class UnapproveNewContent
|
|||||||
$post = $event->post;
|
$post = $event->post;
|
||||||
|
|
||||||
if (! $post->exists) {
|
if (! $post->exists) {
|
||||||
$ability = $post->discussion->post_number_index == 0 ? 'startWithoutApproval' : 'replyWithoutApproval';
|
$ability = $post->discussion->first_post_id === null ? 'startWithoutApproval' : 'replyWithoutApproval';
|
||||||
|
|
||||||
if ($event->actor->can($ability, $post->discussion)) {
|
if ($event->actor->can($ability, $post->discussion)) {
|
||||||
if ($post->is_approved === null) {
|
if ($post->is_approved === null) {
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/embed/js/dist/forum.js
generated
vendored
2
extensions/embed/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/embed/js/dist/forum.js.map
generated
vendored
2
extensions/embed/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
2
extensions/emoji/js/dist/forum.js
generated
vendored
2
extensions/emoji/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -4,18 +4,18 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"prettier": "@flarum/prettier-config",
|
"prettier": "@flarum/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"simple-emoji-map": "^0.4.1",
|
"simple-emoji-map": "^0.5.1",
|
||||||
"twemoji": "^13.1.0"
|
"twemoji": "^14.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^2.5.1",
|
|
||||||
"flarum-webpack-config": "^2.0.0",
|
|
||||||
"webpack": "^5.65.0",
|
|
||||||
"webpack-cli": "^4.9.1",
|
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"flarum-tsconfig": "^1.0.2",
|
||||||
|
"flarum-webpack-config": "^2.0.0",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
"typescript": "^4.5.4",
|
"typescript": "^4.5.4",
|
||||||
"typescript-coverage-report": "^0.6.1"
|
"typescript-coverage-report": "^0.6.1",
|
||||||
|
"webpack": "^5.65.0",
|
||||||
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
4
extensions/flags/js/dist-typings/forum/components/FlagList.d.ts
generated
vendored
4
extensions/flags/js/dist-typings/forum/components/FlagList.d.ts
generated
vendored
@@ -1,7 +1,5 @@
|
|||||||
export default class FlagList extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
|
export default class FlagList {
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
state: any;
|
state: any;
|
||||||
view(): JSX.Element;
|
view(): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "flarum/common/Component";
|
|
||||||
|
17
extensions/flags/js/dist-typings/forum/components/FlagPostModal.d.ts
generated
vendored
17
extensions/flags/js/dist-typings/forum/components/FlagPostModal.d.ts
generated
vendored
@@ -1,15 +1,12 @@
|
|||||||
/// <reference types="flarum/@types/translator-icu-rich" />
|
export default class FlagPostModal {
|
||||||
export default class FlagPostModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
|
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
success: boolean | undefined;
|
success: boolean | undefined;
|
||||||
reason: Stream<string> | undefined;
|
reason: any;
|
||||||
reasonDetail: Stream<string> | undefined;
|
reasonDetail: any;
|
||||||
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
|
className(): string;
|
||||||
|
title(): any;
|
||||||
content(): JSX.Element;
|
content(): JSX.Element;
|
||||||
flagReasons(): ItemList<any>;
|
flagReasons(): any;
|
||||||
onsubmit(e: any): void;
|
onsubmit(e: any): void;
|
||||||
|
loading: boolean | undefined;
|
||||||
}
|
}
|
||||||
import Modal from "flarum/common/components/Modal";
|
|
||||||
import Stream from "flarum/common/utils/Stream";
|
|
||||||
import ItemList from "flarum/common/utils/ItemList";
|
|
||||||
|
2
extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts
generated
vendored
2
extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts
generated
vendored
@@ -3,5 +3,5 @@ export default class FlagsDropdown {
|
|||||||
getMenu(): JSX.Element;
|
getMenu(): JSX.Element;
|
||||||
goToRoute(): void;
|
goToRoute(): void;
|
||||||
getUnreadCount(): any;
|
getUnreadCount(): any;
|
||||||
getNewCount(): unknown;
|
getNewCount(): any;
|
||||||
}
|
}
|
||||||
|
14
extensions/flags/js/dist-typings/forum/models/Flag.d.ts
generated
vendored
14
extensions/flags/js/dist-typings/forum/models/Flag.d.ts
generated
vendored
@@ -1,11 +1,9 @@
|
|||||||
import Model from 'flarum/common/Model';
|
import Model from 'flarum/common/Model';
|
||||||
import Post from 'flarum/common/models/Post';
|
|
||||||
import User from 'flarum/common/models/User';
|
|
||||||
export default class Flag extends Model {
|
export default class Flag extends Model {
|
||||||
type(): string;
|
type(): any;
|
||||||
reason(): string | null;
|
reason(): any;
|
||||||
reasonDetail(): string | null;
|
reasonDetail(): any;
|
||||||
createdAt(): Date | null | undefined;
|
createdAt(): any;
|
||||||
post(): false | Post;
|
post(): any;
|
||||||
user(): false | User | null;
|
user(): any;
|
||||||
}
|
}
|
||||||
|
2
extensions/flags/js/dist/admin.js
generated
vendored
2
extensions/flags/js/dist/admin.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=24)}({24:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r.n(n);a.a.initializers.add("flarum-flags",(function(){a.a.extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:a.a.translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:a.a.translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))},5:function(e,t){e.exports=flarum.core.compat["admin/app"]}});
|
(()=>{var e={n:a=>{var s=a&&a.__esModule?()=>a.default:()=>a;return e.d(s,{a:s}),s},d:(a,s)=>{for(var l in s)e.o(s,l)&&!e.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:s[l]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};(()=>{"use strict";e.r(a);const s=flarum.core.compat["admin/app"];var l=e.n(s);l().initializers.add("flarum-flags",(function(){l().extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:l().translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:l().translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:l().translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:l().translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))})(),module.exports=a})();
|
||||||
//# sourceMappingURL=admin.js.map
|
//# sourceMappingURL=admin.js.map
|
2
extensions/flags/js/dist/admin.js.map
generated
vendored
2
extensions/flags/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/flags/js/dist/forum.js
generated
vendored
2
extensions/flags/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/flags/js/dist/forum.js.map
generated
vendored
2
extensions/flags/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/lock/js/dist/forum.js.map
generated
vendored
2
extensions/lock/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
2
extensions/markdown/js/dist/admin.js.map
generated
vendored
2
extensions/markdown/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/markdown/js/dist/forum.js.map
generated
vendored
2
extensions/markdown/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/mentions/js/dist/forum.js.map
generated
vendored
2
extensions/mentions/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -125,10 +125,13 @@ class ConfigureMentions
|
|||||||
{
|
{
|
||||||
$post = CommentPost::find($tag->getAttribute('id'));
|
$post = CommentPost::find($tag->getAttribute('id'));
|
||||||
|
|
||||||
if ($post && $post->user) {
|
if ($post) {
|
||||||
$tag->setAttribute('discussionid', (int) $post->discussion_id);
|
$tag->setAttribute('discussionid', (int) $post->discussion_id);
|
||||||
$tag->setAttribute('number', (int) $post->number);
|
$tag->setAttribute('number', (int) $post->number);
|
||||||
$tag->setAttribute('displayname', $post->user->display_name);
|
|
||||||
|
if ($post->user) {
|
||||||
|
$tag->setAttribute('displayname', $post->user->display_name);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ class FormatUserMentions
|
|||||||
public function __invoke(Renderer $renderer, $context, string $xml)
|
public function __invoke(Renderer $renderer, $context, string $xml)
|
||||||
{
|
{
|
||||||
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
||||||
$user = (isset($context->getRelations()['mentionsUsers']) || $context instanceof Post)
|
$user = (($context && isset($context->getRelations()['mentionsUsers'])) || $context instanceof Post)
|
||||||
? $context->mentionsUsers->find($attributes['id'])
|
? $context->mentionsUsers->find($attributes['id'])
|
||||||
: User::find($attributes['id']);
|
: User::find($attributes['id']);
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ class UnparseUserMentions
|
|||||||
protected function updateUserMentionTags($context, string $xml): string
|
protected function updateUserMentionTags($context, string $xml): string
|
||||||
{
|
{
|
||||||
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
||||||
$user = (isset($context->getRelations()['mentionsUsers']) || $context instanceof Post)
|
$user = (($context && isset($context->getRelations()['mentionsUsers'])) || $context instanceof Post)
|
||||||
? $context->mentionsUsers->find($attributes['id'])
|
? $context->mentionsUsers->find($attributes['id'])
|
||||||
: User::find($attributes['id']);
|
: User::find($attributes['id']);
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/nicknames/js/dist/forum.js.map
generated
vendored
2
extensions/nicknames/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -40,7 +40,7 @@ class AddNicknameValidation
|
|||||||
function ($attribute, $value, $fail) {
|
function ($attribute, $value, $fail) {
|
||||||
$regex = $this->settings->get('flarum-nicknames.regex');
|
$regex = $this->settings->get('flarum-nicknames.regex');
|
||||||
if ($regex && ! preg_match_all("/$regex/", $value)) {
|
if ($regex && ! preg_match_all("/$regex/", $value)) {
|
||||||
$this->translator->trans('flarum-nicknames.api.invalid_nickname_message');
|
$fail($this->translator->trans('flarum-nicknames.api.invalid_nickname_message'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'min:'.$this->settings->get('flarum-nicknames.min'),
|
'min:'.$this->settings->get('flarum-nicknames.min'),
|
||||||
|
@@ -74,4 +74,48 @@ class RegisterTest extends TestCase
|
|||||||
|
|
||||||
$this->assertEquals(403, $response->getStatusCode());
|
$this->assertEquals(403, $response->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function cant_register_with_nickname_if_invalid_regex()
|
||||||
|
{
|
||||||
|
$this->setting('flarum-nicknames.set_on_registration', true);
|
||||||
|
$this->setting('flarum-nicknames.regex', '^[A-z]+$');
|
||||||
|
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('POST', '/register', [
|
||||||
|
'json' => [
|
||||||
|
'nickname' => '007',
|
||||||
|
'username' => 'test',
|
||||||
|
'password' => 'too-obscure',
|
||||||
|
'email' => 'test@machine.local',
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(422, $response->getStatusCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_register_with_nickname_if_valid_regex()
|
||||||
|
{
|
||||||
|
$this->setting('flarum-nicknames.set_on_registration', true);
|
||||||
|
$this->setting('flarum-nicknames.regex', '^[A-z]+$');
|
||||||
|
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('POST', '/register', [
|
||||||
|
'json' => [
|
||||||
|
'nickname' => 'Acme',
|
||||||
|
'username' => 'test',
|
||||||
|
'password' => 'too-obscure',
|
||||||
|
'email' => 'test@machine.local',
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(201, $response->getStatusCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.0.0",
|
"flarum/core": "^1.0.0",
|
||||||
"composer/composer": "^2.0"
|
"composer/composer": "^2.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"flarum/testing": "^1.0.0",
|
"flarum/testing": "^1.0.0",
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
"test:integration": "phpunit -c tests/phpunit.integration.xml",
|
"test:integration": "phpunit -c tests/phpunit.integration.xml",
|
||||||
"test:setup": [
|
"test:setup": [
|
||||||
"@php tests/integration/setup.php",
|
"@php tests/integration/setup.php",
|
||||||
"cd $FLARUM_TEST_TMP_DIR_LOCAL && composer install"
|
"cd ${FLARUM_TEST_TMP_DIR_LOCAL:-${FLARUM_TEST_TMP_DIR:-./tests/integration/tmp}} && composer install"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts-descriptions": {
|
"scripts-descriptions": {
|
||||||
|
3
extensions/package-manager/js/dist-typings/components/WhyNotModal.d.ts
generated
vendored
3
extensions/package-manager/js/dist-typings/components/WhyNotModal.d.ts
generated
vendored
@@ -1,4 +1,3 @@
|
|||||||
/// <reference path="../../../vendor/flarum/core/js/src/common/translator-icu-rich.d.ts" />
|
|
||||||
import Mithril from 'mithril';
|
import Mithril from 'mithril';
|
||||||
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
|
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
|
||||||
export interface WhyNotModalAttrs extends IInternalModalAttrs {
|
export interface WhyNotModalAttrs extends IInternalModalAttrs {
|
||||||
@@ -8,7 +7,7 @@ export default class WhyNotModal<Attrs extends WhyNotModalAttrs = WhyNotModalAtt
|
|||||||
loading: boolean;
|
loading: boolean;
|
||||||
whyNot: string | null;
|
whyNot: string | null;
|
||||||
className(): string;
|
className(): string;
|
||||||
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
|
title(): any;
|
||||||
oncreate(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
oncreate(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||||
content(): JSX.Element;
|
content(): JSX.Element;
|
||||||
requestWhyNot(): void;
|
requestWhyNot(): void;
|
||||||
|
1211
extensions/package-manager/js/dist/admin.js
generated
vendored
1211
extensions/package-manager/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/package-manager/js/dist/admin.js.map
generated
vendored
2
extensions/package-manager/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -58,7 +58,7 @@ class CheckForUpdatesHandler
|
|||||||
$actor->assertAdmin();
|
$actor->assertAdmin();
|
||||||
|
|
||||||
$firstOutput = $this->runComposerCommand(false);
|
$firstOutput = $this->runComposerCommand(false);
|
||||||
$firstOutput = json_decode($firstOutput, true);
|
$firstOutput = json_decode($this->cleanJson($firstOutput), true);
|
||||||
|
|
||||||
$majorUpdates = false;
|
$majorUpdates = false;
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ class CheckForUpdatesHandler
|
|||||||
|
|
||||||
if ($majorUpdates) {
|
if ($majorUpdates) {
|
||||||
$secondOutput = $this->runComposerCommand(true);
|
$secondOutput = $this->runComposerCommand(true);
|
||||||
$secondOutput = json_decode($secondOutput, true);
|
$secondOutput = json_decode($this->cleanJson($secondOutput), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($secondOutput)) {
|
if (! isset($secondOutput)) {
|
||||||
@@ -101,6 +101,15 @@ class CheckForUpdatesHandler
|
|||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Composer can sometimes return text above the JSON.
|
||||||
|
* This method tries to remove such occurences.
|
||||||
|
*/
|
||||||
|
protected function cleanJson(string $composerOutput): string
|
||||||
|
{
|
||||||
|
return preg_replace('/^[^{]+\n({.*)/ms', '$1', $composerOutput);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ComposerCommandFailedException
|
* @throws ComposerCommandFailedException
|
||||||
*/
|
*/
|
||||||
|
@@ -15,27 +15,11 @@ class SetupComposer
|
|||||||
{
|
{
|
||||||
use UsesTmpDir;
|
use UsesTmpDir;
|
||||||
|
|
||||||
private $config = [
|
private $config;
|
||||||
'require' => [
|
|
||||||
'flarum/core' => '1.0.0',
|
|
||||||
'flarum/tags' => '1.0.3',
|
|
||||||
'flarum/lang-english' => '*',
|
|
||||||
],
|
|
||||||
'config' => [
|
|
||||||
'preferred-install' => 'dist',
|
|
||||||
'sort-packages' => true,
|
|
||||||
],
|
|
||||||
'repositories' => [
|
|
||||||
[
|
|
||||||
'type' => 'path',
|
|
||||||
'url' => __DIR__.'/tmp/packages/*',
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
public function __construct(array $config = null)
|
public function __construct(array $config = null)
|
||||||
{
|
{
|
||||||
$this->config = array_merge($this->config, $config ?? []);
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
@@ -44,7 +28,7 @@ class SetupComposer
|
|||||||
$composerLock = $this->tmpDir().'/composer.lock';
|
$composerLock = $this->tmpDir().'/composer.lock';
|
||||||
$packages = $this->tmpDir().'/packages';
|
$packages = $this->tmpDir().'/packages';
|
||||||
|
|
||||||
file_put_contents($composerJson, json_encode($this->config, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
file_put_contents($composerJson, json_encode($this->getConfig(), JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
if (! file_exists($packages)) {
|
if (! file_exists($packages)) {
|
||||||
mkdir($packages);
|
mkdir($packages);
|
||||||
@@ -53,5 +37,28 @@ class SetupComposer
|
|||||||
if (file_exists($composerLock)) {
|
if (file_exists($composerLock)) {
|
||||||
unlink($composerLock);
|
unlink($composerLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo 'composer.json created with testing packages directory.';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getConfig(): array
|
||||||
|
{
|
||||||
|
return array_merge([
|
||||||
|
'require' => [
|
||||||
|
'flarum/core' => '1.0.0',
|
||||||
|
'flarum/tags' => '1.0.3',
|
||||||
|
'flarum/lang-english' => '*',
|
||||||
|
],
|
||||||
|
'config' => [
|
||||||
|
'preferred-install' => 'dist',
|
||||||
|
'sort-packages' => true,
|
||||||
|
],
|
||||||
|
'repositories' => [
|
||||||
|
[
|
||||||
|
'type' => 'path',
|
||||||
|
'url' => realpath($this->tmpDir()).'/packages/*',
|
||||||
|
]
|
||||||
|
]
|
||||||
|
], $this->config ?? []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,10 +19,7 @@
|
|||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Flarum Integration Tests">
|
<testsuite name="Flarum Integration Tests">
|
||||||
<directory suffix="Test.php">./integration</directory>
|
<directory suffix="Test.php">./integration</directory>
|
||||||
<exclude>./integration/tmp</exclude>
|
<exclude>./integration/tmp</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<php>
|
|
||||||
<env name="FLARUM_TEST_TMP_DIR_LOCAL" value="tests/integration/tmp" force="true" />
|
|
||||||
</php>
|
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.3",
|
||||||
"pusher/pusher-php-server": "^2.2"
|
"pusher/pusher-php-server": "^2.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
2
extensions/pusher/js/dist/forum.js
generated
vendored
2
extensions/pusher/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/pusher/js/dist/forum.js.map
generated
vendored
2
extensions/pusher/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/statistics/js/dist/admin.js.map
generated
vendored
2
extensions/statistics/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/sticky/js/dist/forum.js.map
generated
vendored
2
extensions/sticky/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
"prettier": true,
|
"prettier": true,
|
||||||
"typescript": false,
|
"typescript": false,
|
||||||
"bundlewatch": false,
|
"bundlewatch": false,
|
||||||
"backendTesting": false,
|
"backendTesting": true,
|
||||||
"editorConfig": true,
|
"editorConfig": true,
|
||||||
"styleci": true
|
"styleci": true
|
||||||
}
|
}
|
||||||
@@ -64,5 +64,28 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true
|
"prefer-stable": true,
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\Subscriptions\\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": "^1.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
extensions/subscriptions/js/dist/forum.js
generated
vendored
2
extensions/subscriptions/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/subscriptions/js/dist/forum.js.map
generated
vendored
2
extensions/subscriptions/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -38,7 +38,13 @@ export default function addSubscriptionFilter() {
|
|||||||
|
|
||||||
extend(DiscussionListState.prototype, 'requestParams', function (params) {
|
extend(DiscussionListState.prototype, 'requestParams', function (params) {
|
||||||
if (this.params.onFollowing) {
|
if (this.params.onFollowing) {
|
||||||
params.filter.subscription = 'following';
|
params.filter ||= {};
|
||||||
|
|
||||||
|
if (params.filter.q) {
|
||||||
|
params.filter.q += ' is:following';
|
||||||
|
} else {
|
||||||
|
params.filter.subscription = 'following';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ class SendReplyNotification implements ShouldQueue
|
|||||||
$notify = $discussion->readers()
|
$notify = $discussion->readers()
|
||||||
->where('users.id', '!=', $post->user_id)
|
->where('users.id', '!=', $post->user_id)
|
||||||
->where('discussion_user.subscription', 'follow')
|
->where('discussion_user.subscription', 'follow')
|
||||||
->where('discussion_user.last_read_post_number', $this->lastPostNumber)
|
->where('discussion_user.last_read_post_number', $this->lastPostNumber - 1)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$notifications->sync(
|
$notifications->sync(
|
||||||
|
0
extensions/subscriptions/tests/fixtures/.gitkeep
vendored
Normal file
0
extensions/subscriptions/tests/fixtures/.gitkeep
vendored
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<?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\Subscriptions\tests\integration\api\discussions;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||||
|
use Flarum\Testing\integration\TestCase;
|
||||||
|
use Flarum\User\User;
|
||||||
|
|
||||||
|
class ReplyNotificationTest extends TestCase
|
||||||
|
{
|
||||||
|
use RetrievesAuthorizedUsers;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->extension('flarum-subscriptions');
|
||||||
|
|
||||||
|
$this->prepareDatabase([
|
||||||
|
'users' => [
|
||||||
|
$this->normalUser(),
|
||||||
|
],
|
||||||
|
'discussions' => [
|
||||||
|
['id' => 1, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 1, 'first_post_id' => 1, 'comment_count' => 1, 'last_post_number' => 1, 'last_post_id' => 1],
|
||||||
|
['id' => 2, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 1, 'first_post_id' => 2, 'comment_count' => 1, 'last_post_number' => 1, 'last_post_id' => 2],
|
||||||
|
],
|
||||||
|
'posts' => [
|
||||||
|
['id' => 1, 'discussion_id' => 1, 'created_at' => Carbon::createFromDate(1975, 5, 21)->toDateTimeString(), 'user_id' => 1, 'type' => 'comment', 'content' => '<t><p>foo bar</p></t>', 'number' => 1],
|
||||||
|
['id' => 2, 'discussion_id' => 2, 'created_at' => Carbon::createFromDate(1975, 5, 21)->toDateTimeString(), 'user_id' => 1, 'type' => 'comment', 'content' => '<t><p>foo bar</p></t>', 'number' => 1],
|
||||||
|
],
|
||||||
|
'discussion_user' => [
|
||||||
|
['discussion_id' => 1, 'user_id' => 1, 'last_read_post_number' => 1, 'subscription' => 'follow'],
|
||||||
|
['discussion_id' => 2, 'user_id' => 1, 'last_read_post_number' => 1, 'subscription' => 'follow'],
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function replying_to_a_discussion_with_comment_post_as_last_post_sends_reply_notification()
|
||||||
|
{
|
||||||
|
$this->app();
|
||||||
|
|
||||||
|
/** @var User $mainUser */
|
||||||
|
$mainUser = User::query()->find(1);
|
||||||
|
|
||||||
|
$this->assertEquals(0, $this->getUnreadNotificationCount($mainUser));
|
||||||
|
|
||||||
|
$this->send(
|
||||||
|
$this->request('POST', '/api/posts', [
|
||||||
|
'authenticatedAs' => 2,
|
||||||
|
'json' => [
|
||||||
|
'data' => [
|
||||||
|
'attributes' => [
|
||||||
|
'content' => 'reply with predetermined content for automated testing - too-obscure',
|
||||||
|
],
|
||||||
|
'relationships' => [
|
||||||
|
'discussion' => ['data' => ['id' => 1]],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(1, $this->getUnreadNotificationCount($mainUser));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function replying_to_a_discussion_with_event_post_as_last_post_sends_reply_notification()
|
||||||
|
{
|
||||||
|
$this->app();
|
||||||
|
|
||||||
|
/** @var User $mainUser */
|
||||||
|
$mainUser = User::query()->find(1);
|
||||||
|
|
||||||
|
// Rename the discussion to trigger an event post.
|
||||||
|
$this->send(
|
||||||
|
$this->request('POST', '/api/discussions/2', [
|
||||||
|
'authenticatedAs' => 1,
|
||||||
|
'json' => [
|
||||||
|
'data' => [
|
||||||
|
'attributes' => [
|
||||||
|
'title' => 'ACME',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
// Mark as read
|
||||||
|
$this->send(
|
||||||
|
$this->request('POST', '/api/discussions/2', [
|
||||||
|
'authenticatedAs' => 1,
|
||||||
|
'json' => [
|
||||||
|
'data' => [
|
||||||
|
'attributes' => [
|
||||||
|
'lastReadPostNumber' => 2,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(0, $this->getUnreadNotificationCount($mainUser));
|
||||||
|
|
||||||
|
$this->send(
|
||||||
|
$this->request('POST', '/api/posts', [
|
||||||
|
'authenticatedAs' => 2,
|
||||||
|
'json' => [
|
||||||
|
'data' => [
|
||||||
|
'attributes' => [
|
||||||
|
'content' => 'reply with predetermined content for automated testing - too-obscure',
|
||||||
|
],
|
||||||
|
'relationships' => [
|
||||||
|
'discussion' => ['data' => ['id' => 2]],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(1, $this->getUnreadNotificationCount($mainUser));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @todo change after core no longer statically caches unread notification in the User class */
|
||||||
|
protected function getUnreadNotificationCount(User $user)
|
||||||
|
{
|
||||||
|
return $user->notifications()
|
||||||
|
->where('type', 'newPost')
|
||||||
|
->whereNull('read_at')
|
||||||
|
->where('is_deleted', false)
|
||||||
|
->whereSubjectVisibleTo($user)
|
||||||
|
->count();
|
||||||
|
}
|
||||||
|
}
|
16
extensions/subscriptions/tests/integration/setup.php
Normal file
16
extensions/subscriptions/tests/integration/setup.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Flarum\Testing\integration\Setup\SetupScript;
|
||||||
|
|
||||||
|
require __DIR__.'/../../vendor/autoload.php';
|
||||||
|
|
||||||
|
$setup = new SetupScript();
|
||||||
|
|
||||||
|
$setup->run();
|
25
extensions/subscriptions/tests/phpunit.integration.xml
Normal file
25
extensions/subscriptions/tests/phpunit.integration.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?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"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="true"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Integration Tests">
|
||||||
|
<directory suffix="Test.php">./integration</directory>
|
||||||
|
<exclude>./integration/tmp</exclude>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
27
extensions/subscriptions/tests/phpunit.unit.xml
Normal file
27
extensions/subscriptions/tests/phpunit.unit.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?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"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Unit Tests">
|
||||||
|
<directory suffix="Test.php">./unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<listeners>
|
||||||
|
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
|
||||||
|
</listeners>
|
||||||
|
</phpunit>
|
0
extensions/subscriptions/tests/unit/.gitkeep
Normal file
0
extensions/subscriptions/tests/unit/.gitkeep
Normal file
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/suspend/js/dist/forum.js
generated
vendored
2
extensions/suspend/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/suspend/js/dist/forum.js.map
generated
vendored
2
extensions/suspend/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -49,6 +49,7 @@ flarum-suspend:
|
|||||||
|
|
||||||
# Translations in this namespace are used by suspension email notifications
|
# Translations in this namespace are used by suspension email notifications
|
||||||
email:
|
email:
|
||||||
|
no_reason_given: No reason was given for this suspension.
|
||||||
suspended:
|
suspended:
|
||||||
subject: Your account has been suspended
|
subject: Your account has been suspended
|
||||||
body: |
|
body: |
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{!! $translator->trans('flarum-suspend.email.suspended.body', [
|
{!! $translator->trans('flarum-suspend.email.suspended.body', [
|
||||||
'{recipient_display_name}' => $user->display_name,
|
'{recipient_display_name}' => $user->display_name,
|
||||||
'{suspension_message}' => $blueprint->user->suspend_message,
|
'{suspension_message}' => $blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given'),
|
||||||
]) !!}
|
]) !!}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
17
extensions/tags/js/dist-typings/@types/shims.d.ts
generated
vendored
17
extensions/tags/js/dist-typings/@types/shims.d.ts
generated
vendored
@@ -19,3 +19,20 @@ declare module 'flarum/common/models/Discussion' {
|
|||||||
canTag: () => boolean | undefined;
|
canTag: () => boolean | undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module 'flarum/forum/components/IndexPage' {
|
||||||
|
export default interface IndexPage {
|
||||||
|
currentActiveTag?: Tag;
|
||||||
|
currentTagLoading?: boolean;
|
||||||
|
currentTag: () => Tag | undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'flarum/admin/components/PermissionGrid' {
|
||||||
|
export interface PermissionConfig {
|
||||||
|
tagScoped?: boolean;
|
||||||
|
}
|
||||||
|
export default interface PermissionGrid {
|
||||||
|
loading?: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2
extensions/tags/js/dist-typings/admin/addTagsPermissionScope.d.ts
generated
vendored
2
extensions/tags/js/dist-typings/admin/addTagsPermissionScope.d.ts
generated
vendored
@@ -1 +1 @@
|
|||||||
export default function _default(): void;
|
export default function (): void;
|
||||||
|
40
extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts
generated
vendored
40
extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts
generated
vendored
@@ -1,22 +1,29 @@
|
|||||||
/// <reference types="flarum/@types/translator-icu-rich" />
|
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
|
||||||
|
import Stream from 'flarum/common/utils/Stream';
|
||||||
|
import type Mithril from 'mithril';
|
||||||
|
import type Tag from '../../common/models/Tag';
|
||||||
|
export interface EditTagModalAttrs extends IInternalModalAttrs {
|
||||||
|
primary?: boolean;
|
||||||
|
model?: Tag;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* The `EditTagModal` component shows a modal dialog which allows the user
|
* The `EditTagModal` component shows a modal dialog which allows the user
|
||||||
* to create or edit a tag.
|
* to create or edit a tag.
|
||||||
*/
|
*/
|
||||||
export default class EditTagModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
|
export default class EditTagModal extends Modal<EditTagModalAttrs> {
|
||||||
constructor();
|
tag: Tag;
|
||||||
oninit(vnode: any): void;
|
name: Stream<string>;
|
||||||
tag: any;
|
slug: Stream<string>;
|
||||||
name: Stream<any> | undefined;
|
description: Stream<string>;
|
||||||
slug: Stream<any> | undefined;
|
color: Stream<string>;
|
||||||
description: Stream<any> | undefined;
|
icon: Stream<string>;
|
||||||
color: Stream<any> | undefined;
|
isHidden: Stream<boolean>;
|
||||||
icon: Stream<any> | undefined;
|
primary: Stream<boolean>;
|
||||||
isHidden: Stream<any> | undefined;
|
oninit(vnode: Mithril.Vnode<EditTagModalAttrs, this>): void;
|
||||||
primary: Stream<any> | undefined;
|
className(): string;
|
||||||
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray | import("mithril").Vnode<any, any>;
|
title(): any;
|
||||||
content(): JSX.Element;
|
content(): JSX.Element;
|
||||||
fields(): ItemList<any>;
|
fields(): any;
|
||||||
submitData(): {
|
submitData(): {
|
||||||
name: any;
|
name: any;
|
||||||
slug: any;
|
slug: any;
|
||||||
@@ -26,9 +33,6 @@ export default class EditTagModal extends Modal<import("flarum/common/components
|
|||||||
isHidden: any;
|
isHidden: any;
|
||||||
primary: any;
|
primary: any;
|
||||||
};
|
};
|
||||||
onsubmit(e: any): void;
|
onsubmit(e: SubmitEvent): void;
|
||||||
delete(): void;
|
delete(): void;
|
||||||
}
|
}
|
||||||
import Modal from "flarum/common/components/Modal";
|
|
||||||
import Stream from "flarum/common/utils/Stream";
|
|
||||||
import ItemList from "flarum/common/utils/ItemList";
|
|
||||||
|
5
extensions/tags/js/dist-typings/admin/components/TagsPage.d.ts
generated
vendored
5
extensions/tags/js/dist-typings/admin/components/TagsPage.d.ts
generated
vendored
@@ -1,10 +1,9 @@
|
|||||||
export default class TagsPage extends ExtensionPage<import("flarum/admin/components/ExtensionPage").ExtensionPageAttrs> {
|
export default class TagsPage {
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
forcedRefreshKey: number | undefined;
|
forcedRefreshKey: number | undefined;
|
||||||
|
loading: boolean | undefined;
|
||||||
content(): JSX.Element;
|
content(): JSX.Element;
|
||||||
onListOnCreate(vnode: any): void;
|
onListOnCreate(vnode: any): void;
|
||||||
setMinTags(minTags: any, maxTags: any, value: any): void;
|
setMinTags(minTags: any, maxTags: any, value: any): void;
|
||||||
onSortUpdate(e: any): void;
|
onSortUpdate(e: any): void;
|
||||||
}
|
}
|
||||||
import ExtensionPage from "flarum/admin/components/ExtensionPage";
|
|
||||||
|
2
extensions/tags/js/dist-typings/common/helpers/tagLabel.d.ts
generated
vendored
2
extensions/tags/js/dist-typings/common/helpers/tagLabel.d.ts
generated
vendored
@@ -1 +1 @@
|
|||||||
export default function tagLabel(tag: any, attrs?: {}): import("mithril").Vnode<any, any>;
|
export default function tagLabel(tag: any, attrs?: {}): any;
|
||||||
|
41
extensions/tags/js/dist-typings/common/models/Tag.d.ts
generated
vendored
41
extensions/tags/js/dist-typings/common/models/Tag.d.ts
generated
vendored
@@ -1,24 +1,23 @@
|
|||||||
import Model from 'flarum/common/Model';
|
import Model from 'flarum/common/Model';
|
||||||
import Discussion from 'flarum/common/models/Discussion';
|
|
||||||
export default class Tag extends Model {
|
export default class Tag extends Model {
|
||||||
name(): string;
|
name(): any;
|
||||||
slug(): string;
|
slug(): any;
|
||||||
description(): string | null;
|
description(): any;
|
||||||
color(): string | null;
|
color(): any;
|
||||||
backgroundUrl(): string | null;
|
backgroundUrl(): any;
|
||||||
backgroundMode(): string | null;
|
backgroundMode(): any;
|
||||||
icon(): string | null;
|
icon(): any;
|
||||||
position(): number | null;
|
position(): any;
|
||||||
parent(): false | Tag | null;
|
parent(): any;
|
||||||
children(): false | (Tag | undefined)[];
|
children(): any;
|
||||||
defaultSort(): string | null;
|
defaultSort(): any;
|
||||||
isChild(): boolean;
|
isChild(): any;
|
||||||
isHidden(): boolean;
|
isHidden(): any;
|
||||||
discussionCount(): number;
|
discussionCount(): any;
|
||||||
lastPostedAt(): Date | null | undefined;
|
lastPostedAt(): any;
|
||||||
lastPostedDiscussion(): false | Discussion | null;
|
lastPostedDiscussion(): any;
|
||||||
isRestricted(): boolean;
|
isRestricted(): any;
|
||||||
canStartDiscussion(): boolean;
|
canStartDiscussion(): any;
|
||||||
canAddToDiscussion(): boolean;
|
canAddToDiscussion(): any;
|
||||||
isPrimary(): boolean;
|
isPrimary(): any;
|
||||||
}
|
}
|
||||||
|
3
extensions/tags/js/dist-typings/common/utils/sortTags.d.ts
generated
vendored
3
extensions/tags/js/dist-typings/common/utils/sortTags.d.ts
generated
vendored
@@ -1 +1,2 @@
|
|||||||
export default function sortTags(tags: any): any;
|
import Tag from "../models/Tag";
|
||||||
|
export default function sortTags(tags: Tag[]): Tag[];
|
||||||
|
2
extensions/tags/js/dist-typings/forum/addTagFilter.d.ts
generated
vendored
2
extensions/tags/js/dist-typings/forum/addTagFilter.d.ts
generated
vendored
@@ -1 +1 @@
|
|||||||
export default function _default(): void;
|
export default function (): void;
|
||||||
|
4
extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts
generated
vendored
4
extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts
generated
vendored
@@ -1,9 +1,9 @@
|
|||||||
export default class DiscussionTaggedPost extends EventPost {
|
export default class DiscussionTaggedPost {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
|
icon(): string;
|
||||||
descriptionKey(): "flarum-tags.forum.post_stream.added_and_removed_tags_text" | "flarum-tags.forum.post_stream.added_tags_text" | "flarum-tags.forum.post_stream.removed_tags_text";
|
descriptionKey(): "flarum-tags.forum.post_stream.added_and_removed_tags_text" | "flarum-tags.forum.post_stream.added_tags_text" | "flarum-tags.forum.post_stream.removed_tags_text";
|
||||||
descriptionData(): {
|
descriptionData(): {
|
||||||
tagsAdded: any;
|
tagsAdded: any;
|
||||||
tagsRemoved: any;
|
tagsRemoved: any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
import EventPost from "flarum/forum/components/EventPost";
|
|
||||||
|
56
extensions/tags/js/dist-typings/forum/components/TagDiscussionModal.d.ts
generated
vendored
56
extensions/tags/js/dist-typings/forum/components/TagDiscussionModal.d.ts
generated
vendored
@@ -1,44 +1,46 @@
|
|||||||
export default class TagDiscussionModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
|
import type Mithril from 'mithril';
|
||||||
constructor();
|
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
|
||||||
oninit(vnode: any): void;
|
import Discussion from 'flarum/common/models/Discussion';
|
||||||
tagsLoading: boolean | undefined;
|
import Tag from '../../common/models/Tag';
|
||||||
selected: any[] | undefined;
|
export interface TagDiscussionModalAttrs extends IInternalModalAttrs {
|
||||||
filter: Stream<string> | undefined;
|
discussion?: Discussion;
|
||||||
focused: boolean | undefined;
|
selectedTags?: Tag[];
|
||||||
|
onsubmit?: (tags: Tag[]) => {};
|
||||||
|
}
|
||||||
|
export default class TagDiscussionModal extends Modal<TagDiscussionModalAttrs> {
|
||||||
|
tagsLoading: boolean;
|
||||||
|
selected: Tag[];
|
||||||
|
filter: any;
|
||||||
|
focused: boolean;
|
||||||
minPrimary: any;
|
minPrimary: any;
|
||||||
maxPrimary: any;
|
maxPrimary: any;
|
||||||
minSecondary: any;
|
minSecondary: any;
|
||||||
maxSecondary: any;
|
maxSecondary: any;
|
||||||
bypassReqs: any;
|
bypassReqs: boolean;
|
||||||
navigator: KeyboardNavigatable | undefined;
|
navigator: any;
|
||||||
tags: any;
|
tags?: Tag[];
|
||||||
index: any;
|
selectedTag?: Tag;
|
||||||
|
oninit(vnode: Mithril.Vnode<TagDiscussionModalAttrs, this>): void;
|
||||||
primaryCount(): number;
|
primaryCount(): number;
|
||||||
secondaryCount(): number;
|
secondaryCount(): number;
|
||||||
/**
|
/**
|
||||||
* Add the given tag to the list of selected tags.
|
* Add the given tag to the list of selected tags.
|
||||||
*
|
|
||||||
* @param {Tag} tag
|
|
||||||
*/
|
*/
|
||||||
addTag(tag: Tag): void;
|
addTag(tag: Tag): void;
|
||||||
/**
|
/**
|
||||||
* Remove the given tag from the list of selected tags.
|
* Remove the given tag from the list of selected tags.
|
||||||
*
|
|
||||||
* @param {Tag} tag
|
|
||||||
*/
|
*/
|
||||||
removeTag(tag: Tag): void;
|
removeTag(tag: Tag): void;
|
||||||
|
className(): string;
|
||||||
title(): any;
|
title(): any;
|
||||||
getInstruction(primaryCount: any, secondaryCount: any): any;
|
getInstruction(primaryCount: number, secondaryCount: number): any;
|
||||||
content(): JSX.Element | JSX.Element[];
|
content(): JSX.Element | JSX.Element[];
|
||||||
meetsRequirements(primaryCount: any, secondaryCount: any): boolean;
|
meetsRequirements(primaryCount: number, secondaryCount: number): boolean;
|
||||||
toggleTag(tag: any): void;
|
toggleTag(tag: Tag): void;
|
||||||
select(e: any): void;
|
select(e: KeyboardEvent): void;
|
||||||
selectableItems(): JQuery<HTMLElement>;
|
selectableItems(): any;
|
||||||
getCurrentNumericIndex(): number;
|
getCurrentNumericIndex(): any;
|
||||||
getItem(index: any): JQuery<HTMLElement>;
|
getItem(selectedTag: Tag): any;
|
||||||
setIndex(index: any, scrollToItem: any): void;
|
setIndex(index: number, scrollToItem: boolean): void;
|
||||||
onsubmit(e: any): void;
|
onsubmit(e: SubmitEvent): void;
|
||||||
}
|
}
|
||||||
import Modal from "flarum/common/components/Modal";
|
|
||||||
import Stream from "flarum/common/utils/Stream";
|
|
||||||
import KeyboardNavigatable from "flarum/forum/utils/KeyboardNavigatable";
|
|
||||||
|
4
extensions/tags/js/dist-typings/forum/components/TagHero.d.ts
generated
vendored
4
extensions/tags/js/dist-typings/forum/components/TagHero.d.ts
generated
vendored
@@ -1,5 +1,3 @@
|
|||||||
export default class TagHero extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
|
export default class TagHero {
|
||||||
constructor();
|
|
||||||
view(): JSX.Element;
|
view(): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "flarum/common/Component";
|
|
||||||
|
3
extensions/tags/js/dist-typings/forum/components/TagLinkButton.d.ts
generated
vendored
3
extensions/tags/js/dist-typings/forum/components/TagLinkButton.d.ts
generated
vendored
@@ -1,5 +1,4 @@
|
|||||||
export default class TagLinkButton extends LinkButton {
|
export default class TagLinkButton {
|
||||||
static initAttrs(attrs: any): void;
|
static initAttrs(attrs: any): void;
|
||||||
view(vnode: any): JSX.Element;
|
view(vnode: any): JSX.Element;
|
||||||
}
|
}
|
||||||
import LinkButton from "flarum/common/components/LinkButton";
|
|
||||||
|
6
extensions/tags/js/dist-typings/forum/components/TagsPage.d.ts
generated
vendored
6
extensions/tags/js/dist-typings/forum/components/TagsPage.d.ts
generated
vendored
@@ -1,9 +1,7 @@
|
|||||||
export default class TagsPage extends Page<import("flarum/common/components/Page").IPageAttrs> {
|
export default class TagsPage {
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
tags: any;
|
tags: any[] | undefined;
|
||||||
loading: boolean | undefined;
|
loading: boolean | undefined;
|
||||||
view(): JSX.Element;
|
view(): JSX.Element;
|
||||||
oncreate(vnode: any): void;
|
oncreate(vnode: any): void;
|
||||||
}
|
}
|
||||||
import Page from "flarum/common/components/Page";
|
|
||||||
|
4
extensions/tags/js/dist-typings/forum/components/ToggleButton.d.ts
generated
vendored
4
extensions/tags/js/dist-typings/forum/components/ToggleButton.d.ts
generated
vendored
@@ -1,8 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @TODO move to core
|
* @TODO move to core
|
||||||
*/
|
*/
|
||||||
export default class ToggleButton extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
|
export default class ToggleButton {
|
||||||
constructor();
|
|
||||||
view(vnode: any): JSX.Element;
|
view(vnode: any): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "flarum/common/Component";
|
|
||||||
|
4
extensions/tags/js/dist-typings/forum/states/TagListState.d.ts
generated
vendored
4
extensions/tags/js/dist-typings/forum/states/TagListState.d.ts
generated
vendored
@@ -1,5 +1,5 @@
|
|||||||
import Tag from "../../common/models/Tag";
|
import type Tag from "../../common/models/Tag";
|
||||||
export default class TagListState {
|
export default class TagListState {
|
||||||
loadedIncludes: Set<unknown>;
|
loadedIncludes: Set<unknown>;
|
||||||
load(includes?: never[]): Promise<Tag[]>;
|
load(includes?: string[]): Promise<Tag[]>;
|
||||||
}
|
}
|
||||||
|
2
extensions/tags/js/dist/admin.js
generated
vendored
2
extensions/tags/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/admin.js.map
generated
vendored
2
extensions/tags/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum.js
generated
vendored
2
extensions/tags/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum.js.map
generated
vendored
2
extensions/tags/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -322,7 +322,7 @@ export default class TagDiscussionModal extends Modal<TagDiscussionModalAttrs> {
|
|||||||
|
|
||||||
m.redraw();
|
m.redraw();
|
||||||
|
|
||||||
if (scrollToItem) {
|
if (scrollToItem && this.selectedTag) {
|
||||||
const dropdownScroll = $dropdown.scrollTop()!;
|
const dropdownScroll = $dropdown.scrollTop()!;
|
||||||
const dropdownTop = $dropdown.offset()!.top;
|
const dropdownTop = $dropdown.offset()!.top;
|
||||||
const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;
|
const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.TagsInput {
|
.TagsInput {
|
||||||
|
.add-keyboard-focus-ring(":focus-within");
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
min-width: 1ch;
|
||||||
margin-right: -100%;
|
margin-right: -100%;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
@@ -66,6 +68,7 @@
|
|||||||
}
|
}
|
||||||
.TagsInput-selected {
|
.TagsInput-selected {
|
||||||
.TagsInput-tag {
|
.TagsInput-tag {
|
||||||
|
display: inline-flex;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
@@ -4,132 +4,132 @@
|
|||||||
{
|
{
|
||||||
"name": "akismet",
|
"name": "akismet",
|
||||||
"gitRemote": "git@github.com:flarum/akismet.git",
|
"gitRemote": "git@github.com:flarum/akismet.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "approval",
|
"name": "approval",
|
||||||
"gitRemote": "git@github.com:flarum/approval.git",
|
"gitRemote": "git@github.com:flarum/approval.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bbcode",
|
"name": "bbcode",
|
||||||
"gitRemote": "git@github.com:flarum/bbcode.git",
|
"gitRemote": "git@github.com:flarum/bbcode.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "embed",
|
"name": "embed",
|
||||||
"gitRemote": "git@github.com:flarum/embed.git",
|
"gitRemote": "git@github.com:flarum/embed.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "emoji",
|
"name": "emoji",
|
||||||
"gitRemote": "git@github.com:flarum/emoji.git",
|
"gitRemote": "git@github.com:flarum/emoji.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"gitRemote": "git@github.com:flarum/flags.git",
|
"gitRemote": "git@github.com:flarum/flags.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lang-english",
|
"name": "lang-english",
|
||||||
"gitRemote": "git@github.com:flarum/lang-english.git",
|
"gitRemote": "git@github.com:flarum/lang-english.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "likes",
|
"name": "likes",
|
||||||
"gitRemote": "git@github.com:flarum/likes.git",
|
"gitRemote": "git@github.com:flarum/likes.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lock",
|
"name": "lock",
|
||||||
"gitRemote": "git@github.com:flarum/lock.git",
|
"gitRemote": "git@github.com:flarum/lock.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "markdown",
|
"name": "markdown",
|
||||||
"gitRemote": "git@github.com:flarum/markdown.git",
|
"gitRemote": "git@github.com:flarum/markdown.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mentions",
|
"name": "mentions",
|
||||||
"gitRemote": "git@github.com:flarum/mentions.git",
|
"gitRemote": "git@github.com:flarum/mentions.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nicknames",
|
"name": "nicknames",
|
||||||
"gitRemote": "git@github.com:flarum/nicknames.git",
|
"gitRemote": "git@github.com:flarum/nicknames.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "package-manager",
|
"name": "package-manager",
|
||||||
"gitRemote": "git@github.com:flarum/package-manager.git",
|
"gitRemote": "git@github.com:flarum/package-manager.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pusher",
|
"name": "pusher",
|
||||||
"gitRemote": "git@github.com:flarum/pusher.git",
|
"gitRemote": "git@github.com:flarum/pusher.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "statistics",
|
"name": "statistics",
|
||||||
"gitRemote": "git@github.com:flarum/statistics.git",
|
"gitRemote": "git@github.com:flarum/statistics.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sticky",
|
"name": "sticky",
|
||||||
"gitRemote": "git@github.com:flarum/sticky.git",
|
"gitRemote": "git@github.com:flarum/sticky.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "subscriptions",
|
"name": "subscriptions",
|
||||||
"gitRemote": "git@github.com:flarum/subscriptions.git",
|
"gitRemote": "git@github.com:flarum/subscriptions.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "suspend",
|
"name": "suspend",
|
||||||
"gitRemote": "git@github.com:flarum/suspend.git",
|
"gitRemote": "git@github.com:flarum/suspend.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tags",
|
"name": "tags",
|
||||||
"gitRemote": "git@github.com:flarum/tags.git",
|
"gitRemote": "git@github.com:flarum/tags.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"composer": [
|
"composer": [
|
||||||
{
|
{
|
||||||
"name": "testing",
|
"name": "testing",
|
||||||
"gitRemote": "git@github.com:flarum/testing.git",
|
"gitRemote": "git@github.com:flarum/testing.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan",
|
"name": "phpstan",
|
||||||
"gitRemote": "git@github.com:flarum/phpstan.git",
|
"gitRemote": "git@github.com:flarum/phpstan.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"npm": [
|
"npm": [
|
||||||
{
|
{
|
||||||
"name": "prettier-config",
|
"name": "prettier-config",
|
||||||
"gitRemote": "git@github.com:flarum/prettier-config.git",
|
"gitRemote": "git@github.com:flarum/prettier-config.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webpack-config",
|
"name": "webpack-config",
|
||||||
"gitRemote": "git@github.com:flarum/flarum-webpack-config.git",
|
"gitRemote": "git@github.com:flarum/flarum-webpack-config.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tsconfig",
|
"name": "tsconfig",
|
||||||
"gitRemote": "git@github.com:flarum/flarum-tsconfig.git",
|
"gitRemote": "git@github.com:flarum/flarum-tsconfig.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"core": {
|
"core": {
|
||||||
"name": "core",
|
"name": "core",
|
||||||
"gitRemote": "git@github.com:flarum/core.git",
|
"gitRemote": "git@github.com:flarum/flarum-core.git",
|
||||||
"mainBranch": "master"
|
"mainBranch": "main"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,6 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3",
|
"php": ">=7.3",
|
||||||
"axy/sourcemap": "^0.1.4",
|
|
||||||
"components/font-awesome": "^5.14.0",
|
"components/font-awesome": "^5.14.0",
|
||||||
"dflydev/fig-cookies": "^3.0.0",
|
"dflydev/fig-cookies": "^3.0.0",
|
||||||
"doctrine/dbal": "^2.7",
|
"doctrine/dbal": "^2.7",
|
||||||
@@ -75,6 +74,8 @@
|
|||||||
"psr/http-server-handler": "^1.0",
|
"psr/http-server-handler": "^1.0",
|
||||||
"psr/http-server-middleware": "^1.0",
|
"psr/http-server-middleware": "^1.0",
|
||||||
"s9e/text-formatter": "^2.3.6",
|
"s9e/text-formatter": "^2.3.6",
|
||||||
|
"sycho/json-api": "^0.5.0",
|
||||||
|
"sycho/sourcemap": "^2.0.0",
|
||||||
"symfony/config": "^5.2.2",
|
"symfony/config": "^5.2.2",
|
||||||
"symfony/console": "^5.2.2",
|
"symfony/console": "^5.2.2",
|
||||||
"symfony/event-dispatcher": "^5.2.2",
|
"symfony/event-dispatcher": "^5.2.2",
|
||||||
@@ -82,7 +83,6 @@
|
|||||||
"symfony/polyfill-intl-messageformatter": "^1.22.0",
|
"symfony/polyfill-intl-messageformatter": "^1.22.0",
|
||||||
"symfony/translation": "^5.1.5",
|
"symfony/translation": "^5.1.5",
|
||||||
"symfony/yaml": "^5.2.2",
|
"symfony/yaml": "^5.2.2",
|
||||||
"tobscure/json-api": "^0.3.0",
|
|
||||||
"wikimedia/less.php": "^3.0"
|
"wikimedia/less.php": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
2
framework/core/js/dist-typings/admin/components/AdminPage.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/components/AdminPage.d.ts
generated
vendored
@@ -40,7 +40,7 @@ export interface HTMLInputSettingsComponentOptions extends CommonSettingsItemOpt
|
|||||||
declare const BooleanSettingTypes: readonly ["bool", "checkbox", "switch", "boolean"];
|
declare const BooleanSettingTypes: readonly ["bool", "checkbox", "switch", "boolean"];
|
||||||
declare const SelectSettingTypes: readonly ["select", "dropdown", "selectdropdown"];
|
declare const SelectSettingTypes: readonly ["select", "dropdown", "selectdropdown"];
|
||||||
declare const TextareaSettingTypes: readonly ["textarea"];
|
declare const TextareaSettingTypes: readonly ["textarea"];
|
||||||
declare const ColorPreviewSettingType = "color-preview";
|
declare const ColorPreviewSettingType: "color-preview";
|
||||||
/**
|
/**
|
||||||
* Valid options for the setting component builder to generate a Switch.
|
* Valid options for the setting component builder to generate a Switch.
|
||||||
*/
|
*/
|
||||||
|
2
framework/core/js/dist-typings/admin/components/DashboardPage.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/components/DashboardPage.d.ts
generated
vendored
@@ -1,7 +1,7 @@
|
|||||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
import AdminPage from './AdminPage';
|
import AdminPage from './AdminPage';
|
||||||
import { Children } from 'mithril';
|
import type { Children } from 'mithril';
|
||||||
export default class DashboardPage extends AdminPage {
|
export default class DashboardPage extends AdminPage {
|
||||||
headerInfo(): {
|
headerInfo(): {
|
||||||
className: string;
|
className: string;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user