r/send/sent

This commit is contained in:
Hendrik Eeckhaut
2024-03-04 09:33:19 +01:00
parent fb7934c033
commit 9b741fae05
2 changed files with 4 additions and 4 deletions

View File

@@ -5,14 +5,14 @@ use yew::prelude::*;
#[derive(Clone, PartialEq)]
pub enum Direction {
Send,
Sent,
Received,
}
impl fmt::Display for Direction {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Direction::Send => write!(f, "send"),
Direction::Sent => write!(f, "sent"),
Direction::Received => write!(f, "received"),
}
}

View File

@@ -102,7 +102,7 @@ pub fn ViewFile(props: &Props) -> Html {
sent.set_redacted(b'X');
recv.set_redacted(b'X');
let redacted_ranges_send: Vec<Range<usize>> =
let redacted_ranges_sent: Vec<Range<usize>> =
sent.redacted().clone().iter_ranges().collect();
let redacted_ranges_recv: Vec<Range<usize>> =
recv.redacted().clone().iter_ranges().collect();
@@ -124,7 +124,7 @@ pub fn ViewFile(props: &Props) -> Html {
</div>
</div>
<RedactedBytesComponent direction={Direction::Send} redacted_char={REDACTED_CHAR} bytes={sent.data().to_vec()} redacted_ranges={redacted_ranges_send} />
<RedactedBytesComponent direction={Direction::Sent} redacted_char={REDACTED_CHAR} bytes={sent.data().to_vec()} redacted_ranges={redacted_ranges_sent} />
<ContentIFrame bytes={recv.data().to_vec()} />