mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +08:00
Merge remote-tracking branch 'origin/pr/487'
# Conflicts: # crates/aether-data/src/lifecycle/bootstrap/postgres.rs # crates/aether-data/src/lifecycle/migrate/tests.rs # crates/aether-data/src/repository/oauth_providers/postgres.rs # crates/aether-data/src/repository/oauth_providers/sqlite.rs # frontend/src/views/admin/OAuthSettings.vue
This commit is contained in:
@@ -10,6 +10,9 @@ export const OAUTH_ICONS: Record<string, string> = {
|
||||
// Default icon when provider type is not found
|
||||
const DEFAULT_ICON = OAUTH_ICONS.github
|
||||
|
||||
export function getOAuthIcon(providerType: string): string {
|
||||
return OAUTH_ICONS[providerType.toLowerCase()] || DEFAULT_ICON
|
||||
export function getOAuthIcon(providerType: string, iconUrl?: string | null): string {
|
||||
const builtin = OAUTH_ICONS[providerType.toLowerCase()]
|
||||
if (builtin) return builtin
|
||||
if (iconUrl) return `<img src="${iconUrl}" alt="" style="width:100%;height:100%;object-fit:contain;" />`
|
||||
return DEFAULT_ICON
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user