Skip to content

Commit

Permalink
mail fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
worldofjoni committed Jun 26, 2024
1 parent 95c2670 commit 577231c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions backend/src/layer/data/mail/mail_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ mod test {
"the template must contain all of the information from the report info"
);
assert!(
report.contains(info.image_rank.to_string().as_str()),
report.contains(&info.image_rank.to_string()[0..4]),
"the template must contain all of the information from the report info"
);
assert!(
Expand Down Expand Up @@ -264,11 +264,11 @@ mod test {
reason: crate::util::ReportReason::Advert,
image_got_hidden: true,
image_id: Uuid::from_u128(9_789_789),
image_url: String::from("https://picsum.photos/500/330"),
image_url: String::from("https://picsum.photos/500/200"),
report_count: 1,
positive_rating_count: 10,
negative_rating_count: 20,
image_rank: 1.0,
image_rank: 0.123_456,
report_barrier: 1,
client_id: Uuid::from_u128(123),
image_age: 1,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/layer/data/mail/template/output.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions backend/src/layer/data/mail/template/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1 class="text-3xl font-bold h-auto">
</div>

<div class="aspect-video w-full relative z-0 flex items-center">
<img class="size-full rounded-3xl cover" src="{{ image_url }}" />
<img class="size-full rounded-3xl object-cover" src="{{ image_url }}" />
<div
class="absolute inset-y-0 left-0 z-10 rounded-3xl backdrop-blur-xl active:invisible size-full text-5xl h-full flex flex-col items-center justify-center">
<svg class="fill-white size-10" xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -128,7 +128,7 @@ <h2 class="text-2xl mb-2">More Information</h2>
</div>
<div class=table-row>
<div class="table-cell">Rank</div>
<div class="table-cell"> {{ image_rank }}</div>
<div class="table-cell"> {{ image_rank|round(3) }}</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 577231c

Please sign in to comment.