mirror of
https://github.com/tlsnotary/proof_viz.git
synced 2026-01-06 19:13:54 -05:00
r/send/sent
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user