mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 13:36:10 +08:00
Only display "show language selector" toggle if there is more than one language
This commit is contained in:
parent
20006b395d
commit
1af83fad99
|
@ -58,7 +58,7 @@ export default class BasicsPage extends Page {
|
|||
]
|
||||
})}
|
||||
|
||||
{Object.keys(this.localeOptions).length > 1
|
||||
{Object.keys(this.localeOptions).length > 0
|
||||
? FieldSet.component({
|
||||
label: app.translator.trans('core.admin.basics.default_language_heading'),
|
||||
children: [
|
||||
|
@ -66,19 +66,16 @@ export default class BasicsPage extends Page {
|
|||
options: this.localeOptions,
|
||||
value: this.values.default_locale(),
|
||||
onchange: this.values.default_locale
|
||||
}),
|
||||
Switch.component({
|
||||
state: this.values.show_language_selector(),
|
||||
onchange: this.values.show_language_selector,
|
||||
children: app.translator.trans('core.admin.basics.show_language_selector_label'),
|
||||
})
|
||||
]
|
||||
})
|
||||
: ''}
|
||||
|
||||
{Switch.component({
|
||||
state: this.values.show_language_selector(),
|
||||
onchange: this.values.show_language_selector,
|
||||
children: app.translator.trans('core.admin.basics.show_language_selector_label'),
|
||||
})}
|
||||
|
||||
<br/>
|
||||
|
||||
{FieldSet.component({
|
||||
label: app.translator.trans('core.admin.basics.home_page_heading'),
|
||||
className: 'BasicsPage-homePage',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
|
||||
fieldset {
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
> ul {
|
||||
list-style: none;
|
||||
|
|
|
@ -83,6 +83,10 @@ fieldset {
|
|||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
> ul > li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
legend {
|
||||
font-size: 14px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user