From 871ae5d7d285b216021e782ab57ab403d2dfd194 Mon Sep 17 00:00:00 2001 From: Kristian Feldsam Date: Sun, 3 Sep 2023 18:34:20 +0200 Subject: [PATCH] [Web] mobile devices styling fixes and enhancements Signed-off-by: Kristian Feldsam --- data/web/css/build/015-responsive.css | 15 +++- data/web/js/build/013-mailcow.js | 2 +- data/web/js/site/admin.js | 30 ++++---- data/web/js/site/mailbox.js | 68 +++++++++---------- .../templates/admin/tab-config-admins.twig | 8 +-- data/web/templates/admin/tab-config-f2b.twig | 7 +- .../templates/admin/tab-config-rsettings.twig | 8 ++- data/web/templates/fido2.twig | 4 +- data/web/templates/index.twig | 24 +++---- data/web/templates/mailbox/tab-bcc.twig | 16 ++--- .../templates/mailbox/tab-domain-aliases.twig | 8 +-- data/web/templates/mailbox/tab-domains.twig | 8 +-- data/web/templates/mailbox/tab-filters.twig | 16 ++--- data/web/templates/mailbox/tab-mailboxes.twig | 8 +-- .../templates/mailbox/tab-mbox-aliases.twig | 10 +-- data/web/templates/mailbox/tab-resources.twig | 8 +-- data/web/templates/mailbox/tab-syncjobs.twig | 8 +-- .../mailbox/tab-templates-domains.twig | 12 ++-- .../templates/mailbox/tab-templates-mbox.twig | 12 ++-- .../web/templates/mailbox/tab-tls-policy.twig | 8 +-- 20 files changed, 148 insertions(+), 132 deletions(-) diff --git a/data/web/css/build/015-responsive.css b/data/web/css/build/015-responsive.css index a626a384..57ce8023 100644 --- a/data/web/css/build/015-responsive.css +++ b/data/web/css/build/015-responsive.css @@ -38,7 +38,7 @@ @media (max-width: 767px) { - .responsive-tabs .tab-pane { + .responsive-tabs .tab-pane:not(.rsettings) { display: block !important; opacity: 1; } @@ -206,6 +206,19 @@ .senders-mw220 { max-width: 100% !important; } + + table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before, + table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before, + table.dataTable td.dt-control:before { + height: 2rem; + width: 2rem; + line-height: 2rem; + margin-top: -15px; + } + + li .dtr-data { + padding: 0; + } } @media (max-width: 350px) { diff --git a/data/web/js/build/013-mailcow.js b/data/web/js/build/013-mailcow.js index e659915b..6291c8b4 100644 --- a/data/web/js/build/013-mailcow.js +++ b/data/web/js/build/013-mailcow.js @@ -121,7 +121,7 @@ $(document).ready(function() { if (lastTab) { $('[data-bs-target="#' + lastTab + '"]').click(); var tab = $('[id^="' + lastTab + '"]'); - $(tab).find('.card-body.collapse').collapse('show'); + $(tab).find('.card-body.collapse:first').collapse('show'); } }); })(); diff --git a/data/web/js/site/admin.js b/data/web/js/site/admin.js index 252da9a1..80da6416 100644 --- a/data/web/js/site/admin.js +++ b/data/web/js/site/admin.js @@ -510,9 +510,9 @@ jQuery(function($){ if (table == 'relayhoststable') { $.each(data, function (i, item) { item.action = ''; if (item.used_by_mailboxes == '') { item.in_use_by = item.used_by_domains; } else if (item.used_by_domains == '') { item.in_use_by = item.used_by_mailboxes; } @@ -528,9 +528,9 @@ jQuery(function($){ item.username = ' ' + item.username; } item.action = ''; item.chkbox = ''; }); @@ -542,21 +542,21 @@ jQuery(function($){ }); item.recipients = rcpts.join('
'); item.action = ''; }); } else if (table == 'forwardinghoststable') { $.each(data, function (i, item) { item.action = ''; item.chkbox = ''; }); } else if (table == 'oauth2clientstable') { $.each(data, function (i, item) { item.action = ''; item.scope = "profile"; item.grant_types = 'refresh_token password authorization_code'; @@ -568,9 +568,9 @@ jQuery(function($){ item.selected_domains = item.selected_domains.toString().replace(/,/g, "
"); item.chkbox = ''; item.action = ''; }); } else if (table == 'adminstable') { @@ -582,8 +582,8 @@ jQuery(function($){ } item.chkbox = ''; item.action = ''; }); } diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 50ce59df..b258a42e 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -469,13 +469,13 @@ jQuery(function($){ item.chkbox = ''; item.action = '
'; if (role == "admin") { - item.action += ' ' + lang.edit + '' + - ' ' + lang.remove + '' + - ' DNS
'; + item.action += ' ' + lang.edit + '' + + ' ' + lang.remove + '' + + ' DNS'; } else { - item.action += ' ' + lang.edit + '' + - ' DNS'; + item.action += ' ' + lang.edit + '' + + ' DNS'; } if (Array.isArray(item.tags)){ @@ -671,13 +671,13 @@ jQuery(function($){ if (item.template.toLowerCase() == "default"){ item.action = ''; } else { item.action = ''; } @@ -912,18 +912,18 @@ jQuery(function($){ if (acl_data.login_as === 1) { item.action = '
' + - ' ' + lang.edit + '' + - ' ' + lang.remove + '' + - ''; + ' ' + lang.edit + '' + + ' ' + lang.remove + '' + + ''; if (ALLOW_ADMIN_EMAIL_LOGIN) { - item.action += ''; + item.action += ''; } item.action += '
'; } else { item.action = ''; } item.in_use = { @@ -1190,13 +1190,13 @@ jQuery(function($){ if (item.template.toLowerCase() == "default"){ item.action = ''; } else { item.action = ''; } @@ -1378,8 +1378,8 @@ jQuery(function($){ item.multiple_bookings = '' + lang.booking_custom_short + ' (' + item.multiple_bookings + ')'; } item.action = ''; item.chkbox = ''; item.name = escapeHtml(item.name); @@ -1518,8 +1518,8 @@ jQuery(function($){ dataSrc: function(json){ $.each(json, function (i, item) { item.action = ''; item.chkbox = ''; item.local_dest = escapeHtml(item.local_dest); @@ -1632,8 +1632,8 @@ jQuery(function($){ item.recipient_map_old = escapeHtml(item.recipient_map_old); item.recipient_map_new = escapeHtml(item.recipient_map_new); item.action = ''; item.chkbox = ''; }); @@ -1734,8 +1734,8 @@ jQuery(function($){ item.parameters = '' + escapeHtml(item.parameters) + ''; } item.action = ''; item.chkbox = ''; }); @@ -1832,8 +1832,8 @@ jQuery(function($){ dataSrc: function(json){ $.each(json, function (i, item) { item.action = ''; item.chkbox = ''; item.goto = escapeHtml(item.goto.replace(/,/g, " ")); @@ -1991,9 +1991,9 @@ jQuery(function($){ item.alias_domain = escapeHtml(item.alias_domain); item.action = '' + + ' ' + lang.edit + '' + + ' ' + lang.remove + '' + + ' DNS' + ''; item.chkbox = ''; if(item.parent_is_backupmx == '1') { @@ -2093,8 +2093,8 @@ jQuery(function($){ } item.server_w_port = escapeHtml(item.user1) + '@' + escapeHtml(item.host1) + ':' + escapeHtml(item.port1); item.action = ''; item.chkbox = ''; if (item.is_running == 1) { @@ -2247,8 +2247,8 @@ jQuery(function($){ item.script_data = '
' + escapeHtml(item.script_data) + '
' item.filter_type = '
' + item.filter_type.charAt(0).toUpperCase() + item.filter_type.slice(1).toLowerCase() + '
' item.action = ''; item.chkbox = '' }); diff --git a/data/web/templates/admin/tab-config-admins.twig b/data/web/templates/admin/tab-config-admins.twig index b672b815..44342af4 100644 --- a/data/web/templates/admin/tab-config-admins.twig +++ b/data/web/templates/admin/tab-config-admins.twig @@ -122,8 +122,8 @@
-
- +
+
@@ -166,8 +166,8 @@
- - + +
diff --git a/data/web/templates/admin/tab-config-f2b.twig b/data/web/templates/admin/tab-config-f2b.twig index de4a7c63..a353f7fa 100644 --- a/data/web/templates/admin/tab-config-f2b.twig +++ b/data/web/templates/admin/tab-config-f2b.twig @@ -92,13 +92,14 @@ {% endif %} {% for active_ban in f2b_data.active_bans %}

- + {{ active_ban.network }} ({{ active_ban.banned_until }}) - - + + - {% if active_ban.queued_for_unban == 0 %} [{{ lang.admin.queue_unban }}] [whitelist] @@ -111,7 +112,7 @@


{% for perm_ban in f2b_data.perm_bans %}

- + {{ perm_ban.network }} diff --git a/data/web/templates/admin/tab-config-rsettings.twig b/data/web/templates/admin/tab-config-rsettings.twig index 38b0d593..439e55a3 100644 --- a/data/web/templates/admin/tab-config-rsettings.twig +++ b/data/web/templates/admin/tab-config-rsettings.twig @@ -44,7 +44,7 @@

{{ lang.admin.rsetting_no_selection }}

{% for rsetting in rsettings %} - -
- - +
+
+ + +
{% if not oauth2_request %} - +
{% endif %}
@@ -62,19 +66,15 @@
{% if not oauth2_request and (mailcow_apps or app_links) %} {{ ui_texts.apps_name|raw }}
-
+
{% for app in mailcow_apps %} {% if not skip_sogo or not is_uri('SOGo', app.link) %} - - {% endif %} + {{ app.name }} + {% endif %} {% endfor %} {% for row in app_links %} {% for key, val in row %} -
- {{ key }} -
+ {{ key }} {% endfor %} {% endfor %}
diff --git a/data/web/templates/mailbox/tab-bcc.twig b/data/web/templates/mailbox/tab-bcc.twig index 25844e48..eedb04b2 100644 --- a/data/web/templates/mailbox/tab-bcc.twig +++ b/data/web/templates/mailbox/tab-bcc.twig @@ -11,7 +11,7 @@
-
-
+
diff --git a/data/web/templates/mailbox/tab-domain-aliases.twig b/data/web/templates/mailbox/tab-domain-aliases.twig index 6cefd093..4bbfbbe5 100644 --- a/data/web/templates/mailbox/tab-domain-aliases.twig +++ b/data/web/templates/mailbox/tab-domain-aliases.twig @@ -11,7 +11,7 @@
-
+
diff --git a/data/web/templates/mailbox/tab-domains.twig b/data/web/templates/mailbox/tab-domains.twig index 8b2d61b7..49cb89b6 100644 --- a/data/web/templates/mailbox/tab-domains.twig +++ b/data/web/templates/mailbox/tab-domains.twig @@ -12,7 +12,7 @@
{#
#} -
+
@@ -35,8 +35,8 @@
- - + + {% if mailcow_cc_role == 'admin' %} - + {% endif %}
diff --git a/data/web/templates/mailbox/tab-filters.twig b/data/web/templates/mailbox/tab-filters.twig index 203d3911..8ccff27a 100644 --- a/data/web/templates/mailbox/tab-filters.twig +++ b/data/web/templates/mailbox/tab-filters.twig @@ -11,7 +11,7 @@
-
+
{{ lang.mailbox.toggle_all }} {{ lang.mailbox.quick_actions }} @@ -34,8 +34,8 @@
@@ -64,8 +64,8 @@
- - + +
@@ -82,8 +82,8 @@
- - + +
diff --git a/data/web/templates/mailbox/tab-mailboxes.twig b/data/web/templates/mailbox/tab-mailboxes.twig index 9b827989..fce7d627 100644 --- a/data/web/templates/mailbox/tab-mailboxes.twig +++ b/data/web/templates/mailbox/tab-mailboxes.twig @@ -11,7 +11,7 @@
-
+
{{ lang.mailbox.toggle_all }} {{ lang.mailbox.quick_actions }} @@ -128,8 +128,8 @@
{{ lang.mailbox.toggle_all }} diff --git a/data/web/templates/mailbox/tab-mbox-aliases.twig b/data/web/templates/mailbox/tab-mbox-aliases.twig index 7035ac21..02b5b6d0 100644 --- a/data/web/templates/mailbox/tab-mbox-aliases.twig +++ b/data/web/templates/mailbox/tab-mbox-aliases.twig @@ -11,7 +11,7 @@
-
+
diff --git a/data/web/templates/mailbox/tab-resources.twig b/data/web/templates/mailbox/tab-resources.twig index b23231f2..34728eda 100644 --- a/data/web/templates/mailbox/tab-resources.twig +++ b/data/web/templates/mailbox/tab-resources.twig @@ -11,7 +11,7 @@
-
+
diff --git a/data/web/templates/mailbox/tab-syncjobs.twig b/data/web/templates/mailbox/tab-syncjobs.twig index d634d40b..bfd8eefb 100644 --- a/data/web/templates/mailbox/tab-syncjobs.twig +++ b/data/web/templates/mailbox/tab-syncjobs.twig @@ -11,7 +11,7 @@
-
+
diff --git a/data/web/templates/mailbox/tab-templates-domains.twig b/data/web/templates/mailbox/tab-templates-domains.twig index c339aaf0..f3c6a678 100644 --- a/data/web/templates/mailbox/tab-templates-domains.twig +++ b/data/web/templates/mailbox/tab-templates-domains.twig @@ -1,4 +1,4 @@ -
+
-
-
+
+
@@ -31,8 +31,8 @@
- - + + {% if mailcow_cc_role == 'admin' %} - + {% endif %}
diff --git a/data/web/templates/mailbox/tab-templates-mbox.twig b/data/web/templates/mailbox/tab-templates-mbox.twig index 631394bb..71edb9d3 100644 --- a/data/web/templates/mailbox/tab-templates-mbox.twig +++ b/data/web/templates/mailbox/tab-templates-mbox.twig @@ -1,4 +1,4 @@ -
+
-
-
+
+
@@ -31,8 +31,8 @@
- - + + {% if mailcow_cc_role == 'admin' %} - + {% endif %}
diff --git a/data/web/templates/mailbox/tab-tls-policy.twig b/data/web/templates/mailbox/tab-tls-policy.twig index 64bce55f..3195b754 100644 --- a/data/web/templates/mailbox/tab-tls-policy.twig +++ b/data/web/templates/mailbox/tab-tls-policy.twig @@ -11,7 +11,7 @@