Skip to content

Commit

Permalink
add transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
trueharuu committed Jun 28, 2024
1 parent 10ade2a commit 0d2c96e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assyst-core/src/rest/cooltext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub async fn cooltext(style: &str, text: &str) -> anyhow::Result<Vec<u8>> {
let client = ClientBuilder::new().danger_accept_invalid_certs(true).build().unwrap();
let styled = STYLES
.iter()
.find_map(|(x, y)| if *x == style.to_lowercase() { Some(y) } else { None })
.find_map(|(x, y)| if x.eq_ignore_ascii_case(style) { Some(y) } else { None })
.ok_or(anyhow::anyhow!("unknown style {style}"))?;

let cool_text_response = client
Expand All @@ -72,6 +72,7 @@ pub async fn cooltext(style: &str, text: &str) -> anyhow::Result<Vec<u8>> {
("FileFormat", "6"),
("Integer13", "on"),
("Integer12", "on"),
("Boolean1", "on"),
("BackgroundColor_color", "#FFFFFF"),
])
.header("content-length", "0")
Expand Down

0 comments on commit 0d2c96e

Please sign in to comment.