mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 02:13:38 +08:00
Minor code optimization
This commit is contained in:
parent
8f070c2008
commit
5128aa1052
|
@ -35,19 +35,19 @@ export default ObjectController.extend(CanCheckEmails, {
|
|||
canEditName: Discourse.computed.setting('enable_names'),
|
||||
|
||||
canSelectTitle: function() {
|
||||
return Discourse.SiteSettings.enable_badges && this.get('model.has_title_badges');
|
||||
return this.siteSettings.enable_badges && this.get('model.has_title_badges');
|
||||
}.property('model.badge_count'),
|
||||
|
||||
canChangePassword: function() {
|
||||
return !Discourse.SiteSettings.enable_sso && Discourse.SiteSettings.enable_local_logins;
|
||||
return !this.siteSettings.enable_sso && this.siteSettings.enable_local_logins;
|
||||
}.property(),
|
||||
|
||||
canReceiveDigest: function() {
|
||||
return !this.siteSettings.disable_digest_emails
|
||||
return !this.siteSettings.disable_digest_emails;
|
||||
}.property(),
|
||||
|
||||
availableLocales: function() {
|
||||
return Discourse.SiteSettings.available_locales.split('|').map( function(s) {
|
||||
return this.siteSettings.available_locales.split('|').map( function(s) {
|
||||
return {name: s, value: s};
|
||||
});
|
||||
}.property(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user