diff options
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r-- | www/js/views/home.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/www/js/views/home.js b/www/js/views/home.js index 998af1c..d82b874 100644 --- a/www/js/views/home.js +++ b/www/js/views/home.js @@ -24,11 +24,14 @@ afterDisplay: function() { $('#load-screen').hide(); + if ( FMS.isOffline ) { this.navigate( 'offline' ); + } else if ( !FMS.isLoggedIn && CONFIG.LOGIN_REQUIRED ) { + this.navigate( 'login' ); } else if ( FMS.currentDraft && ( FMS.currentDraft.get('title') || FMS.currentDraft.get('lat') || - FMS.currentDraft.get('details') || FMS.currentDraft.get('file') ) + FMS.currentDraft.get('details') || FMS.currentDraft.get('files').length > 0 ) ) { this.navigate( 'existing' ); } else { |