X-Git-Url: http://git.squeep.com/?p=squeep-html-template-helper;a=blobdiff_plain;f=lib%2Ftemplate-helper.js;fp=lib%2Ftemplate-helper.js;h=7f7021ae010f2a58be394f17e23ea4120a4570d7;hp=e48cdb4fc5e59e17e5179b35a0339f357ba657be;hb=3501e7042eeb4a104e4f001b2641d41023087b1a;hpb=084ad86d1dde896c0f49498f5573fcc6a60fddd8
diff --git a/lib/template-helper.js b/lib/template-helper.js
index e48cdb4..7f7021a 100644
--- a/lib/template-helper.js
+++ b/lib/template-helper.js
@@ -358,12 +358,9 @@ ${UL(ctx.notifications, 1)}
/**
- * Render all parts of an HTML page. Adds user logout nav link automatically.
+ * Render all parts of an HTML page.
* @param {Number} pagePathLevel - relative path-distance to base
* @param {Object} ctx
- * @param {Object=} ctx.session
- * @param {String=} ctx.session.authenticatedIdentifier
- * @param {String=} ctx.session.authenticatedProfile
* @param {String[]=} ctx.errors
* @param {String[]=} ctx.notifications
* @param {Object} options
@@ -382,22 +379,6 @@ ${UL(ctx.notifications, 1)}
* @returns {String}
*/
function htmlPage(pagePathLevel, ctx, options, main = []) {
- const user = ctx?.session?.authenticatedProfile || ctx?.session?.authenticatedIdentifier;
- if (user) {
- if (!options.navLinks) {
- options.navLinks = [];
- }
- const logoutRedirect = ctx?.url ? `?r=${encodeURIComponent(ctx.url)}` : '';
- const adminPath = (pagePathLevel > 0) ? `${'../'.repeat(pagePathLevel - 1)}` : 'admin/';
- options.navLinks.push({
- text: 'Account',
- href: `${adminPath}settings`,
- }, {
- text: `Logout (${user})`,
- href: `${adminPath}logout${logoutRedirect}`,
- });
- }
-
return [
'',
'',