notif = (title, html) -> html = html.replace /#{title}#{html}""" textNotif = (title, message) -> notif title, """
#{message}"""
app.templates.notifUpdateReady = ->
textNotif """ DevDocs has been updated. """,
""" Reload the page to use the new version. """
app.templates.notifError = ->
textNotif """ Oops, an error occured. """,
""" Try reloading, and if the problem persists,
resetting the app.
You can also report this issue on GitHub. """
app.templates.notifQuotaExceeded = ->
textNotif """ Oops, the offline database has exceeded its size limitation. """,
""" Unfortunately this quota can't be detected programmatically, and the database can't be opened while over the quota, so it had to be reset. """
app.templates.notifInvalidLocation = ->
textNotif """ DevDocs must be loaded from #{app.config.production_host} """,
""" Otherwise things are likely to break. """
app.templates.notifNews = (news) ->
notif 'Changelog', """
→
#{doc.release}" if doc.release
html += 'Disabled:' html += '
→
#{doc.release}" if doc.release
html += """Enable"""
html += '