Skip to content

Commit

Permalink
feat: move to common
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Apr 6, 2024
1 parent c15c465 commit 309d233
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import app from 'flarum/admin/app';
import ItemList from 'flarum/common/utils/ItemList';
import generateElementId from 'flarum/admin/utils/generateElementId';
import generateElementId from 'flarum/common/utils/generateElementId';
import FormModal, { IFormModalAttrs } from 'flarum/common/components/FormModal';

import Mithril from 'mithril';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { extend } from 'flarum/common/extend';
import SelectTagsSettingComponent from './components/SelectTagsSettingComponent';
import FormGroup from 'flarum/admin/components/FormGroup';
import type { IFormGroupAttrs } from 'flarum/admin/components/FormGroup';
import FormGroup from 'flarum/common/components/FormGroup';
import type { IFormGroupAttrs } from 'flarum/common/components/FormGroup';

export default function () {
extend(FormGroup.prototype, 'customFieldComponents', function (items) {
Expand Down
3 changes: 0 additions & 3 deletions framework/core/js/src/admin/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import './utils/saveSettings';
import './utils/ExtensionData';
import './utils/isExtensionEnabled';
import './utils/getCategorizedExtensions';
import './utils/generateElementId';

import './components/SettingDropdown';
import './components/EditCustomFooterModal';
Expand All @@ -22,7 +21,6 @@ import './components/ExtensionLinkButton';
import './components/PermissionGrid';
import './components/ExtensionPermissionGrid';
import './components/MailPage';
import './components/UploadImageButton';
import './components/LoadingModal';
import './components/DashboardPage';
import './components/BasicsPage';
Expand All @@ -35,7 +33,6 @@ import './components/AdminHeader';
import './components/EditCustomCssModal';
import './components/EditGroupModal';
import './components/CreateUserModal';
import './components/FormGroup';

import './routes';
import './AdminApplication';
2 changes: 1 addition & 1 deletion framework/core/js/src/admin/components/AdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import classList from '../../common/utils/classList';
import Stream from '../../common/utils/Stream';
import saveSettings from '../utils/saveSettings';
import AdminHeader from './AdminHeader';
import FormGroup, { FieldComponentOptions } from './FormGroup';
import FormGroup, { FieldComponentOptions } from '../../common/components/FormGroup';
import extractText from '../../common/utils/extractText';

export interface AdminHeaderOptions {
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/admin/components/AppearancePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Button from '../../common/components/Button';
import EditCustomCssModal from './EditCustomCssModal';
import EditCustomHeaderModal from './EditCustomHeaderModal';
import EditCustomFooterModal from './EditCustomFooterModal';
import UploadImageButton from './UploadImageButton';
import UploadImageButton from '../../common/components/UploadImageButton';
import AdminPage from './AdminPage';
import ItemList from '../../common/utils/ItemList';
import type Mithril from 'mithril';
Expand Down
3 changes: 3 additions & 0 deletions framework/core/js/src/common/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import './utils/withAttr';
import './utils/focusTrap';
import './utils/isDark';
import './utils/KeyboardNavigatable';
import './utils/generateElementId';

import './models/Notification';
import './models/User';
Expand Down Expand Up @@ -76,6 +77,8 @@ import './components/TextEditorButton';
import './components/Tooltip';
import './components/AutocompleteDropdown';
import './components/GambitsAutocompleteDropdown';
import './components/UploadImageButton';
import './components/FormGroup';

import './helpers/fullTime';
import './components/Avatar';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Component from '../../common/Component';
import Component from '../Component';
import generateElementId from '../utils/generateElementId';
import Switch from '../../common/components/Switch';
import Select from '../../common/components/Select';
import Switch from './Switch';
import Select from './Select';
import UploadImageButton from './UploadImageButton';
import classList from '../../common/utils/classList';
import ColorPreviewInput from '../../common/components/ColorPreviewInput';
import Stream from '../../common/utils/Stream';
import ItemList from '../../common/utils/ItemList';
import classList from '../utils/classList';
import ColorPreviewInput from './ColorPreviewInput';
import Stream from '../utils/Stream';
import ItemList from '../utils/ItemList';
import type { IUploadImageButtonAttrs } from './UploadImageButton';
import type { ComponentAttrs } from '../../common/Component';
import type { ComponentAttrs } from '../Component';
import type Mithril from 'mithril';

/**
Expand Down

0 comments on commit 309d233

Please sign in to comment.