From d1d141b3a82117ef9882fff0eb8a5ab9b2bfe93c Mon Sep 17 00:00:00 2001 From: Bienvenumoringa Date: Tue, 8 Oct 2024 20:50:23 +0200 Subject: [PATCH] [UI] modules.php : Modify the text to explain that Cypht supports JMAP (RFC8621) by default. --- modules/nux/modules.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/nux/modules.php b/modules/nux/modules.php index 1024905138..7004632e6a 100644 --- a/modules/nux/modules.php +++ b/modules/nux/modules.php @@ -67,6 +67,7 @@ public function process() { $imap_servers = NULL; $smtp_servers = NULL; $feed_servers = NULL; + $jmap_servers = NULL; $profiles = NULL; $modules = $this->config->get_modules(); @@ -80,6 +81,9 @@ public function process() { if (data_source_available($modules, 'smtp')) { $smtp_servers = count(Hm_SMTP_List::dump(false)); } + if (data_source_available($modules, 'jmap')) { + $jmap_servers = count(Hm_IMAP_List::dump(false)); + } if (data_source_available($modules, 'profiles')) { Hm_Profiles::init($this); $profiles = Hm_Profiles::count(); @@ -89,6 +93,7 @@ public function process() { 'imap' => $imap_servers, 'feeds' => $feed_servers, 'smtp' => $smtp_servers, + 'jmap' => $jmap_servers, 'profiles' => $profiles )); $this->out('tzone', $this->user_config->get('timezone_setting')); @@ -364,7 +369,7 @@ public function process() continue; } } - } + } if (! empty($server['smtp']['server'])) { if (!$this->module_is_supported('smtp')) { $errors[] = 'SMTP module is not enabled'; @@ -541,7 +546,7 @@ protected function output() { class Hm_Output_nux_help extends Hm_Output_Module { protected function output() { return '

'.$this->trans('Help').'

'. - $this->trans('Cypht is a webmail program. You can use it to access your E-mail accounts from any service that offers IMAP, or SMTP access - which most do.').' '. + $this->trans('Cypht is a webmail program. You can use it to access your E-mail accounts from any service that offers IMAP, or SMTP access - which most do. And Cypht also supports the newest protocol: JMAP (RFC8621).').' '. '
'; } } @@ -556,13 +561,14 @@ protected function output() { } $server_data = $this->get('nux_server_setup', array()); $tz = $this->get('tzone'); - $protos = array('imap', 'smtp', 'feeds', 'profiles'); + $protos = array('imap', 'smtp', 'jmap', 'feeds', 'profiles'); $res = '

'.$this->trans('Welcome to Cypht').'

'; $res .= '

'.$this->trans('Add a popular E-mail source quickly and easily').'

'; $res .= ''.$this->trans('Add an E-mail Account').''; $res .= '
    '; + foreach ($protos as $proto) { $proto_dsp = $proto; if ($proto == 'feeds') {