Add logo of popular brands
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -27,6 +27,20 @@ pub struct Provider {
|
||||
pub configuration_url: String,
|
||||
}
|
||||
|
||||
impl Provider {
|
||||
/// Get the URL where the logo can be located
|
||||
pub fn logo_url(&self) -> &str {
|
||||
match self.logo.as_str() {
|
||||
"gitea" => "/assets/img/brands/gitea.svg",
|
||||
"gitlab" => "/assets/img/brands/gitlab.svg",
|
||||
"github" => "/assets/img/brands/github.svg",
|
||||
"microsoft" => "/assets/img/brands/microsoft.svg",
|
||||
"google" => "/assets/img/brands/google.svg",
|
||||
s => s,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Provider {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.id.eq(&other.id)
|
||||
|
Reference in New Issue
Block a user