Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: unify frontend initializers naming #4003

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/lock/js/src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import app from 'flarum/admin/app';

export { default as extend } from './extend';

app.initializers.add('lock', () => {
app.initializers.add('flarum-lock', () => {
app.extensionData.for('flarum-lock').registerPermission(
{
icon: 'fas fa-lock',
Expand Down
2 changes: 1 addition & 1 deletion extensions/mentions/js/src/admin/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import app from 'flarum/admin/app';

app.initializers.add('flarum-mentions', function () {
app.initializers.add('flarum-mentions', () => {
app.extensionData
.for('flarum-mentions')
.registerSetting({
Expand Down
2 changes: 1 addition & 1 deletion extensions/mentions/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ app.mentionFormats = new MentionFormats();

export { default as extend } from './extend';

app.initializers.add('flarum-mentions', function () {
app.initializers.add('flarum-mentions', () => {
// For every mention of a post inside a post's content, set up a hover handler
// that shows a preview of the mentioned post.
addPostMentionPreviews();
Expand Down
2 changes: 1 addition & 1 deletion extensions/nicknames/js/src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import BasicsPage from 'flarum/admin/components/BasicsPage';
import extractText from 'flarum/common/utils/extractText';
import { extend } from 'flarum/common/extend';

app.initializers.add('flarum/nicknames', () => {
app.initializers.add('flarum-nicknames', () => {
app.extensionData
.for('flarum-nicknames')
.registerSetting(function () {
Expand Down
2 changes: 1 addition & 1 deletion extensions/nicknames/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import NickNameModal from './components/NicknameModal';

export { default as extend } from './extend';

app.initializers.add('flarum/nicknames', () => {
app.initializers.add('flarum-nicknames', () => {
extend('flarum/forum/components/SettingsPage', 'accountItems', function (items) {
if (app.forum.attribute('displayNameDriver') !== 'nickname') return;

Expand Down
2 changes: 1 addition & 1 deletion extensions/subscriptions/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import addSubscriptionSettings from './addSubscriptionSettings';

export { default as extend } from './extend';

app.initializers.add('subscriptions', function () {
app.initializers.add('flarum-subscriptions', () => {
addSubscriptionBadge();
addSubscriptionControls();
addSubscriptionFilter();
Expand Down
2 changes: 1 addition & 1 deletion extensions/tags/js/src/forum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import addTagComposer from './addTagComposer';

export { default as extend } from './extend';

app.initializers.add('flarum-tags', function () {
app.initializers.add('flarum-tags', () => {
app.tagList = new TagListState();

addTagList();
Expand Down
Loading