feat: screening (#96)

* .

* .

* refactor

* .

* screening

* add report user function

* add danger and warning styles

* update deps

* update

* fix line height

* .
This commit is contained in:
reya
2025-07-23 12:45:01 +07:00
committed by GitHub
parent 00b40db82c
commit a631dd90d2
24 changed files with 3706 additions and 3252 deletions

View File

@@ -41,8 +41,17 @@ impl DisplayProfile for Profile {
}
}
let Ok(pubkey) = self.public_key().to_bech32();
format!("{}:{}", &pubkey[0..4], &pubkey[pubkey.len() - 4..]).into()
shorten_pubkey(self.public_key(), 4)
}
}
pub fn shorten_pubkey(public_key: PublicKey, len: usize) -> SharedString {
let Ok(pubkey) = public_key.to_bech32();
format!(
"{}:{}",
&pubkey[0..(len + 1)],
&pubkey[pubkey.len() - len..]
)
.into()
}