mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 07:02:46 +08:00
Missing Loading Route
This commit is contained in:
parent
bf666f8553
commit
a710ff08ad
|
@ -3,7 +3,7 @@
|
|||
var classify = Ember.String.classify;
|
||||
var get = Ember.get;
|
||||
|
||||
var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin', 'adminFlags',
|
||||
var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin', 'adminFlags',
|
||||
'user', 'preferences', 'adminEmail'],
|
||||
_dummyRoute,
|
||||
_loadingView;
|
||||
|
@ -11,7 +11,8 @@ var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin
|
|||
function loadingResolver(cb) {
|
||||
return function(parsedName) {
|
||||
var fullNameWithoutType = parsedName.fullNameWithoutType;
|
||||
if (fullNameWithoutType.indexOf('Loading') > 0) {
|
||||
|
||||
if (fullNameWithoutType.indexOf('Loading') >= 0) {
|
||||
fullNameWithoutType = fullNameWithoutType.replace('Loading', '');
|
||||
if (LOADING_WHITELIST.indexOf(fullNameWithoutType) !== -1) {
|
||||
return cb(fullNameWithoutType);
|
||||
|
|
1
app/assets/javascripts/discourse/routes/loading.js.es6
Normal file
1
app/assets/javascripts/discourse/routes/loading.js.es6
Normal file
|
@ -0,0 +1 @@
|
|||
export default Ember.Route.extend();
|
Loading…
Reference in New Issue
Block a user