Compare commits

..

3 Commits

Author SHA1 Message Date
17de318645 chore: Release
All checks were successful
Continuous integration / Test Suite (push) Successful in 47s
Continuous integration / Check (push) Successful in 2m0s
Continuous integration / Trunk (push) Successful in 39s
Continuous integration / build (push) Successful in 52s
Continuous integration / Rustfmt (push) Successful in 1m6s
Continuous integration / Disallow unused dependencies (push) Successful in 56s
2025-02-26 15:43:34 -08:00
3aa0144e8d web: try setting history.scroll_restoration to manual to impove inter-page flow 2025-02-26 15:43:18 -08:00
f9eafff4c7 web: add "go home" button to catchup view 2025-02-26 15:43:18 -08:00
7 changed files with 32 additions and 17 deletions

10
Cargo.lock generated
View File

@ -2965,7 +2965,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-notmuch" name = "letterbox-notmuch"
version = "0.9.8" version = "0.9.9"
dependencies = [ dependencies = [
"itertools 0.14.0", "itertools 0.14.0",
"log", "log",
@ -2980,14 +2980,14 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-procmail2notmuch" name = "letterbox-procmail2notmuch"
version = "0.9.8" version = "0.9.9"
dependencies = [ dependencies = [
"anyhow", "anyhow",
] ]
[[package]] [[package]]
name = "letterbox-server" name = "letterbox-server"
version = "0.9.8" version = "0.9.9"
dependencies = [ dependencies = [
"ammonia", "ammonia",
"anyhow", "anyhow",
@ -3030,7 +3030,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-shared" name = "letterbox-shared"
version = "0.9.8" version = "0.9.9"
dependencies = [ dependencies = [
"build-info", "build-info",
"letterbox-notmuch", "letterbox-notmuch",
@ -3039,7 +3039,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-web" name = "letterbox-web"
version = "0.9.8" version = "0.9.9"
dependencies = [ dependencies = [
"build-info", "build-info",
"build-info-build", "build-info-build",

View File

@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021" edition = "2021"
license = "UNLICENSED" license = "UNLICENSED"
publish = ["xinu"] publish = ["xinu"]
version = "0.9.8" version = "0.9.9"
repository = "https://git.z.xinu.tv/wathiede/letterbox" repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev] [profile.dev]

View File

@ -48,8 +48,8 @@ urlencoding = "2.1.3"
#xtracing = { path = "../../xtracing" } #xtracing = { path = "../../xtracing" }
#xtracing = { git = "http://git-private.h.xinu.tv/wathiede/xtracing.git" } #xtracing = { git = "http://git-private.h.xinu.tv/wathiede/xtracing.git" }
xtracing = { version = "0.3.0", registry = "xinu" } xtracing = { version = "0.3.0", registry = "xinu" }
letterbox-notmuch = { version = "0.9.8", path = "../notmuch", registry = "xinu" } letterbox-notmuch = { version = "0.9.9", path = "../notmuch", registry = "xinu" }
letterbox-shared = { version = "0.9.8", path = "../shared", registry = "xinu" } letterbox-shared = { version = "0.9.9", path = "../shared", registry = "xinu" }
[build-dependencies] [build-dependencies]
build-info-build = "0.0.40" build-info-build = "0.0.40"

View File

@ -12,5 +12,5 @@ version.workspace = true
[dependencies] [dependencies]
build-info = "0.0.40" build-info = "0.0.40"
letterbox-notmuch = { version = "0.9.8", path = "../notmuch", registry = "xinu" } letterbox-notmuch = { version = "0.9.9", path = "../notmuch", registry = "xinu" }
serde = { version = "1.0.147", features = ["derive"] } serde = { version = "1.0.147", features = ["derive"] }

View File

@ -33,8 +33,8 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.13.1", features = [ uuid = { version = "1.13.1", features = [
"js", "js",
] } # direct dep to set js feature, prevents Rng issues ] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { version = "0.9.8", path = "../shared", registry = "xinu" } letterbox-shared = { version = "0.9.9", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.9.8", path = "../notmuch", registry = "xinu" } letterbox-notmuch = { version = "0.9.9", path = "../notmuch", registry = "xinu" }
seed_hooks = { version = "0.4.0", registry = "xinu" } seed_hooks = { version = "0.4.0", registry = "xinu" }
strum_macros = "0.27.1" strum_macros = "0.27.1"
@ -50,4 +50,6 @@ features = [
"MediaQueryList", "MediaQueryList",
"Navigator", "Navigator",
"Window", "Window",
"History",
"ScrollRestoration",
] ]

View File

@ -29,6 +29,12 @@ pub fn unread_query() -> &'static str {
pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model { pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
let version = letterbox_shared::build_version(bi); let version = letterbox_shared::build_version(bi);
info!("Build Info: {}", version); info!("Build Info: {}", version);
// Disable restoring to scroll position when navigating
window()
.history()
.expect("couldn't get history")
.set_scroll_restoration(web_sys::ScrollRestoration::Manual)
.expect("failed to set scroll restoration to manual");
if url.hash().is_none() { if url.hash().is_none() {
orders.request_url(urls::search(unread_query(), 0)); orders.request_url(urls::search(unread_query(), 0));
} else { } else {

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)