mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
lowercase request subject to fix scheme detection
This commit is contained in:
parent
ed0172be68
commit
92550a2ccc
1 changed files with 6 additions and 4 deletions
|
|
@ -22,28 +22,30 @@ pub enum PrimaryIcon<'a> {
|
|||
}
|
||||
|
||||
pub fn from(request: &str) -> PrimaryIcon {
|
||||
if request.starts_with("download:") {
|
||||
let prefix = request.to_lowercase();
|
||||
|
||||
if prefix.starts_with("download:") {
|
||||
return PrimaryIcon::Download {
|
||||
name: "document-save-symbolic",
|
||||
tooltip: "Download",
|
||||
};
|
||||
}
|
||||
|
||||
if request.starts_with("source:") {
|
||||
if prefix.starts_with("source:") {
|
||||
return PrimaryIcon::Source {
|
||||
name: "applications-system-symbolic",
|
||||
tooltip: "Source view",
|
||||
};
|
||||
}
|
||||
|
||||
if request.starts_with("gemini:") {
|
||||
if prefix.starts_with("gemini:") {
|
||||
return PrimaryIcon::Gemini {
|
||||
name: "channel-secure-symbolic",
|
||||
tooltip: ("Guest session", "User session"),
|
||||
};
|
||||
}
|
||||
|
||||
if request.starts_with("titan:") {
|
||||
if prefix.starts_with("titan:") {
|
||||
return PrimaryIcon::Titan {
|
||||
name: "document-send-symbolic",
|
||||
tooltip: ("Guest titan input", "User titan input"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue