This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 9f0008abe724d117b7d0d456777ffa9d837d007d Author: Daniel Gruno <[email protected]> AuthorDate: Sat Nov 13 17:18:45 2021 +0100 Move page title default into config.js --- webui/js/config.js | 3 ++- webui/js/ponymail.js | 5 ++--- webui/js/source/init.js | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/webui/js/config.js b/webui/js/config.js index db563d9..08bbf09 100644 --- a/webui/js/config.js +++ b/webui/js/config.js @@ -62,7 +62,8 @@ var prefs = { hideStats: 'yes', // Hide the email statistics window? theme: 'default', // Set to 'social' to default to the social theme loggedIn: false, - UTC: true, // Use UTC for timestamps in UI. If false, use browser local time. + UTC: false, // Use UTC for timestamps in UI. If false, use browser local time. + title: "Apache Pony Mail" // Default browser window title } // array of prefs we have now. This is needed in case we change/break the existing diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js index 91a2c5f..832ffa2 100644 --- a/webui/js/ponymail.js +++ b/webui/js/ponymail.js @@ -1644,7 +1644,6 @@ function showCalendarPicker(parent, seedDate) { ******************************************/ var ponymail_version = "1.0.1-Foal" // Current version of Pony Mail -var ponymail_name = "Pony Mail" // name of archive (set to "Foo's mail archive" or whatever) var apiURL = ''; // external API URL. Usually left blank. @@ -1676,10 +1675,10 @@ var collated_json = {}; console.log("/******* Apache Pony Mail (Foal v/%s) Initializing ********/".format(ponymail_version)) // Adjust titles: -document.title = ponymail_name; +document.title = prefs.title; let titles = document.getElementsByClassName("title"); for (var i in titles) { - titles[i].innerText = ponymail_name; + titles[i].innerText = prefs.title; } // check local storage for settings diff --git a/webui/js/source/init.js b/webui/js/source/init.js index 411f1ec..e604e03 100644 --- a/webui/js/source/init.js +++ b/webui/js/source/init.js @@ -16,7 +16,6 @@ */ var ponymail_version = "1.0.1-Foal" // Current version of Pony Mail -var ponymail_name = "Pony Mail" // name of archive (set to "Foo's mail archive" or whatever) var apiURL = ''; // external API URL. Usually left blank. @@ -48,10 +47,10 @@ var collated_json = {}; console.log("/******* Apache Pony Mail (Foal v/%s) Initializing ********/".format(ponymail_version)) // Adjust titles: -document.title = ponymail_name; +document.title = prefs.title; let titles = document.getElementsByClassName("title"); for (var i in titles) { - titles[i].innerText = ponymail_name; + titles[i].innerText = prefs.title; } // check local storage for settings
