mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Convert Discourse.User
to use Discourse.Singleton
This commit is contained in:
parent
8e1fae0459
commit
51f5cf77fb
23 changed files with 90 additions and 57 deletions
|
@ -12,11 +12,11 @@ Discourse.AdminDashboardController = Ember.Controller.extend({
|
|||
problemsCheckMinutes: 1,
|
||||
|
||||
foundProblems: function() {
|
||||
return(Discourse.User.current('admin') && this.get('problems') && this.get('problems').length > 0);
|
||||
return(Discourse.User.currentProp('admin') && this.get('problems') && this.get('problems').length > 0);
|
||||
}.property('problems'),
|
||||
|
||||
thereWereProblems: function() {
|
||||
if(!Discourse.User.current('admin')) { return false }
|
||||
if(!Discourse.User.currentProp('admin')) { return false }
|
||||
if( this.get('foundProblems') ) {
|
||||
this.set('hadProblems', true);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue