mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08:00
Allow locale to be selected in footer
This commit is contained in:
@ -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