Skip to content

Commit d9b892e

Browse files
authored
Merge pull request #1642 from pom2ter/msg-actions-buttons
fix(frontend): change msg_actions to look like buttons
2 parents 739a2b4 + 23f8d4a commit d9b892e

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

modules/core/site.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,13 +1652,8 @@ a[disabled] {
16521652
}
16531653

16541654
.msg_actions a {
1655-
padding: 0.5rem;
1656-
border-radius: 0.25rem;
1657-
background-color: #f8f9fa;
1658-
text-decoration: none;
16591655
color: #495057;
1660-
font-size: 0.6rem;
1661-
margin-right: 0;
1656+
font-size: 0.85rem;
16621657
}
16631658

16641659
.mobile nav.folder_cell { width: 50%; }

modules/imap/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,10 +1534,10 @@ function tags_dropdown($context, $headers) {
15341534
if (!hm_exists('forward_dropdown')) {
15351535
function forward_dropdown($output,$reply_args) {
15361536
$txt = '<div class="dropdown d-inline-block">
1537-
<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>
1537+
<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>
15381538
<ul class="dropdown-menu" aria-labelledby="dropdownMenuForward">';
1539-
$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>';
1540-
$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>';
1539+
$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>';
1540+
$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>';
15411541
$txt .= '</ul></div>';
15421542
return $txt;
15431543
}

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="#" data-bs-toggle="dropdown">'.$this->trans('Copy').'</a><div class="move_to_location dropdown-menu" data-bs-auto-close="outside"></div></div>';
386-
$txt .= '<div class="position-relative"><a class="hlink" id="move_message" href="#" data-bs-toggle="dropdown">'.$this->trans('Move').'</a><div class="move_to_location dropdown-menu" data-bs-auto-close="outside"></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="#" data-bs-toggle="dropdown">'.$this->trans('Copy').'</a><div class="move_to_location dropdown-menu" data-bs-auto-close="outside"></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="#" data-bs-toggle="dropdown">'.$this->trans('Move').'</a><div class="move_to_location dropdown-menu" data-bs-auto-close="outside"></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 .= '</div><span id="extra-header-buttons"></span>';
423423
$txt .= '<input type="hidden" class="move_to_type" value="" />';

0 commit comments

Comments
 (0)