Onboarding for new libraries and new users

This commit is contained in:
Jared Turner
2020-06-07 18:40:31 +01:00
parent aaf0a3c6af
commit fa85d9834f
2 changed files with 123 additions and 78 deletions

View File

@@ -69,6 +69,13 @@ class MainRouter < Router
continue_reading = @context.library.get_continue_reading_entries username
recently_added = @context.library.get_recently_added_entries username
new_user = true
titles = @context.library.titles
titles.each { |t| new_user = false if t.load_percentage(username) > 0 }
empty_library = true
empty_library = false if titles.size > 0
layout "home"
rescue e
@context.error e