mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Fix indentation
This commit is contained in:
parent
1d047909e8
commit
b68d7c6107
|
@ -44,23 +44,23 @@ export default class HeaderSecondary extends Component {
|
||||||
|
|
||||||
for (const locale in app.data.locales) {
|
for (const locale in app.data.locales) {
|
||||||
locales.push(Button.component({
|
locales.push(Button.component({
|
||||||
active: app.data.locale === locale,
|
active: app.data.locale === locale,
|
||||||
children: app.data.locales[locale],
|
children: app.data.locales[locale],
|
||||||
icon: app.data.locale === locale ? 'check' : true,
|
icon: app.data.locale === locale ? 'check' : true,
|
||||||
onclick: () => {
|
onclick: () => {
|
||||||
if (app.session.user) {
|
if (app.session.user) {
|
||||||
app.session.user.savePreferences({locale}).then(() => window.location.reload());
|
app.session.user.savePreferences({locale}).then(() => window.location.reload());
|
||||||
} else {
|
} else {
|
||||||
document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;
|
document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
items.add('locale', SelectDropdown.component({
|
items.add('locale', SelectDropdown.component({
|
||||||
children: locales,
|
children: locales,
|
||||||
buttonClassName: 'Button Button--link'
|
buttonClassName: 'Button Button--link'
|
||||||
}), 20);
|
}), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user