Skip to content

Commit 0dfaedf

Browse files
committed
fix(frontend): change msg_actions to look like proper buttons
1 parent e857d5c commit 0dfaedf

File tree

3 files changed

+24
-30
lines changed

3 files changed

+24
-30
lines changed

modules/core/site.css

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -981,13 +981,14 @@ div.unseen,
981981
.mobile .folder_list {
982982
margin-right: 0px;
983983
width: 100%;
984+
padding-top: 0px;
984985
}
985986
.mobile .folder_list li {
986987
padding-top: 5px;
987988
padding-bottom: 5px;
988989
}
989990
.mobile .content_cell {
990-
padding-top: 60px;
991+
padding-top: 50px;
991992
display: block;
992993
width: 100%;
993994
}
@@ -1021,9 +1022,6 @@ div.unseen,
10211022
.mobile .message_table {
10221023
padding-left: 5px !important;
10231024
}
1024-
.mobile .message_list {
1025-
margin-top: 30px !important;
1026-
}
10271025
.mobile .list_settings_link {
10281026
width: 24px;
10291027
height: 24px;
@@ -1032,7 +1030,7 @@ div.unseen,
10321030
.mobile .msg_text {
10331031
white-space: nowrap !important;
10341032
width: 100%;
1035-
max-width: 480px !important;
1033+
max-width: 768px !important;
10361034
word-break: break-all;
10371035
word-wrap: break-word;
10381036
font-size: 100%;
@@ -1431,7 +1429,7 @@ div.unseen,
14311429
z-index: 1000;
14321430
text-align: left;
14331431
top: 0;
1434-
padding: 15px 0 15px 20px;
1432+
padding: 10px 0 10px 20px;
14351433
background: #fff;
14361434
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
14371435
backdrop-filter: blur(10px);
@@ -1649,18 +1647,14 @@ a[disabled] {
16491647
}
16501648

16511649
.msg_actions a {
1652-
padding: 0.5rem;
1653-
border-radius: 0.25rem;
1654-
background-color: #f8f9fa;
1655-
text-decoration: none;
16561650
color: #495057;
1657-
font-size: 0.6rem;
1658-
margin-right: 0;
1651+
font-size: 0.85rem;
16591652
}
16601653

16611654
.mobile nav.folder_cell { width: 50%; }
16621655
}
16631656

16641657
@media (max-width: 575px) {
16651658
.mobile nav.folder_cell { width: 100%; }
1659+
.mobile .msg_text { padding-top: 5px; }
16661660
}

modules/imap/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,10 +1533,10 @@ function tags_dropdown($context, $headers) {
15331533
if (!hm_exists('forward_dropdown')) {
15341534
function forward_dropdown($output,$reply_args) {
15351535
$txt = '<div class="dropdown d-inline-block">
1536-
<button type="button" class="btn btn-outline-success btn-sm dropdown-toggle" id="dropdownMenuForward" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">'.$output->trans('Forward').'</button>
1536+
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" id="dropdownMenuForward" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">'.$output->trans('Forward').'</button>
15371537
<ul class="dropdown-menu" aria-labelledby="dropdownMenuForward">';
1538-
$txt .= '<li><a href="?page=compose&amp;forward_as_attachment=1'.$reply_args.'" class="forward_link hlink dropdown-item d-flex justify-content-between gap-5" ><span>'.$output->trans('Forward as message attachment').'</a></li>';
1539-
$txt .= '<li><a href="?page=compose&amp;forward=1'.$reply_args.'" class="forward_link hlink dropdown-item d-flex justify-content-between gap-5"><span>'.$output->trans('Edit as new message').'</a></li>';
1538+
$txt .= '<li><a href="?page=compose&amp;forward_as_attachment=1'.$reply_args.'" class="forward_link hlink dropdown-item d-flex justify-content-between gap-5 text-decoration-none" ><span>'.$output->trans('Forward as message attachment').'</a></li>';
1539+
$txt .= '<li><a href="?page=compose&amp;forward=1'.$reply_args.'" class="forward_link hlink dropdown-item d-flex justify-content-between gap-5 text-decoration-none"><span>'.$output->trans('Edit as new message').'</a></li>';
15401540
$txt .= '</ul></div>';
15411541
return $txt;
15421542
}

modules/imap/output_modules.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -358,33 +358,33 @@ protected function output() {
358358
$txt .= '<div class="row g-0 py-3">';
359359
$txt .= '<div class="col-12 msg_actions">';
360360
$txt .= '<div class="d-flex flex-wrap gap-2 mb-3">';
361-
$txt .= '<a href="#" class="hlink all_headers text-decoration-none">'.$this->trans('All headers').'</a>';
362-
$txt .= '<a class="hlink small_headers text-decoration-none" href="#">'.$this->trans('Small headers').'</a>';
361+
$txt .= '<a href="#" class="hlink all_headers text-decoration-none btn btn-sm btn-outline-secondary">'.$this->trans('All headers').'</a>';
362+
$txt .= '<a class="hlink small_headers text-decoration-none btn btn-sm btn-outline-secondary" href="#">'.$this->trans('Small headers').'</a>';
363363
$txt .= '</div>';
364364

365365
$txt .= '<div class="d-flex flex-wrap gap-2">';
366366
if (!isset($headers['Flags']) || !mb_stristr($headers['Flags'], 'draft')) {
367-
$txt .= '<a class="reply_link hlink text-decoration-none" href="?page=compose&amp;reply=1'.$reply_args.'">'.$this->trans('Reply').'</a>';
367+
$txt .= '<a class="reply_link hlink text-decoration-none btn btn-sm btn-outline-secondary" href="?page=compose&amp;reply=1'.$reply_args.'">'.$this->trans('Reply').'</a>';
368368
if ($size > 1) {
369-
$txt .= '<a class="reply_all_link hlink text-decoration-none" href="?page=compose&amp;reply_all=1'.$reply_args.'">'.$this->trans('Reply-all').'</a>';
369+
$txt .= '<a class="reply_all_link hlink text-decoration-none btn btn-sm btn-outline-secondary" href="?page=compose&amp;reply_all=1'.$reply_args.'">'.$this->trans('Reply-all').'</a>';
370370
} else {
371371
$txt .= '<a class="reply_all_link hlink disabled_link text-decoration-none">'.$this->trans('Reply-all').'</a>';
372372
}
373373
$txt .= forward_dropdown($this, $reply_args);
374374
}
375375
if (isset($headers['Flags']) && mb_stristr($headers['Flags'], 'flagged')) {
376-
$txt .= '<a id="flag_msg" class="flagged_link hlink text-decoration-none hide" data-state="unflagged" href="#">'.$this->trans('Flag').'</a>';
377-
$txt .= '<a id="unflag_msg" class="unflagged_link hlink text-decoration-none" data-state="flagged" href="#">'.$this->trans('Unflag').'</a>';
376+
$txt .= '<a id="flag_msg" class="flagged_link hlink text-decoration-none btn btn-sm btn-outline-secondary hide" data-state="unflagged" href="#">'.$this->trans('Flag').'</a>';
377+
$txt .= '<a id="unflag_msg" class="unflagged_link hlink text-decoration-none btn btn-sm btn-outline-secondary" data-state="flagged" href="#">'.$this->trans('Unflag').'</a>';
378378
} else {
379-
$txt .= '<a id="flag_msg" class="flagged_link hlink text-decoration-none" data-state="unflagged" href="#">'.$this->trans('Flag').'</a>';
380-
$txt .= '<a id="unflag_msg" class="unflagged_link hlink text-decoration-none hide" data-state="flagged" href="#">'.$this->trans('Unflag').'</a>';
379+
$txt .= '<a id="flag_msg" class="flagged_link hlink text-decoration-none btn btn-sm btn-outline-secondary" data-state="unflagged" href="#">'.$this->trans('Flag').'</a>';
380+
$txt .= '<a id="unflag_msg" class="unflagged_link hlink text-decoration-none btn btn-sm btn-outline-secondary hide" data-state="flagged" href="#">'.$this->trans('Unflag').'</a>';
381381
}
382382

383-
$txt .= '<a class="hlink text-decoration-none" id="unread_message" href="#">'.$this->trans('Unread').'</a>';
384-
$txt .= '<a class="delete_link hlink text-decoration-none" id="delete_message" href="#">'.$this->trans('Delete').'</a>';
385-
$txt .= '<div class="position-relative"><a class="hlink" id="copy_message" href="#">'.$this->trans('Copy').'</a><div class="move_to_location"></div></div>';
386-
$txt .= '<div class="position-relative"><a class="hlink" id="move_message" href="#">'.$this->trans('Move').'</a><div class="move_to_location"></div></div>';
387-
$txt .= '<a class="archive_link hlink text-decoration-none" id="archive_message" href="#">'.$this->trans('Archive').'</a>';
383+
$txt .= '<a class="hlink text-decoration-none btn btn-sm btn-outline-secondary" id="unread_message" href="#">'.$this->trans('Unread').'</a>';
384+
$txt .= '<a class="delete_link hlink text-decoration-none btn btn-sm btn-outline-secondary" id="delete_message" href="#">'.$this->trans('Delete').'</a>';
385+
$txt .= '<div class="position-relative"><a class="hlink text-decoration-none btn btn-sm btn-outline-secondary dropdown-toggle" id="copy_message" href="#">'.$this->trans('Copy').'</a><div class="move_to_location"></div></div>';
386+
$txt .= '<div class="position-relative"><a class="hlink text-decoration-none btn btn-sm btn-outline-secondary dropdown-toggle" id="move_message" href="#">'.$this->trans('Move').'</a><div class="move_to_location"></div></div>';
387+
$txt .= '<a class="archive_link hlink text-decoration-none btn btn-sm btn-outline-secondary" id="archive_message" href="#">'.$this->trans('Archive').'</a>';
388388

389389
if($this->get('tags')){
390390
$txt .= tags_dropdown($this, $headers);
@@ -414,10 +414,10 @@ protected function output() {
414414
$txt .= block_filter_dropdown($this);
415415
}
416416
} else {
417-
$txt .= '<span data-bs-toogle="tooltip" title="This functionality requires the email server support &quot;Sieve&quot; technology which is not provided. Contact your email provider to fix it or enable it if supported."><i class="bi bi-lock-fill"></i> <span id="filter_block_txt">'.$this->trans('Block Sender').'</span></span>';
417+
$txt .= '<span class="btn btn-sm" data-bs-toogle="tooltip" title="This functionality requires the email server support &quot;Sieve&quot; technology which is not provided. Contact your email provider to fix it or enable it if supported."><i class="bi bi-lock-fill"></i> <span id="filter_block_txt">'.$this->trans('Block Sender').'</span></span>';
418418
}
419419
}
420-
$txt .= '<a class="hlink text-decoration-none" id="show_message_source" href="#">' . $this->trans('Show Source') . '</a>';
420+
$txt .= '<a class="hlink text-decoration-none btn btn-sm btn-outline-secondary" id="show_message_source" href="#">' . $this->trans('Show Source') . '</a>';
421421

422422
$txt .= '</ul><span id="extra-header-buttons"></span>';
423423
$txt .= '<input type="hidden" class="move_to_type" value="" />';

0 commit comments

Comments
 (0)