For those of you struggling with getting the Settings Modal to appear. Make sure that the key to the app.extensionSettings
reflects the internal name of your package. The internal name replaces flarum-
and flarum-ext-
from the package name and replaces /
with -
. So:
faraday-motion/flarum-faraday-motion-oauth
becomes: faraday-motion-faraday-motion-oauth
faraday-motion/flarum-ext-faraday-motion-oauth
becomes: faraday-motion-faraday-motion-oauth
too.
So this won't work:
import app from 'flarum/app';
import FaradayMotionSettingsModal from 'flarum/auth/faraday-motion/components/FaradayMotionSettingsModal';
app.initializers.add('flarum-auth-faraday-motion', () => {
app.extensionSettings['flarum-auth-faraday-motion'] = () => app.modal.show(new FaradayMotionSettingsModal());
});
Whereas this does:
import app from 'flarum/app';
import FaradayMotionSettingsModal from 'flarum/auth/faraday-motion/components/FaradayMotionSettingsModal';
app.initializers.add('flarum-auth-faraday-motion', () => {
app.extensionSettings['faraday-motion-faraday-motion-oauth'] = () => app.modal.show(new FaradayMotionSettingsModal());
});