diff --git a/framework/core/js/src/forum/components/UserSearchResult.tsx b/framework/core/js/src/common/components/UserSearchResult.tsx similarity index 100% rename from framework/core/js/src/forum/components/UserSearchResult.tsx rename to framework/core/js/src/common/components/UserSearchResult.tsx diff --git a/framework/core/js/src/common/components/UserSelectionModal.tsx b/framework/core/js/src/common/components/UserSelectionModal.tsx index cdfb74273f..206ae9d5f6 100644 --- a/framework/core/js/src/common/components/UserSelectionModal.tsx +++ b/framework/core/js/src/common/components/UserSelectionModal.tsx @@ -9,7 +9,7 @@ import Button from './Button'; import LoadingIndicator from './LoadingIndicator'; import { throttle } from '../utils/throttleDebounce'; import InfoTile from './InfoTile'; -import UserSearchResult from '../../forum/components/UserSearchResult'; +import UserSearchResult from '../../common/components/UserSearchResult'; import Pill from './Pill'; export interface IUserSelectionModalAttrs extends IFormModalAttrs { diff --git a/framework/core/js/src/common/extenders/Model.ts b/framework/core/js/src/common/extenders/Model.ts index 2416bc4740..265de60639 100644 --- a/framework/core/js/src/common/extenders/Model.ts +++ b/framework/core/js/src/common/extenders/Model.ts @@ -1,5 +1,5 @@ import IExtender, { IExtensionModule } from './IExtender'; -import Application from '../Application'; +import type Application from '../Application'; import ActualModel from '../Model'; export default class Model implements IExtender { diff --git a/framework/core/js/src/common/extenders/Routes.ts b/framework/core/js/src/common/extenders/Routes.ts index a895cac66a..b80fd1ae3d 100644 --- a/framework/core/js/src/common/extenders/Routes.ts +++ b/framework/core/js/src/common/extenders/Routes.ts @@ -1,4 +1,5 @@ -import Application, { AsyncNewComponent, FlarumGenericRoute, NewComponent } from '../Application'; +import type Application from '../Application'; +import type { AsyncNewComponent, FlarumGenericRoute, NewComponent } from '../Application'; import IExtender, { IExtensionModule } from './IExtender'; type HelperRoute = (...args: any) => string; diff --git a/framework/core/js/src/common/extenders/Store.ts b/framework/core/js/src/common/extenders/Store.ts index 2b0f7fae89..eef6384811 100644 --- a/framework/core/js/src/common/extenders/Store.ts +++ b/framework/core/js/src/common/extenders/Store.ts @@ -1,4 +1,4 @@ -import Application from '../Application'; +import type Application from '../Application'; import IExtender, { IExtensionModule } from './IExtender'; import Model from '../Model'; diff --git a/framework/core/js/src/common/extenders/ThemeMode.ts b/framework/core/js/src/common/extenders/ThemeMode.ts index 64d760b7f0..c0be5821bc 100644 --- a/framework/core/js/src/common/extenders/ThemeMode.ts +++ b/framework/core/js/src/common/extenders/ThemeMode.ts @@ -1,4 +1,4 @@ -import Application from '../Application'; +import type Application from '../Application'; import IExtender, { IExtensionModule } from './IExtender'; import ThemeModeComponent, { type ColorSchemeData } from '../components/ThemeMode'; diff --git a/framework/core/js/src/forum/app.ts b/framework/core/js/src/forum/app.ts index 83d12b9355..74cd0ebe89 100644 --- a/framework/core/js/src/forum/app.ts +++ b/framework/core/js/src/forum/app.ts @@ -1,5 +1,7 @@ import Forum from './ForumApplication'; +console.error('No'); + const app = new Forum(); // @ts-expect-error We need to do this for backwards compatibility purposes. diff --git a/framework/core/js/src/forum/components/PostsUserPage.tsx b/framework/core/js/src/forum/components/PostsUserPage.tsx index 80f9d081eb..d9419b72bc 100644 --- a/framework/core/js/src/forum/components/PostsUserPage.tsx +++ b/framework/core/js/src/forum/components/PostsUserPage.tsx @@ -1,11 +1,4 @@ -import app from '../../forum/app'; import UserPage, { IUserPageAttrs } from './UserPage'; -import LoadingIndicator from '../../common/components/LoadingIndicator'; -import Button from '../../common/components/Button'; -import Link from '../../common/components/Link'; -import Placeholder from '../../common/components/Placeholder'; -import CommentPost from './CommentPost'; -import type Post from '../../common/models/Post'; import type Mithril from 'mithril'; import type User from '../../common/models/User'; import PostListState from '../states/PostListState'; diff --git a/framework/core/js/src/forum/components/UsersSearchSource.tsx b/framework/core/js/src/forum/components/UsersSearchSource.tsx index 398e450b8d..7b3212d4f9 100644 --- a/framework/core/js/src/forum/components/UsersSearchSource.tsx +++ b/framework/core/js/src/forum/components/UsersSearchSource.tsx @@ -1,15 +1,10 @@ import type Mithril from 'mithril'; import app from '../app'; -import highlight from '../../common/helpers/highlight'; -import username from '../../common/helpers/username'; -import Link from '../../common/components/Link'; import type User from '../../common/models/User'; -import Avatar from '../../common/components/Avatar'; import type { SearchSource } from './Search'; import extractText from '../../common/utils/extractText'; -import listItems from '../../common/helpers/listItems'; -import UserSearchResult from './UserSearchResult'; +import UserSearchResult from '../../common/components/UserSearchResult'; /** * The `UsersSearchSource` finds and displays user search results in the search