This commit is contained in:
Sami Mazouz 2024-05-10 18:08:08 +01:00
parent 00d4a295e8
commit 71c20ef4f1
No known key found for this signature in database

View File

@ -1,7 +1,8 @@
import app from 'flarum/admin/app';
import type Mithril from 'mithril';
import Component, { type ComponentAttrs } from 'flarum/common/Component';
import { CommonSettingsItemOptions, type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';
import { type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';
import FormGroup, { type CommonFieldOptions } from 'flarum/common/components/FormGroup';
import AdminPage from 'flarum/admin/components/AdminPage';
import type ItemList from 'flarum/common/utils/ItemList';
import Stream from 'flarum/common/utils/Stream';
@ -49,8 +50,8 @@ export default abstract class ConfigureJson<CustomAttrs extends IConfigureJson =
];
}
customSettingComponents(): ItemList<(attributes: CommonSettingsItemOptions) => Mithril.Children> {
return AdminPage.prototype.customSettingComponents();
customSettingComponents(): ItemList<(attributes: CommonFieldOptions) => Mithril.Children> {
return FormGroup.prototype.customFieldComponents();
}
setting(key: string) {