Skip to content

Commit

Permalink
[UI] modules.php : Modify the text to explain that Cypht supports JMA…
Browse files Browse the repository at this point in the history
…P (RFC8621) by default.
  • Loading branch information
Bienvenumoringa committed Oct 8, 2024
1 parent 8837a80 commit 1c37cd5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/nux/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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_Feed_List::dump(false));
}
if (data_source_available($modules, 'profiles')) {
Hm_Profiles::init($this);
$profiles = Hm_Profiles::count();
Expand All @@ -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'));
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -541,7 +546,7 @@ protected function output() {
class Hm_Output_nux_help extends Hm_Output_Module {
protected function output() {
return '<div class="nux_help mt-3 col-lg-6 col-md-12 col-sm-12"><div class="card"><div class="card-body"><div class="card_title"><h4>'.$this->trans('Help').'</h4></div>'.
$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).').' '.
'</div></div></div>';
}
}
Expand All @@ -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 = '<div class="nux_welcome mt-3 col-lg-6 col-md-5 col-sm-12"><div class="card"><div class="card-body"><div class="card-title"><h4>'.$this->trans('Welcome to Cypht').'</h4></div>';
$res .= '<div class="mb-3"><p>'.$this->trans('Add a popular E-mail source quickly and easily').'</p>';
$res .= '<a class="mt-3 btn btn-light" href="?page=servers#quick_add_section"><i class="bi bi-person-plus me-3"></i>'.$this->trans('Add an E-mail Account').'</a>';
$res .= '</div><ul class="mt-4">';


foreach ($protos as $proto) {
$proto_dsp = $proto;
if ($proto == 'feeds') {
Expand Down

0 comments on commit 1c37cd5

Please sign in to comment.