const notif = function (title, html) { html = html.replace(/${title} ${html} \ `; }; const 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 occurred. ",
` Try reloading, and if the problem persists,
resetting the app.
You can also report this issue on GitHub. `,
);
app.templates.notifQuotaExceeded = () =>
textNotif(
" 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.notifCookieBlocked = () =>
textNotif(
" Please enable cookies. ",
" DevDocs will not work properly if cookies are disabled. ",
);
app.templates.notifInvalidLocation = () =>
textNotif(
` DevDocs must be loaded from ${app.config.production_host} `,
" Otherwise things are likely to break. ",
);
app.templates.notifImportInvalid = () =>
textNotif(
" Oops, an error occurred. ",
" The file you selected is invalid. ",
);
app.templates.notifNews = (news) =>
notif(
"Changelog",
`
→
${doc.release}`;
}
}
html += "Disabled:'; html += '
→
${doc.release}`;
}
html += 'Enable';
}
html += "