I am working on Notification support for the Chat extension. At the moment, I am trying to add a switch to the Notify administration pane.
I found that I should be able to use useExtensions
according to flarum-webpack-config
. It was not really obvious what should the extension name be, I had to dump flarum.extensions
in the browser console to find out that it is manelizzard-notify
(assigned here).
I added the line, fixed the import in accordance with the externals
, fixed the export and tried to dump the imported Page. That produced the following error:
TypeError: _manelizzard_notify__WEBPACK_IMPORTED_MODULE_4__ is undefined
I can dump flarum.extensions['manelizzard-notify'].NotifyPage
in the console so the exports work properly. Perhaps there is some race? Though explicitly passing priorities to app.initializers.add
did not seem to help.
Any ideas?
Full pull requests
Part of composer.json
"requires": {
"manelizzard/flarum-ext-notify": "dev-master",
"push-edx/flarum-ext-chat": "dev-ot",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ogioncz/flarum-notify"
},
{
"type": "vcs",
"url": "https://github.com/jtojnar/flarum-ext-chat"
}
],
TL;DR
I want to update admin pane of another extension, how would I go about it?