Allow locale to be selected in footer

This commit is contained in:
Toby Zerner
2015-08-05 09:50:57 +09:30
parent 48df9bb678
commit f49d0e5341
11 changed files with 87 additions and 18 deletions

View File

@ -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'})
];
}

View File

@ -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});
}
}