web: add "go home" button to catchup view

This commit is contained in:
Bill Thiede 2025-02-26 15:03:15 -08:00
parent 4c6d67901d
commit f9eafff4c7

View File

@ -198,8 +198,7 @@ fn catchup_view(
"p-4", "p-4",
"border-b", "border-b",
"border-gray-500", "border-gray-500",
"bg-black", "bg-black/50",
"opacity-50",
], ],
div![ div![
C!["absolute", "top-0", "right-4", "text-gray-500", "p-4"], C!["absolute", "top-0", "right-4", "text-gray-500", "p-4"],
@ -224,20 +223,28 @@ fn catchup_view(
"p-4", "p-4",
"border-t", "border-t",
"border-gray-500", "border-gray-500",
"bg-black", "bg-black/50",
"opacity-50",
], ],
button![ button![
tw_classes::button(), tw_classes::button(),
span![i![C!["far", "fa-envelope"]]], span![i![C!["far", "fa-envelope"]]],
span![C!["pl-2"], "Keep unread"], span![C!["pl-2"], "Keep unread"],
ev(Ev::Click, move |_| Msg::CatchupKeepUnread) ev(Ev::Click, |_| Msg::CatchupKeepUnread)
],
button![
tw_classes::button(),
span![i![C!["fas", "fa-house"]]],
span![C!["pl-2"], "Go home"],
ev(Ev::Click, |_| Msg::MultiMsg(vec![
Msg::CatchupExit,
Msg::GoToSearchResults
]))
], ],
button![ button![
tw_classes::button_with_color("bg-green-800", "hover:bg-neutral-700"), tw_classes::button_with_color("bg-green-800", "hover:bg-neutral-700"),
span![i![C!["far", "fa-envelope-open"]]], span![i![C!["far", "fa-envelope-open"]]],
span![C!["pl-2"], "Mark as read"], span![C!["pl-2"], "Mark as read"],
ev(Ev::Click, move |_| Msg::CatchupMarkAsRead) ev(Ev::Click, |_| Msg::CatchupMarkAsRead)
] ]
], ],
reading_progress(read_completion_ratio) reading_progress(read_completion_ratio)