mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 10:26:30 +00:00
Set new icons for Codeberg and Gitea (#165)
This commit is contained in:
parent
ba7647dcff
commit
0788aaaedb
2 changed files with 7 additions and 7 deletions
|
@ -42,7 +42,7 @@ impl fmt::Display for RepoPath {
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"{} => {}/{}",
|
"{} => {}/{}",
|
||||||
self.site.to_string(),
|
self.site,
|
||||||
self.qual.as_ref(),
|
self.qual.as_ref(),
|
||||||
self.name.as_ref()
|
self.name.as_ref()
|
||||||
)
|
)
|
||||||
|
@ -96,7 +96,7 @@ impl FromStr for RepoSite {
|
||||||
type Err = Error;
|
type Err = Error;
|
||||||
|
|
||||||
fn from_str(input: &str) -> Result<RepoSite, Error> {
|
fn from_str(input: &str) -> Result<RepoSite, Error> {
|
||||||
if let Some((site, domain)) = input.split_once("/") {
|
if let Some((site, domain)) = input.split_once('/') {
|
||||||
match site {
|
match site {
|
||||||
"gitea" => Ok(RepoSite::Gitea(domain.parse()?)),
|
"gitea" => Ok(RepoSite::Gitea(domain.parse()?)),
|
||||||
_ => Err(anyhow!("unknown repo site identifier")),
|
_ => Err(anyhow!("unknown repo site identifier")),
|
||||||
|
|
|
@ -127,11 +127,11 @@ fn get_site_icon(site: &RepoSite) -> (FaType, &'static str) {
|
||||||
RepoSite::Github => (FaType::Brands, "github"),
|
RepoSite::Github => (FaType::Brands, "github"),
|
||||||
RepoSite::Gitlab => (FaType::Brands, "gitlab"),
|
RepoSite::Gitlab => (FaType::Brands, "gitlab"),
|
||||||
RepoSite::Bitbucket => (FaType::Brands, "bitbucket"),
|
RepoSite::Bitbucket => (FaType::Brands, "bitbucket"),
|
||||||
// FIXME: There is no brands/{sourcehut, codeberg, gitea} icon, so just use a
|
// FIXME: There is no brands/{sourcehut, codeberg, gitea} icon, so just use an
|
||||||
// regular circle which looks close enough.
|
// icon which looks close enough.
|
||||||
RepoSite::Sourcehut | RepoSite::Codeberg | RepoSite::Gitea(_) => {
|
RepoSite::Sourcehut => (FaType::Regular, "circle"),
|
||||||
(FaType::Regular, "circle")
|
RepoSite::Codeberg => (FaType::Solid, "mountain"),
|
||||||
}
|
RepoSite::Gitea(_) => (FaType::Brands, "git-alt"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue