From fa0aa59e6e394d82236274ba2494b1d8504f4351 Mon Sep 17 00:00:00 2001
From: Andreas Nedbal <git@pixelde.su>
Date: Sun, 29 Oct 2023 23:45:19 +0100
Subject: [PATCH] Adjust layout of inbox entry buttons

---
 app/assets/stylesheets/_utilities.scss |  4 ++++
 app/views/inbox/_entry.html.haml       | 14 ++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/assets/stylesheets/_utilities.scss b/app/assets/stylesheets/_utilities.scss
index c102283c8..5f9df7b1e 100644
--- a/app/assets/stylesheets/_utilities.scss
+++ b/app/assets/stylesheets/_utilities.scss
@@ -30,3 +30,7 @@
 .z-n1 {
   z-index: -1;
 }
+
+.grid-row-1 {
+  grid-row: 1;
+}
diff --git a/app/views/inbox/_entry.html.haml b/app/views/inbox/_entry.html.haml
index 4c9bd37b8..8e15a7a7a 100644
--- a/app/views/inbox/_entry.html.haml
+++ b/app/views/inbox/_entry.html.haml
@@ -4,13 +4,15 @@
   - if current_user == i.user
     .card-body
       %textarea.form-control.mb-3{ name: "ib-answer", placeholder: t(".placeholder"), data: { id: i.id } }
-      .d-sm-flex
-        %button.btn.btn-success.me-sm-1{ name: "ib-answer", data: { ib_id: i.id } }
-          = t("voc.answer")
-        %button.btn.btn-danger.me-sm-1{ name: "ib-destroy", data: { ib_id: i.id } }
-          = t("voc.delete")
-        %p.format-help.ms-auto.align-self-center.mt-2.mt-sm-0.text-center
+      .d-flex.flex-column-reverse.flex-sm-row
+        %p.format-help.me-sm-auto.align-self-center.mb-0.mt-2.mt-sm-0.text-center
           = render "shared/format_link"
+        .d-grid.gap-2.d-sm-block
+          %button.btn.btn-default.text-muted.me-sm-1.mb-sm-0{ name: "ib-destroy", data: { ib_id: i.id } }
+            %i.fa.fa-trash.fa-fw
+            = t("voc.delete")
+          %button.btn.btn-primary.grid-row-1{ name: "ib-answer", data: { ib_id: i.id } }
+            = t("voc.answer")
     - if current_user.sharing_enabled
       .inbox-entry__sharing.text-center.p-2.justify-content-center.d-none{
         data: { controller: "inbox-sharing", inbox_sharing_config_value: "{}", inbox_sharing_auto_close_value: current_user.sharing_autoclose.to_s } }