diff --git a/framework/core/js/src/admin/components/AppearancePage.tsx b/framework/core/js/src/admin/components/AppearancePage.tsx index 12cfb7c9cf..1433ca0131 100644 --- a/framework/core/js/src/admin/components/AppearancePage.tsx +++ b/framework/core/js/src/admin/components/AppearancePage.tsx @@ -19,52 +19,7 @@ export default class AppearancePage extends AdminPage { } content() { - return ( - <> -
-
- {app.translator.trans('core.admin.appearance.colors_heading')} - {this.colorItems().toArray()} -
-
- -
- {app.translator.trans('core.admin.appearance.logo_heading')} -
{app.translator.trans('core.admin.appearance.logo_text')}
- -
- -
- {app.translator.trans('core.admin.appearance.favicon_heading')} -
{app.translator.trans('core.admin.appearance.favicon_text')}
- -
- -
- {app.translator.trans('core.admin.appearance.custom_header_heading')} -
{app.translator.trans('core.admin.appearance.custom_header_text')}
- -
- -
- {app.translator.trans('core.admin.appearance.custom_footer_heading')} -
{app.translator.trans('core.admin.appearance.custom_footer_text')}
- -
- -
- {app.translator.trans('core.admin.appearance.custom_styles_heading')} -
{app.translator.trans('core.admin.appearance.custom_styles_text')}
- -
- - ); + return this.contentItems().toArray(); } colorItems() { @@ -119,4 +74,77 @@ export default class AppearancePage extends AdminPage { onsaved() { window.location.reload(); } + + contentItems(): ItemList { + const items = new ItemList(); + + items.add( + 'colors', +
+
+ {app.translator.trans('core.admin.appearance.colors_heading')} + {this.colorItems().toArray()} +
+
, + 100 + ); + + items.add( + 'logo', +
+ {app.translator.trans('core.admin.appearance.logo_heading')} +
{app.translator.trans('core.admin.appearance.logo_text')}
+ +
, + 90 + ); + + items.add( + 'favicon', +
+ {app.translator.trans('core.admin.appearance.favicon_heading')} +
{app.translator.trans('core.admin.appearance.favicon_text')}
+ +
, + 80 + ); + + items.add( + 'custom-header', +
+ {app.translator.trans('core.admin.appearance.custom_header_heading')} +
{app.translator.trans('core.admin.appearance.custom_header_text')}
+ +
, + 70 + ); + + items.add( + 'custom-footer', +
+ {app.translator.trans('core.admin.appearance.custom_footer_heading')} +
{app.translator.trans('core.admin.appearance.custom_footer_text')}
+ +
, + 60 + ); + + items.add( + 'custom-css', +
+ {app.translator.trans('core.admin.appearance.custom_styles_heading')} +
{app.translator.trans('core.admin.appearance.custom_styles_text')}
+ +
, + 50 + ); + + return items; + } } diff --git a/framework/core/js/src/admin/components/BasicsPage.tsx b/framework/core/js/src/admin/components/BasicsPage.tsx index fb1e83c342..3381c70ac6 100644 --- a/framework/core/js/src/admin/components/BasicsPage.tsx +++ b/framework/core/js/src/admin/components/BasicsPage.tsx @@ -3,7 +3,7 @@ import FieldSet from '../../common/components/FieldSet'; import ItemList from '../../common/utils/ItemList'; import AdminPage from './AdminPage'; import type { IPageAttrs } from '../../common/components/Page'; -import type Mithril from 'mithril'; +import Mithril from 'mithril'; export type HomePageItem = { path: string; label: Mithril.Children }; @@ -44,78 +44,7 @@ export default class BasicsPage ext content() { return [
- {this.buildSettingComponent({ - type: 'text', - setting: 'forum_title', - label: app.translator.trans('core.admin.basics.forum_title_heading'), - })} - {this.buildSettingComponent({ - type: 'text', - setting: 'forum_description', - label: app.translator.trans('core.admin.basics.forum_description_heading'), - help: app.translator.trans('core.admin.basics.forum_description_text'), - })} - - {Object.keys(this.localeOptions).length > 1 && ( - <> - {this.buildSettingComponent({ - type: 'select', - setting: 'default_locale', - options: this.localeOptions, - label: app.translator.trans('core.admin.basics.default_language_heading'), - })} - {this.buildSettingComponent({ - type: 'switch', - setting: 'show_language_selector', - label: app.translator.trans('core.admin.basics.show_language_selector_label'), - })} - - )} - -
-
{app.translator.trans('core.admin.basics.home_page_text')}
- {this.homePageItems() - .toArray() - .map(({ path, label }) => ( - - ))} -
- -
- -
{app.translator.trans('core.admin.basics.welcome_banner_text')}
- -