Compare commits

..

No commits in common. "09fb14a7967776f4a4e9a766ddcf1a1d7cf6d787" and "32a1115abd1721ff70700154e5d7537237970a63" have entirely different histories.

8 changed files with 16 additions and 15 deletions

10
Cargo.lock generated
View File

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

View File

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

View File

@ -1,6 +1,3 @@
export CARGO_INCREMENTAL := "0"
export RUSTFLAGS := "-D warnings"
default:
@echo "Run: just patch|minor|major"

View File

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

View File

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

View File

@ -33,8 +33,8 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.13.1", features = [
"js",
] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { version = "0.9.7", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.9.7", path = "../notmuch", registry = "xinu" }
letterbox-shared = { version = "0.9.4", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.9.4", path = "../notmuch", registry = "xinu" }
seed_hooks = { version = "0.4.0", registry = "xinu" }
strum_macros = "0.27.1"

View File

@ -34,6 +34,7 @@ pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
} else {
orders.request_url(url);
};
orders.stream(streams::window_event(Ev::Resize, |_| Msg::OnResize));
// TODO(wathiede): only do this while viewing the index? Or maybe add a new message that force
// 'notmuch new' on the server periodically?
orders.stream(streams::interval(30_000, || Msg::RefreshStart));
@ -150,6 +151,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
orders.send_msg(on_url_changed(&model.last_url, new_url.0.clone()));
model.last_url = new_url.0;
}
Msg::OnResize => (),
Msg::NextPage => {
match &model.context {
@ -743,6 +745,8 @@ pub enum Msg {
Reload,
// TODO: add GoToUrl
OnUrlChanged(subs::UrlChanged),
// Window has changed size
OnResize,
// Tell the server to update state
RefreshStart,
RefreshDone(Option<gloo_net::Error>),

View File

@ -4,7 +4,7 @@ use chrono::{DateTime, Datelike, Duration, Local, Utc};
use human_format::{Formatter, Scales};
use itertools::Itertools;
use letterbox_shared::compute_color;
use log::error;
use log::{debug, error};
use seed::{prelude::*, *};
use seed_hooks::{state_access::CloneState, topo, use_state, StateAccessEventHandlers};
use web_sys::{HtmlElement, HtmlInputElement};