From 016f30d432fba69a5eb57569d297e496b99a02d0 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 26 Sep 2023 16:26:12 +0200 Subject: [PATCH] Add customizable link to a status page #1172 --- customize.dist/pages.js | 2 +- customize.dist/pages/index.js | 5 ++++- www/common/application_config_internal.js | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 0ded98bb7..7376d27b2 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -103,7 +103,7 @@ define([ source: 'https://github.com/cryptpad/cryptpad', }; var l = Msg._getLanguage(); - ['imprint', 'privacy', 'terms', 'roadmap', 'source'].forEach(function (k) { + ['imprint', 'privacy', 'terms', 'status', 'roadmap', 'source'].forEach(function (k) { var value = AppConfig[k]; //console.log('links', k, value); if (value === false) { return; } diff --git a/customize.dist/pages/index.js b/customize.dist/pages/index.js index 6f757837f..3c825929c 100644 --- a/customize.dist/pages/index.js +++ b/customize.dist/pages/index.js @@ -100,6 +100,7 @@ define([ } }; + Msg.status = "Status page"; // XXX var pageLink = function (ref, loc, text) { if (!ref) { return; } var attrs = { @@ -121,6 +122,7 @@ define([ var imprintLink = fastLink('imprint'); var privacyLink = fastLink('privacy'); var termsLink = fastLink('terms'); + var statusLink = fastLink('status'); var notice; /* Admins can specify a notice to display in application_config.js via the `homeNotice` attribute. @@ -182,7 +184,8 @@ define([ termsLink, privacyLink, imprintLink, - h('a', {href:"/contact.html"}, Msg.contact) + h('a', {href:"/contact.html"}, Msg.contact), + statusLink, ]) ]), h('div.cp-apps.col-lg-6', [ diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index e3271ac1d..cdcf6014c 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -113,6 +113,12 @@ define(function() { */ AppConfig.roadmap = false; + /* If you have a status page for your instance, you may use the setting belox + * + * See the comments above for a description of possible configurations. + */ + AppConfig.status = false; + /* By default CryptPad instances display some text on the home page indicating that * they are an independent community instance of the software. You can provide customized messages * by filling in the following data structure with strings for each language you intend to support.