diff --git a/framework/core/js/admin/src/components/BasicsPage.js b/framework/core/js/admin/src/components/BasicsPage.js new file mode 100644 index 000000000..a3d8f2f69 --- /dev/null +++ b/framework/core/js/admin/src/components/BasicsPage.js @@ -0,0 +1,137 @@ +import Component from 'flarum/Component'; +import FieldSet from 'flarum/components/FieldSet'; +import Select from 'flarum/components/Select'; +import Button from 'flarum/components/Button'; + +export default class BasicsPage extends Component { + constructor(...args) { + super(...args); + + this.loading = false; + + this.fields = [ + 'forum_title', + 'forum_description', + 'default_locale', + 'default_route', + 'welcome_title', + 'welcome_message' + ]; + this.values = {}; + + const config = app.forum.attribute('config'); + this.fields.forEach(key => this.values[key] = m.prop(config[key])); + + this.localeOptions = {}; + const locales = app.forum.attribute('availableLocales'); + for (const i in locales) { + this.localeOptions[i] = `${locales[i]} (${i})`; + } + } + + view() { + return ( +
+
+
+ {FieldSet.component({ + label: 'Forum Title', + children: [ + + ] + })} + + {FieldSet.component({ + label: 'Forum Description', + children: [ +
+ Enter a short sentence or two that describes your community. This will appear in the meta tag and show up in search engines. +
, +