Refactor SSO provider logo mapping and improve login view

Moved PROVIDER_CUSTOM_LOGO_MAP to a new ssoConstants.ts for reuse and maintainability. Updated LoginView.vue and IdentityProviderListComponent.vue to import the constant. Added SSOProvider type to types/index.ts and improved LoginView.vue by using a computed serverSettings property, simplifying refs, and fixing SSO provider logo rendering.
This commit is contained in:
João Vitória Silva
2025-10-14 22:08:14 +01:00
parent 32cafcc5ef
commit 23a96d531d
6 changed files with 77 additions and 63 deletions

View File

@@ -66,6 +66,12 @@ Endurain is a self-hosted fitness tracking application built with Vue.js fronten
#### Backend Code Quality Standards
- **Modern Python Syntax (Python 3.13):**
- Use union types with `|` operator: `str | None` instead of `Optional[str]`
- Use built-in generics: `list[str]` instead of `List[str]`, `dict[str, int]` instead of `Dict[str, int]`
- No imports from `typing` module for `Optional`, `List`, `Dict`, `Tuple`, `Set` use native syntax
- Example: `def get_user(user_id: int) -> User | None:`
- Example: `async def get_activities(limit: int = 10) -> list[Activity]:`
- Use type hints (`def foo(x: int) -> str:`)
- Standard FastAPI project layout: `routers/`, `schemas/`, `services/`, `models/`
- Public functions/classes must have docstrings