Compare commits

..

1 Commits

Author SHA1 Message Date
e3efafda0d chore(deps): lock file maintenance
Some checks failed
Continuous integration / Check (push) Failing after 1m42s
Continuous integration / Trunk (push) Successful in 1m17s
Continuous integration / Rustfmt (push) Failing after 43s
Continuous integration / Test Suite (push) Failing after 3m46s
Continuous integration / build (push) Failing after 3m54s
Continuous integration / Disallow unused dependencies (push) Failing after 5m4s
2026-01-20 19:17:22 +00:00
5 changed files with 215 additions and 256 deletions

402
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -56,7 +56,7 @@ urlencoding = "2.1.3"
#xtracing = { git = "http://git-private.h.xinu.tv/wathiede/xtracing.git" }
#xtracing = { path = "../../xtracing" }
xtracing = { version = "0.3.2", registry = "xinu" }
zip = { version = "7.0.0", default-features = false, features = ["aes-crypto", "bzip2", "deflate64", "deflate", "time", "zstd"] }
zip = "7.0.0"
[build-dependencies]

View File

@@ -224,24 +224,6 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
});
}
Msg::AddTag(query, tag) => {
orders.skip().perform_cmd(async move {
let res: Result<
graphql_client::Response<graphql::add_tag_mutation::ResponseData>,
gloo_net::Error,
> = send_graphql(graphql::AddTagMutation::build_query(
graphql::add_tag_mutation::Variables {
query: query.clone(),
tag: tag.clone(),
},
))
.await;
if let Err(e) = res {
error!("Failed to add tag {tag} to {query}: {e}");
}
Msg::Refresh
});
}
Msg::AddTagAndGoToSearch(query, tag) => {
orders.skip().perform_cmd(async move {
let res: Result<
graphql_client::Response<graphql::add_tag_mutation::ResponseData>,
@@ -274,24 +256,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
if let Err(e) = res {
error!("Failed to remove tag {tag} to {query}: {e}");
}
Msg::Refresh
});
}
Msg::RemoveTagAndGoToSearch(query, tag) => {
orders.skip().perform_cmd(async move {
let res: Result<
graphql_client::Response<graphql::remove_tag_mutation::ResponseData>,
gloo_net::Error,
> = send_graphql(graphql::RemoveTagMutation::build_query(
graphql::remove_tag_mutation::Variables {
query: query.clone(),
tag: tag.clone(),
},
))
.await;
if let Err(e) = res {
error!("Failed to remove tag {tag} to {query}: {e}");
}
// TODO: reconsider this behavior
Msg::GoToSearchResults
});
}
@@ -540,7 +505,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
.join(" ");
orders
.skip()
.perform_cmd(async move { Msg::AddTagAndGoToSearch(threads, tag) });
.perform_cmd(async move { Msg::AddTag(threads, tag) });
}
}
Msg::SelectionRemoveTag(tag) => {
@@ -555,7 +520,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
.join(" ");
orders
.skip()
.perform_cmd(async move { Msg::RemoveTagAndGoToSearch(threads, tag) });
.perform_cmd(async move { Msg::RemoveTag(threads, tag) });
}
}
Msg::SelectionMarkAsRead => {
@@ -727,13 +692,6 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
};
orders.send_msg(Msg::CatchupNext);
}
Msg::CatchupMarkAsSpam => {
if let Some(thread_id) = current_thread_id(&model.context) {
orders.send_msg(Msg::AddTag(thread_id.clone(), "Spam".to_string()));
orders.send_msg(Msg::SetUnread(thread_id, false));
};
orders.send_msg(Msg::CatchupNext);
}
Msg::CatchupNext => {
orders.send_msg(Msg::ScrollToTop);
let Some(catchup) = &mut model.catchup else {
@@ -894,10 +852,7 @@ pub enum Msg {
SetUnread(String, bool),
AddTag(String, String),
AddTagAndGoToSearch(String, String),
#[allow(dead_code)]
RemoveTag(String, String),
RemoveTagAndGoToSearch(String, String),
Snooze(String, DateTime<Utc>),
FrontPageRequest {
@@ -947,7 +902,6 @@ pub enum Msg {
CatchupStart,
CatchupKeepUnread,
CatchupMarkAsRead,
CatchupMarkAsSpam,
CatchupNext,
CatchupExit,

View File

@@ -100,7 +100,6 @@ pub fn view(model: &Model) -> Node<Msg> {
&catchup.items,
is_loading,
model.read_completion_ratio,
true, // show spam button for email
)
} else {
normal_view(
@@ -128,7 +127,6 @@ pub fn view(model: &Model) -> Node<Msg> {
&catchup.items,
is_loading,
model.read_completion_ratio,
false, // no spam button for news
)
} else {
normal_view(
@@ -195,7 +193,6 @@ fn catchup_view(
items: &[CatchupItem],
is_loading: bool,
read_completion_ratio: f64,
show_spam_button: bool,
) -> Node<Msg> {
div![
C!["w-full", "relative", "text-white"],
@@ -271,14 +268,6 @@ fn catchup_view(
Msg::GoToSearchResults
]))
],
IF!(show_spam_button => button![
tw_classes::button(),
C!["text-red-500"],
attrs! {At::Title => "Mark as spam"},
span![i![C!["far", "fa-hand"]]],
span![C!["pl-2"], "Spam"],
ev(Ev::Click, |_| Msg::CatchupMarkAsSpam)
]),
button![
tw_classes::button_with_color("bg-green-800", "hover:bg-green-700"),
span![i![C!["far", "fa-envelope-open"]]],
@@ -461,7 +450,7 @@ fn removable_tags_chiclet<'a>(thread_id: &'a str, tags: &'a [String]) -> Node<Ms
a![
C![&tw_classes::TAG_X],
span![i![C!["fa-solid", "fa-xmark"]]],
ev(Ev::Click, move |_| Msg::RemoveTagAndGoToSearch(thread_id, rm_tag))
ev(Ev::Click, move |_| Msg::RemoveTag(thread_id, rm_tag))
]
]
})