From 3c3b9a7719d8332235b1bc45576454616ecde640 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 10 Dec 2023 21:56:48 +0100 Subject: [PATCH] Add empty hint for home timelines --- app/views/timeline/timeline.html.haml | 3 +++ config/locales/views.en.yml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/app/views/timeline/timeline.html.haml b/app/views/timeline/timeline.html.haml index 2b3089b8..10754661 100644 --- a/app/views/timeline/timeline.html.haml +++ b/app/views/timeline/timeline.html.haml @@ -1,6 +1,9 @@ #timeline{ data: { controller: "navigation" } } %button.d-none{ data: { hotkey: "j", action: "navigation#down" } } %button.d-none{ data: { hotkey: "k", action: "navigation#up" } } + - if @timeline.empty? + = render "shared/empty", type: "timeline" + - @timeline.each do |answer| = render "answerbox", a: answer diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 09224e69..e8668906 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -581,6 +581,12 @@ en: moderation: reports: "There are no open reports right now!" inbox: "This users inbox is empty." + timeline: + heading: "Your feed is empty!" + text: "Start answering questions or follow some people to fill your feed with answers." + actions: + inbox: "Go to your inbox" + public: "Go to the public timeline" inbox: heading: "Your inbox is empty!" text: "To start answering, generate a question or share your profile on other sites to get questions."