From 22289f2946b61d87232c9aeb573c352d99814237 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 17 Nov 2022 21:56:49 +0100 Subject: [PATCH] Hide empty text as soon as another inbox entry appears --- app/javascript/styles/_utilities.scss | 4 ++++ app/javascript/styles/components/_inbox-entry.scss | 2 +- app/views/inbox/show.html.haml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/_utilities.scss b/app/javascript/styles/_utilities.scss index e1a5cb5d..249b170d 100644 --- a/app/javascript/styles/_utilities.scss +++ b/app/javascript/styles/_utilities.scss @@ -9,3 +9,7 @@ .pe-none { pointer-events: none; } + +.empty:not(:only-child) { + display: none; +} diff --git a/app/javascript/styles/components/_inbox-entry.scss b/app/javascript/styles/components/_inbox-entry.scss index b081af69..38cdf4ba 100644 --- a/app/javascript/styles/components/_inbox-entry.scss +++ b/app/javascript/styles/components/_inbox-entry.scss @@ -19,4 +19,4 @@ } } } -} \ No newline at end of file +} diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 432ec743..f829ea7e 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -3,7 +3,7 @@ = render "inbox/entry", i: i - if @inbox.empty? - = t(".empty") + %p.empty= t(".empty") - if @more_data_available .d-flex.justify-content-center#paginator