Compare commits

..

No commits in common. "0140fa5efe887f76c9a05e37d45db2fe529fb9a5" and "54dc45660af047a68f6d61cde25f2ef67a724c63" have entirely different histories.

7 changed files with 70 additions and 82 deletions

18
Cargo.lock generated
View File

@ -3251,7 +3251,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-notmuch" name = "letterbox-notmuch"
version = "0.17.37" version = "0.17.36"
dependencies = [ dependencies = [
"itertools", "itertools",
"log", "log",
@ -3266,7 +3266,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-procmail2notmuch" name = "letterbox-procmail2notmuch"
version = "0.17.37" version = "0.17.36"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -3279,7 +3279,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-server" name = "letterbox-server"
version = "0.17.37" version = "0.17.36"
dependencies = [ dependencies = [
"ammonia", "ammonia",
"anyhow", "anyhow",
@ -3303,8 +3303,8 @@ dependencies = [
"html2text", "html2text",
"ical", "ical",
"icalendar", "icalendar",
"letterbox-notmuch 0.17.37", "letterbox-notmuch 0.17.36",
"letterbox-shared 0.17.37", "letterbox-shared 0.17.36",
"linkify", "linkify",
"lol_html", "lol_html",
"mailparse", "mailparse",
@ -3345,10 +3345,10 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-shared" name = "letterbox-shared"
version = "0.17.37" version = "0.17.36"
dependencies = [ dependencies = [
"build-info", "build-info",
"letterbox-notmuch 0.17.37", "letterbox-notmuch 0.17.36",
"regex", "regex",
"serde", "serde",
"sqlx", "sqlx",
@ -3358,7 +3358,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-web" name = "letterbox-web"
version = "0.17.37" version = "0.17.36"
dependencies = [ dependencies = [
"build-info", "build-info",
"build-info-build", "build-info-build",
@ -3370,7 +3370,7 @@ dependencies = [
"graphql_client", "graphql_client",
"human_format", "human_format",
"itertools", "itertools",
"letterbox-shared 0.17.37", "letterbox-shared 0.17.36",
"log", "log",
"seed", "seed",
"seed_hooks", "seed_hooks",

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.17.37" version = "0.17.36"
repository = "https://git.z.xinu.tv/wathiede/letterbox" repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev] [profile.dev]

View File

@ -33,8 +33,8 @@ headers = "0.4.0"
html-escape = "0.2.13" html-escape = "0.2.13"
icalendar = "0.17.1" icalendar = "0.17.1"
ical = "0.10" ical = "0.10"
letterbox-notmuch = { path = "../notmuch", version = "0.17.37", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.36", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.37", registry = "xinu" } letterbox-shared = { path = "../shared", version = "0.17.36", registry = "xinu" }
linkify = "0.10.0" linkify = "0.10.0"
lol_html = "2.3.0" lol_html = "2.3.0"
mailparse = "0.16.1" mailparse = "0.16.1"

View File

@ -1,10 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>TLS Report</title> <title>TLS Report</title>
</head> </head>
<body> <body>
<h3>TLS Report Summary:</h3> <h3>TLS Report Summary:</h3>
<p>Organization: {{ report.organization_name }}</p> <p>Organization: {{ report.organization_name }}</p>
@ -12,37 +10,34 @@
<p>Contact: {{ report.contact_info }}</p> <p>Contact: {{ report.contact_info }}</p>
<p>Report ID: {{ report.report_id }}</p> <p>Report ID: {{ report.report_id }}</p>
<h4><b>Policies:</b></h4> <h4>Policies:</h4>
{% for policy in report.policies %} {% for policy in report.policies %}
<h5><b>Policy Domain:</b> {{ policy.policy.policy_domain }}</h5> <h5>Policy Domain: {{ policy.policy.policy_domain }}</h5>
<ul> <ul>
<li><b>Policy Type:</b> {{ policy.policy.policy_type }}</li> <li>Policy Type: {{ policy.policy.policy_type }}</li>
<li><b>Policy String:</b> {{ policy.policy.policy_string | join(", ") }}</li> <li>Policy String: {{ policy.policy.policy_string | join(", ") }}</li>
<li><b>Successful Sessions:</b> {{ policy.summary.total_successful_session_count }}</li> <li>Successful Sessions: {{ policy.summary.total_successful_session_count }}</li>
<li><b>Failed Sessions:</b> {{ policy.summary.total_failure_session_count }}</li> <li>Failed Sessions: {{ policy.summary.total_failure_session_count }}</li>
</ul> </ul>
<ul> <ul>
{% for mx_host in policy.policy.mx_host %} {% for mx_host in policy.policy.mx_host %}
<li><b>Hostname:</b> {{ mx_host.hostname }}, <b>Failures:</b> {{ mx_host.failure_count }}, <b>Result:</b> {{ <li>Hostname: {{ mx_host.hostname }}, Failures: {{ mx_host.failure_count }}, Result: {{ mx_host.result_type }}</li>
mx_host.result_type }}</li> {% endfor %}
{% endfor %} </ul>
</ul>
<ul> <ul>
{% for detail in policy.failure_details %} {% for detail in policy.failure_details %}
<li><b>Result:</b> {{ detail.result_type }}, <b>Sending IP:</b> {{ detail.sending_mta_ip }}, <b>Failed <li>Result: {{ detail.result_type }}, Sending IP: {{ detail.sending_mta_ip }}, Failed Sessions: {{ detail.failed_session_count }}
Sessions:</b> {{ detail.failed_session_count }} {% if detail.failure_reason_code != "" %}
{% if detail.failure_reason_code != "" %} (Reason: {{ detail.failure_reason_code }})
(<b>Reason:</b> {{ detail.failure_reason_code }}) {% endif %}
{% endif %} </li>
</li> (Receiving IP: {{ detail.receiving_ip }})
(<b>Receiving IP:</b> {{ detail.receiving_ip }}) (Receiving MX: {{ detail.receiving_mx_hostname }})
(<b>Receiving MX:</b> {{ detail.receiving_mx_hostname }}) (Additional Info: {{ detail.additional_info }})
(<b>Additional Info:</b> {{ detail.additional_info }}) {% endfor %}
{% endfor %} </ul>
</ul>
{% endfor %} {% endfor %}
</body> </body>
</html> </html>

View File

@ -12,7 +12,7 @@ version.workspace = true
[dependencies] [dependencies]
build-info = "0.0.41" build-info = "0.0.41"
letterbox-notmuch = { path = "../notmuch", version = "0.17.37", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.36", registry = "xinu" }
regex = "1.11.1" regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
sqlx = "0.8.5" sqlx = "0.8.5"

View File

@ -33,7 +33,7 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.16.0", features = [ uuid = { version = "1.16.0", features = [
"js", "js",
] } # direct dep to set js feature, prevents Rng issues ] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { path = "../shared/", version = "0.17.37", registry = "xinu" } letterbox-shared = { path = "../shared/", version = "0.17.36", registry = "xinu" }
seed_hooks = { version = "0.4.1", registry = "xinu" } seed_hooks = { version = "0.4.1", registry = "xinu" }
strum_macros = "0.27.1" strum_macros = "0.27.1"
gloo-console = "0.3.0" gloo-console = "0.3.0"

View File

@ -901,22 +901,13 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
.collect(); .collect();
let show_x_original_to = !*to_xinu.borrow() && msg.x_original_to.is_some(); let show_x_original_to = !*to_xinu.borrow() && msg.x_original_to.is_some();
let show_delivered_to = !*to_xinu.borrow() && !show_x_original_to && msg.delivered_to.is_some(); let show_delivered_to = !*to_xinu.borrow() && !show_x_original_to && msg.delivered_to.is_some();
let common_style = C!["text-sm", "pr-2", "text-gray-500"];
div![ div![
C!["flex", "bg-neutral-800"], C!["flex", "p-4", "bg-neutral-800"],
div![C!["self-center"], avatar], div![avatar],
div![ div![
C![ C!["px-4", "mr-auto"],
"mx-2", span![
"flex-1", C!["font-semibold", "text-sm"],
"flex",
"flex-nowrap",
"items-center",
"truncate",
],
div![
C!["font-semibold", "text-white"],
&common_style,
from_detail.as_ref().map(|addr| attrs! { from_detail.as_ref().map(|addr| attrs! {
At::Title => addr At::Title => addr
}), }),
@ -924,7 +915,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
], ],
" ", " ",
IF!(!msg.to.is_empty() => div![ IF!(!msg.to.is_empty() => div![
&common_style, C!["text-xs"],
span![ span![
C!["font-semibold"], C!["font-semibold"],
"To: " "To: "
@ -935,7 +926,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
" " " "
]), ]),
IF!(!msg.cc.is_empty() => div![ IF!(!msg.cc.is_empty() => div![
&common_style, C!["text-xs", "max-w-full", "overflow-clip", "text-ellipsis"],
span![ span![
C!["font-semibold"], C!["font-semibold"],
"CC: " "CC: "
@ -943,7 +934,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
cc_addrs cc_addrs
]), ]),
IF!(show_x_original_to => div![ IF!(show_x_original_to => div![
&common_style, C!["text-xs"],
span![ span![
C!["font-semibold"], C!["font-semibold"],
"Original To: " "Original To: "
@ -962,7 +953,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
] ]
]), ]),
IF!(show_delivered_to => div![ IF!(show_delivered_to => div![
&common_style, C!["text-xs"],
span![ span![
C!["font-semibold"], C!["font-semibold"],
"Delivered To: " "Delivered To: "
@ -981,25 +972,27 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
] ]
]), ]),
], ],
msg.timestamp.map(|ts| div![ span![
C!["text-xs", "text-nowrap", "justify-self-end", "self-center"], C!["text-right"],
human_age(ts) msg.timestamp
]), .map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
div![ div![
i![C![ C!["p-2"],
"m-2", i![C![
"read-status", "mx-4",
"far", "read-status",
if is_unread { "far",
"fa-envelope" if is_unread {
} else { "fa-envelope"
"fa-envelope-open" } else {
}, "fa-envelope-open"
]], },
ev(Ev::Click, move |e| { ]],
e.stop_propagation(); ev(Ev::Click, move |e| {
Msg::SetUnread(id, !is_unread) e.stop_propagation();
}) Msg::SetUnread(id, !is_unread)
})
],
] ]
] ]
} }
@ -1014,7 +1007,7 @@ fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool)
}; };
let from = from.map(|f| f.replace('.', "-").replace('@', "-")); let from = from.map(|f| f.replace('.', "-").replace('@', "-"));
div![ div![
C!["pb-1"], C!["lg:mb-4"],
div![ div![
if open { if open {
render_open_header(&msg) render_open_header(&msg)