mirror of
https://github.com/flarum/framework.git
synced 2025-05-31 12:35:48 +08:00
Allow locale to be selected in footer
This commit is contained in:
@ -27,7 +27,7 @@ export default class SelectDropdown extends Dropdown {
|
||||
if (label instanceof Array) label = label[0];
|
||||
|
||||
return [
|
||||
<span className="Button-label">{label}</span>, ' ',
|
||||
<span className="Button-label">{label}</span>,
|
||||
icon(this.props.caretIcon, {className: 'Button-caret'})
|
||||
];
|
||||
}
|
||||
|
@ -100,4 +100,18 @@ export default class User extends mixin(Model, {
|
||||
};
|
||||
image.src = this.avatarUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the user's preferences.
|
||||
*
|
||||
* @param {Object} newPreferences
|
||||
* @return {Promise}
|
||||
*/
|
||||
savePreferences(newPreferences) {
|
||||
const preferences = this.preferences();
|
||||
|
||||
Object.assign(preferences, newPreferences);
|
||||
|
||||
return this.save({preferences});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user