feat: redesign Login/Register with HUD aesthetic and Google Auth integration
This commit is contained in:
@ -8,8 +8,17 @@ from app.core.database import get_session
|
|||||||
from app.core.security import verify_password, get_password_hash, create_access_token, get_token_payload
|
from app.core.security import verify_password, get_password_hash, create_access_token, get_token_payload
|
||||||
from app.models.user import User, DriverProfile, UserRole, VehicleType
|
from app.models.user import User, DriverProfile, UserRole, VehicleType
|
||||||
from app.api.deps import oauth2_scheme
|
from app.api.deps import oauth2_scheme
|
||||||
from app.schemas.user import PassengerCreate, Token, UserResponse, LoginRequest
|
from app.schemas.user import PassengerCreate, Token, UserResponse, LoginRequest, GoogleLoginRequest
|
||||||
|
import firebase_admin
|
||||||
|
from firebase_admin import auth as firebase_auth, credentials
|
||||||
|
|
||||||
|
# Initialize Firebase Admin
|
||||||
|
try:
|
||||||
|
if not firebase_admin._apps:
|
||||||
|
# Default initialization (uses GOOGLE_APPLICATION_CREDENTIALS)
|
||||||
|
firebase_admin.initialize_app()
|
||||||
|
except Exception as e:
|
||||||
|
print(f"WARNING: Firebase Admin could not be initialized: {e}")
|
||||||
|
|
||||||
router = APIRouter(prefix="/api/auth", tags=["auth"])
|
router = APIRouter(prefix="/api/auth", tags=["auth"])
|
||||||
|
|
||||||
@ -60,6 +69,62 @@ async def login(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@router.post("/google", response_model=Token)
|
||||||
|
async def google_login(
|
||||||
|
data: GoogleLoginRequest,
|
||||||
|
session: Session = Depends(get_session)
|
||||||
|
):
|
||||||
|
try:
|
||||||
|
# Verify the ID token sent by the frontend
|
||||||
|
decoded_token = firebase_auth.verify_id_token(data.id_token)
|
||||||
|
email = decoded_token.get("email")
|
||||||
|
full_name = decoded_token.get("name", "")
|
||||||
|
profile_photo = decoded_token.get("picture", "")
|
||||||
|
|
||||||
|
# Check if user exists
|
||||||
|
user = session.exec(select(User).where(User.email == email)).first()
|
||||||
|
|
||||||
|
if not user:
|
||||||
|
# Create new user if it doesn't exist (Passenger as default)
|
||||||
|
user = User(
|
||||||
|
email=email,
|
||||||
|
full_name=full_name,
|
||||||
|
hashed_password=get_password_hash(str(uuid4())), # Random pass, won't be used
|
||||||
|
role=UserRole.PASSENGER,
|
||||||
|
profile_photo_url=profile_photo,
|
||||||
|
is_verified=True
|
||||||
|
)
|
||||||
|
session.add(user)
|
||||||
|
session.commit()
|
||||||
|
session.refresh(user)
|
||||||
|
print(f"DEBUG: Created new user via Google: {email}")
|
||||||
|
|
||||||
|
# Create access token
|
||||||
|
import datetime
|
||||||
|
expires = datetime.timedelta(days=30)
|
||||||
|
access_token = create_access_token(
|
||||||
|
subject=user.id,
|
||||||
|
role=user.role,
|
||||||
|
full_name=user.full_name,
|
||||||
|
expires_delta=expires
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
"access_token": access_token,
|
||||||
|
"token_type": "bearer",
|
||||||
|
"role": user.role,
|
||||||
|
"full_name": user.full_name,
|
||||||
|
"profile_photo_url": user.profile_photo_url
|
||||||
|
}
|
||||||
|
except Exception as e:
|
||||||
|
print(f"DEBUG: Google Login failed: {e}")
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
|
detail=f"Invalid Google Token: {str(e)}",
|
||||||
|
headers={"WWW-Authenticate": "Bearer"},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@router.post("/register/passenger", response_model=UserResponse)
|
@router.post("/register/passenger", response_model=UserResponse)
|
||||||
async def register_passenger(
|
async def register_passenger(
|
||||||
data: PassengerCreate,
|
data: PassengerCreate,
|
||||||
|
|||||||
@ -53,6 +53,10 @@ class LoginRequest(BaseModel):
|
|||||||
keep_session: bool = False
|
keep_session: bool = False
|
||||||
|
|
||||||
|
|
||||||
|
class GoogleLoginRequest(BaseModel):
|
||||||
|
id_token: str
|
||||||
|
|
||||||
|
|
||||||
class Token(BaseModel):
|
class Token(BaseModel):
|
||||||
access_token: str
|
access_token: str
|
||||||
token_type: str
|
token_type: str
|
||||||
|
|||||||
1
frontend/login_design.html
Normal file
1
frontend/login_design.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
OK
|
||||||
728
frontend/package-lock.json
generated
728
frontend/package-lock.json
generated
@ -16,6 +16,7 @@
|
|||||||
"@tailwindcss/vite": "^4.2.0",
|
"@tailwindcss/vite": "^4.2.0",
|
||||||
"axios": "^1.13.2",
|
"axios": "^1.13.2",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
|
"firebase": "^12.9.0",
|
||||||
"firebase-tools": "^15.7.0",
|
"firebase-tools": "^15.7.0",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"jspdf": "^4.1.0",
|
"jspdf": "^4.1.0",
|
||||||
@ -2367,6 +2368,649 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@firebase/ai": {
|
||||||
|
"version": "2.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/ai/-/ai-2.8.0.tgz",
|
||||||
|
"integrity": "sha512-grWYGFPsSo+pt+6CYeKR0kWnUfoLLS3xgWPvNrhAS5EPxl6xWq7+HjDZqX24yLneETyl45AVgDsTbVgxeWeRfg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app-check-interop-types": "0.3.3",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x",
|
||||||
|
"@firebase/app-types": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/analytics": {
|
||||||
|
"version": "0.10.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.19.tgz",
|
||||||
|
"integrity": "sha512-3wU676fh60gaiVYQEEXsbGS4HbF2XsiBphyvvqDbtC1U4/dO4coshbYktcCHq+HFaGIK07iHOh4pME0hEq1fcg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/analytics-compat": {
|
||||||
|
"version": "0.2.25",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.25.tgz",
|
||||||
|
"integrity": "sha512-fdzoaG0BEKbqksRDhmf4JoyZf16Wosrl0Y7tbZtJyVDOOwziE0vrFjmZuTdviL0yhak+Nco6rMsUUbkbD+qb6Q==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/analytics": "0.10.19",
|
||||||
|
"@firebase/analytics-types": "0.8.3",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/analytics-types": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.3.tgz",
|
||||||
|
"integrity": "sha512-VrIp/d8iq2g501qO46uGz3hjbDb8xzYMrbu8Tp0ovzIzrvJZ2fvmj649gTjge/b7cCCcjT0H37g1gVtlNhnkbg==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app": {
|
||||||
|
"version": "0.14.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.14.8.tgz",
|
||||||
|
"integrity": "sha512-WiE9uCGRLUnShdjb9iP20sA3ToWrBbNXr14/N5mow7Nls9dmKgfGaGX5cynLvrltxq2OrDLh1VDNaUgsnS/k/g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"idb": "7.1.1",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-check": {
|
||||||
|
"version": "0.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.11.0.tgz",
|
||||||
|
"integrity": "sha512-XAvALQayUMBJo58U/rxW02IhsesaxxfWVmVkauZvGEz3vOAjMEQnzFlyblqkc2iAaO82uJ2ZVyZv9XzPfxjJ6w==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-check-compat": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.4.0.tgz",
|
||||||
|
"integrity": "sha512-UfK2Q8RJNjYM/8MFORltZRG9lJj11k0nW84rrffiKvcJxLf1jf6IEjCIkCamykHE73C6BwqhVfhIBs69GXQV0g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app-check": "0.11.0",
|
||||||
|
"@firebase/app-check-types": "0.5.3",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-check-interop-types": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-check-types": {
|
||||||
|
"version": "0.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.3.tgz",
|
||||||
|
"integrity": "sha512-hyl5rKSj0QmwPdsAxrI5x1otDlByQ7bvNvVt8G/XPO2CSwE++rmSVf3VEhaeOR4J8ZFaF0Z0NDSmLejPweZ3ng==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-compat": {
|
||||||
|
"version": "0.5.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.5.8.tgz",
|
||||||
|
"integrity": "sha512-4De6SUZ36zozl9kh5rZSxKWULpgty27rMzZ6x+xkoo7+NWyhWyFdsdvhFsWhTw/9GGj0wXIcbTjwHYCUIUuHyg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app": "0.14.8",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/app-types": {
|
||||||
|
"version": "0.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.3.tgz",
|
||||||
|
"integrity": "sha512-kRVpIl4vVGJ4baogMDINbyrIOtOxqhkZQg4jTq3l8Lw6WSk0xfpEYzezFu+Kl4ve4fbPl79dvwRtaFqAC/ucCw==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/auth": {
|
||||||
|
"version": "1.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.12.0.tgz",
|
||||||
|
"integrity": "sha512-zkvLpsrxynWHk07qGrUDfCSqKf4AvfZGEqJ7mVCtYGjNNDbGE71k0Yn84rg8QEZu4hQw1BC0qDEHzpNVBcSVmA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x",
|
||||||
|
"@react-native-async-storage/async-storage": "^2.2.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@react-native-async-storage/async-storage": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/auth-compat": {
|
||||||
|
"version": "0.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.6.2.tgz",
|
||||||
|
"integrity": "sha512-8UhCzF6pav9bw/eXA8Zy1QAKssPRYEYXaWagie1ewLTwHkXv6bKp/j6/IwzSYQP67sy/BMFXIFaCCsoXzFLr7A==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/auth": "1.12.0",
|
||||||
|
"@firebase/auth-types": "0.13.0",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/auth-interop-types": {
|
||||||
|
"version": "0.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.4.tgz",
|
||||||
|
"integrity": "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/auth-types": {
|
||||||
|
"version": "0.13.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.13.0.tgz",
|
||||||
|
"integrity": "sha512-S/PuIjni0AQRLF+l9ck0YpsMOdE8GO2KU6ubmBB7P+7TJUCQDa3R1dlgYm9UzGbbePMZsp0xzB93f2b/CgxMOg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-types": "0.x",
|
||||||
|
"@firebase/util": "1.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/component": {
|
||||||
|
"version": "0.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz",
|
||||||
|
"integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/data-connect": {
|
||||||
|
"version": "0.3.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.12.tgz",
|
||||||
|
"integrity": "sha512-baPddcoNLj/+vYo+HSJidJUdr5W4OkhT109c5qhR8T1dJoZcyJpkv/dFpYlw/VJ3dV66vI8GHQFrmAZw/xUS4g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/auth-interop-types": "0.2.4",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/database": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-gM6MJFae3pTyNLoc9VcJNuaUDej0ctdjn3cVtILo3D5lpp0dmUHHLFN/pUKe7ImyeB1KAvRlEYxvIHNF04Filg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app-check-interop-types": "0.3.3",
|
||||||
|
"@firebase/auth-interop-types": "0.2.4",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"faye-websocket": "0.11.4",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/database-compat": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-8nYc43RqxScsePVd1qe1xxvWNf0OBnbwHxmXJ7MHSuuTVYFO3eLyLW3PiCKJ9fHnmIz4p4LbieXwz+qtr9PZDg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/database": "1.1.0",
|
||||||
|
"@firebase/database-types": "1.0.16",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/database-types": {
|
||||||
|
"version": "1.0.16",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.16.tgz",
|
||||||
|
"integrity": "sha512-xkQLQfU5De7+SPhEGAXFBnDryUWhhlFXelEg2YeZOQMCdoe7dL64DDAd77SQsR+6uoXIZY5MB4y/inCs4GTfcw==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app-types": "0.9.3",
|
||||||
|
"@firebase/util": "1.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/firestore": {
|
||||||
|
"version": "4.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.11.0.tgz",
|
||||||
|
"integrity": "sha512-Zb88s8rssBd0J2Tt+NUXMPt2sf+Dq7meatKiJf5t9oto1kZ8w9gK59Koe1uPVbaKfdgBp++N/z0I4G/HamyEhg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"@firebase/webchannel-wrapper": "1.0.5",
|
||||||
|
"@grpc/grpc-js": "~1.9.0",
|
||||||
|
"@grpc/proto-loader": "^0.7.8",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/firestore-compat": {
|
||||||
|
"version": "0.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.4.5.tgz",
|
||||||
|
"integrity": "sha512-yVX1CkVvqBI4qbA56uZo42xFA4TNU0ICQ+9AFDvYq9U9Xu6iAx9lFDAk/tN+NGereQQXXCSnpISwc/oxsQqPLA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/firestore": "4.11.0",
|
||||||
|
"@firebase/firestore-types": "3.0.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/firestore-types": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-hD2jGdiWRxB/eZWF89xcK9gF8wvENDJkzpVFb4aGkzfEaKxVRD1kjz1t1Wj8VZEp2LCB53Yx1zD8mrhQu87R6Q==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-types": "0.x",
|
||||||
|
"@firebase/util": "1.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/firestore/node_modules/@grpc/grpc-js": {
|
||||||
|
"version": "1.9.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.15.tgz",
|
||||||
|
"integrity": "sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@grpc/proto-loader": "^0.7.8",
|
||||||
|
"@types/node": ">=12.12.47"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^8.13.0 || >=10.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/firestore/node_modules/@grpc/proto-loader": {
|
||||||
|
"version": "0.7.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz",
|
||||||
|
"integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"lodash.camelcase": "^4.3.0",
|
||||||
|
"long": "^5.0.0",
|
||||||
|
"protobufjs": "^7.2.5",
|
||||||
|
"yargs": "^17.7.2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/functions": {
|
||||||
|
"version": "0.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.13.1.tgz",
|
||||||
|
"integrity": "sha512-sUeWSb0rw5T+6wuV2o9XNmh9yHxjFI9zVGFnjFi+n7drTEWpl7ZTz1nROgGrSu472r+LAaj+2YaSicD4R8wfbw==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/app-check-interop-types": "0.3.3",
|
||||||
|
"@firebase/auth-interop-types": "0.2.4",
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/messaging-interop-types": "0.2.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/functions-compat": {
|
||||||
|
"version": "0.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.4.1.tgz",
|
||||||
|
"integrity": "sha512-AxxUBXKuPrWaVNQ8o1cG1GaCAtXT8a0eaTDfqgS5VsRYLAR0ALcfqDLwo/QyijZj1w8Qf8n3Qrfy/+Im245hOQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/functions": "0.13.1",
|
||||||
|
"@firebase/functions-types": "0.6.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/functions-types": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-EZoDKQLUHFKNx6VLipQwrSMh01A1SaL3Wg6Hpi//x6/fJ6Ee4hrAeswK99I5Ht8roiniKHw4iO0B1Oxj5I4plg==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/installations": {
|
||||||
|
"version": "0.6.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.19.tgz",
|
||||||
|
"integrity": "sha512-nGDmiwKLI1lerhwfwSHvMR9RZuIH5/8E3kgUWnVRqqL7kGVSktjLTWEMva7oh5yxQ3zXfIlIwJwMcaM5bK5j8Q==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"idb": "7.1.1",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/installations-compat": {
|
||||||
|
"version": "0.2.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.19.tgz",
|
||||||
|
"integrity": "sha512-khfzIY3EI5LePePo7vT19/VEIH1E3iYsHknI/6ek9T8QCozAZshWT9CjlwOzZrKvTHMeNcbpo/VSOSIWDSjWdQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/installations-types": "0.5.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/installations-types": {
|
||||||
|
"version": "0.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.3.tgz",
|
||||||
|
"integrity": "sha512-2FJI7gkLqIE0iYsNQ1P751lO3hER+Umykel+TkLwHj6plzWVxqvfclPUZhcKFVQObqloEBTmpi2Ozn7EkCABAA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-types": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/logger": {
|
||||||
|
"version": "0.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz",
|
||||||
|
"integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/messaging": {
|
||||||
|
"version": "0.12.23",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.23.tgz",
|
||||||
|
"integrity": "sha512-cfuzv47XxqW4HH/OcR5rM+AlQd1xL/VhuaeW/wzMW1LFrsFcTn0GND/hak1vkQc2th8UisBcrkVcQAnOnKwYxg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/messaging-interop-types": "0.2.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"idb": "7.1.1",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/messaging-compat": {
|
||||||
|
"version": "0.2.23",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.23.tgz",
|
||||||
|
"integrity": "sha512-SN857v/kBUvlQ9X/UjAqBoQ2FEaL1ZozpnmL1ByTe57iXkmnVVFm9KqAsTfmf+OEwWI4kJJe9NObtN/w22lUgg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/messaging": "0.12.23",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/messaging-interop-types": {
|
||||||
|
"version": "0.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.3.tgz",
|
||||||
|
"integrity": "sha512-xfzFaJpzcmtDjycpDeCUj0Ge10ATFi/VHVIvEEjDNc3hodVBQADZ7BWQU7CuFpjSHE+eLuBI13z5F/9xOoGX8Q==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/performance": {
|
||||||
|
"version": "0.7.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.9.tgz",
|
||||||
|
"integrity": "sha512-UzybENl1EdM2I1sjYm74xGt/0JzRnU/0VmfMAKo2LSpHJzaj77FCLZXmYQ4oOuE+Pxtt8Wy2BVJEENiZkaZAzQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0",
|
||||||
|
"web-vitals": "^4.2.4"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/performance-compat": {
|
||||||
|
"version": "0.2.22",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.22.tgz",
|
||||||
|
"integrity": "sha512-xLKxaSAl/FVi10wDX/CHIYEUP13jXUjinL+UaNXT9ByIvxII5Ne5150mx6IgM8G6Q3V+sPiw9C8/kygkyHUVxg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/performance": "0.7.9",
|
||||||
|
"@firebase/performance-types": "0.2.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/performance-types": {
|
||||||
|
"version": "0.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.3.tgz",
|
||||||
|
"integrity": "sha512-IgkyTz6QZVPAq8GSkLYJvwSLr3LS9+V6vNPQr0x4YozZJiLF5jYixj0amDtATf1X0EtYHqoPO48a9ija8GocxQ==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/remote-config": {
|
||||||
|
"version": "0.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.8.0.tgz",
|
||||||
|
"integrity": "sha512-sJz7C2VACeE257Z/3kY9Ap2WXbFsgsDLfaGfZmmToKAK39ipXxFan+vzB9CSbF6mP7bzjyzEnqPcMXhAnYE6fQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/remote-config-compat": {
|
||||||
|
"version": "0.2.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.21.tgz",
|
||||||
|
"integrity": "sha512-9+lm0eUycxbu8GO25JfJe4s6R2xlDqlVt0CR6CvN9E6B4AFArEV4qfLoDVRgIEB7nHKwvH2nYRocPWfmjRQTnw==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/logger": "0.5.0",
|
||||||
|
"@firebase/remote-config": "0.8.0",
|
||||||
|
"@firebase/remote-config-types": "0.5.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/remote-config-types": {
|
||||||
|
"version": "0.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.5.0.tgz",
|
||||||
|
"integrity": "sha512-vI3bqLoF14L/GchtgayMiFpZJF+Ao3uR8WCde0XpYNkSokDpAKca2DxvcfeZv7lZUqkUwQPL2wD83d3vQ4vvrg==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/storage": {
|
||||||
|
"version": "0.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.14.0.tgz",
|
||||||
|
"integrity": "sha512-xWWbb15o6/pWEw8H01UQ1dC5U3rf8QTAzOChYyCpafV6Xki7KVp3Yaw2nSklUwHEziSWE9KoZJS7iYeyqWnYFA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/storage-compat": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.4.0.tgz",
|
||||||
|
"integrity": "sha512-vDzhgGczr1OfcOy285YAPur5pWDEvD67w4thyeCUh6Ys0izN9fNYtA1MJERmNBfqjqu0lg0FM5GLbw0Il21M+g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/component": "0.7.0",
|
||||||
|
"@firebase/storage": "0.14.0",
|
||||||
|
"@firebase/storage-types": "0.8.3",
|
||||||
|
"@firebase/util": "1.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-compat": "0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/storage-types": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.3.tgz",
|
||||||
|
"integrity": "sha512-+Muk7g9uwngTpd8xn9OdF/D48uiQ7I1Fae7ULsWPuKoCH3HU7bfFPhxtJYzyhjdniowhuDpQcfPmuNRAqZEfvg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@firebase/app-types": "0.x",
|
||||||
|
"@firebase/util": "1.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/util": {
|
||||||
|
"version": "1.13.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz",
|
||||||
|
"integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@firebase/webchannel-wrapper": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-+uGNN7rkfn41HLO0vekTFhTxk61eKa8mTpRGLO0QSqlQdKvIoGAvLp3ppdVIWbTGYJWM6Kp0iN+PjMIOcnVqTw==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/@google-cloud/cloud-sql-connector": {
|
"node_modules/@google-cloud/cloud-sql-connector": {
|
||||||
"version": "1.9.1",
|
"version": "1.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/@google-cloud/cloud-sql-connector/-/cloud-sql-connector-1.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/@google-cloud/cloud-sql-connector/-/cloud-sql-connector-1.9.1.tgz",
|
||||||
@ -8787,6 +9431,18 @@
|
|||||||
],
|
],
|
||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
|
"node_modules/faye-websocket": {
|
||||||
|
"version": "0.11.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
|
||||||
|
"integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"websocket-driver": ">=0.5.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fd-slicer": {
|
"node_modules/fd-slicer": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||||
@ -8923,6 +9579,42 @@
|
|||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/firebase": {
|
||||||
|
"version": "12.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/firebase/-/firebase-12.9.0.tgz",
|
||||||
|
"integrity": "sha512-CwwTYoqZg6KxygPOaaJqIc4aoLvo0RCRrXoln9GoxLE8QyAwTydBaSLGVlR4WPcuOgN3OEL0tJLT1H4IU/dv7w==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@firebase/ai": "2.8.0",
|
||||||
|
"@firebase/analytics": "0.10.19",
|
||||||
|
"@firebase/analytics-compat": "0.2.25",
|
||||||
|
"@firebase/app": "0.14.8",
|
||||||
|
"@firebase/app-check": "0.11.0",
|
||||||
|
"@firebase/app-check-compat": "0.4.0",
|
||||||
|
"@firebase/app-compat": "0.5.8",
|
||||||
|
"@firebase/app-types": "0.9.3",
|
||||||
|
"@firebase/auth": "1.12.0",
|
||||||
|
"@firebase/auth-compat": "0.6.2",
|
||||||
|
"@firebase/data-connect": "0.3.12",
|
||||||
|
"@firebase/database": "1.1.0",
|
||||||
|
"@firebase/database-compat": "2.1.0",
|
||||||
|
"@firebase/firestore": "4.11.0",
|
||||||
|
"@firebase/firestore-compat": "0.4.5",
|
||||||
|
"@firebase/functions": "0.13.1",
|
||||||
|
"@firebase/functions-compat": "0.4.1",
|
||||||
|
"@firebase/installations": "0.6.19",
|
||||||
|
"@firebase/installations-compat": "0.2.19",
|
||||||
|
"@firebase/messaging": "0.12.23",
|
||||||
|
"@firebase/messaging-compat": "0.2.23",
|
||||||
|
"@firebase/performance": "0.7.9",
|
||||||
|
"@firebase/performance-compat": "0.2.22",
|
||||||
|
"@firebase/remote-config": "0.8.0",
|
||||||
|
"@firebase/remote-config-compat": "0.2.21",
|
||||||
|
"@firebase/storage": "0.14.0",
|
||||||
|
"@firebase/storage-compat": "0.4.0",
|
||||||
|
"@firebase/util": "1.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/firebase-tools": {
|
"node_modules/firebase-tools": {
|
||||||
"version": "15.7.0",
|
"version": "15.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/firebase-tools/-/firebase-tools-15.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/firebase-tools/-/firebase-tools-15.7.0.tgz",
|
||||||
@ -10261,6 +10953,12 @@
|
|||||||
"url": "https://opencollective.com/express"
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/http-parser-js": {
|
||||||
|
"version": "0.5.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz",
|
||||||
|
"integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/http-proxy-agent": {
|
"node_modules/http-proxy-agent": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
|
||||||
@ -10307,7 +11005,6 @@
|
|||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz",
|
||||||
"integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==",
|
"integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/ieee754": {
|
"node_modules/ieee754": {
|
||||||
@ -16550,6 +17247,12 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/web-vitals": {
|
||||||
|
"version": "4.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz",
|
||||||
|
"integrity": "sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/webidl-conversions": {
|
"node_modules/webidl-conversions": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||||
@ -16557,6 +17260,29 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause"
|
"license": "BSD-2-Clause"
|
||||||
},
|
},
|
||||||
|
"node_modules/websocket-driver": {
|
||||||
|
"version": "0.7.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
|
||||||
|
"integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"http-parser-js": ">=0.5.1",
|
||||||
|
"safe-buffer": ">=5.1.0",
|
||||||
|
"websocket-extensions": ">=0.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/websocket-extensions": {
|
||||||
|
"version": "0.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
|
||||||
|
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/whatwg-fetch": {
|
"node_modules/whatwg-fetch": {
|
||||||
"version": "3.6.20",
|
"version": "3.6.20",
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
|
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
"@tailwindcss/vite": "^4.2.0",
|
"@tailwindcss/vite": "^4.2.0",
|
||||||
"axios": "^1.13.2",
|
"axios": "^1.13.2",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
|
"firebase": "^12.9.0",
|
||||||
"firebase-tools": "^15.7.0",
|
"firebase-tools": "^15.7.0",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"jspdf": "^4.1.0",
|
"jspdf": "^4.1.0",
|
||||||
|
|||||||
1
frontend/register_design.html
Normal file
1
frontend/register_design.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
OK
|
||||||
@ -3,10 +3,9 @@ import { ref } from 'vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { authService } from '@/services/authService'
|
import { authService } from '@/services/authService'
|
||||||
import { useAuthStore } from '@/stores/auth'
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
import { signInWithGoogle } from '@/firebaseConfig'
|
||||||
|
|
||||||
defineProps<{
|
const emit = defineEmits(['toggle'])
|
||||||
onToggle: () => void
|
|
||||||
}>()
|
|
||||||
|
|
||||||
const email = ref('')
|
const email = ref('')
|
||||||
const password = ref('')
|
const password = ref('')
|
||||||
@ -31,177 +30,128 @@ const handleLogin = async () => {
|
|||||||
|
|
||||||
// Redirect based on role or home
|
// Redirect based on role or home
|
||||||
const role = response.role.toUpperCase()
|
const role = response.role.toUpperCase()
|
||||||
if (role === 'ADMIN') {
|
if (role === 'ADMIN') router.push('/admin')
|
||||||
router.push('/admin')
|
else if (role === 'DRIVER') router.push('/driver')
|
||||||
} else if (role === 'DRIVER') {
|
else if (role === 'PROMOTER') router.push('/promoter')
|
||||||
router.push('/driver')
|
else router.push('/map')
|
||||||
} else if (role === 'PROMOTER') {
|
|
||||||
router.push('/promoter')
|
|
||||||
} else {
|
|
||||||
router.push('/map')
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (!error.response) {
|
if (!error.response) {
|
||||||
errorMessage.value = `Error de conexión: No se pudo contactar con el servidor en ${authService.getApiUrl()}. Revisa si el backend está encendido y accesible desde este dispositivo.`
|
errorMessage.value = 'Error de conexión. Verifica tu internet.'
|
||||||
} else if (error.response.status === 401) {
|
} else if (error.response.status === 401) {
|
||||||
errorMessage.value = 'Correo o contraseña incorrectos.'
|
errorMessage.value = 'Credenciales inválidas.'
|
||||||
} else {
|
} else {
|
||||||
errorMessage.value = error.response?.data?.detail || 'Error interno del servidor. Inténtalo más tarde.'
|
errorMessage.value = error.response?.data?.detail || 'Error en el servidor.'
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleGoogleLogin = async () => {
|
||||||
|
isLoading.value = true
|
||||||
|
errorMessage.value = ''
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { token } = await signInWithGoogle()
|
||||||
|
const response = await authService.googleLogin(token)
|
||||||
|
|
||||||
|
authStore.login(response.access_token, response.role, response.full_name)
|
||||||
|
|
||||||
|
const role = response.role.toUpperCase()
|
||||||
|
if (role === 'ADMIN') router.push('/admin')
|
||||||
|
else if (role === 'DRIVER') router.push('/driver')
|
||||||
|
else if (role === 'PROMOTER') router.push('/promoter')
|
||||||
|
else router.push('/map')
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
errorMessage.value = 'Error al iniciar sesión con Google.'
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
isLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="login-form">
|
<div class="login-hud">
|
||||||
<h2 class="auth-title">Iniciar Sesión</h2>
|
<!-- Google Login Button (Featured) -->
|
||||||
|
<button
|
||||||
<form @submit.prevent="handleLogin" class="form-container">
|
@click="handleGoogleLogin"
|
||||||
<div class="form-group">
|
class="w-full mb-8 h-14 bg-white dark:bg-zinc-800 rounded-2xl flex items-center justify-center gap-3 border border-slate-200 dark:border-white/10 shadow-sm active:scale-95 transition-all group"
|
||||||
<label for="email">Correo Electrónico</label>
|
>
|
||||||
<input
|
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" class="size-6" alt="Google">
|
||||||
type="email"
|
<span class="text-sm font-black text-slate-700 dark:text-gray-200 uppercase tracking-tight">Continuar con Google</span>
|
||||||
id="email"
|
<div class="absolute inset-0 rounded-2xl border-2 border-primary opacity-0 group-hover:opacity-100 transition-opacity"></div>
|
||||||
v-model="email"
|
</button>
|
||||||
placeholder="ejemplo@correo.com"
|
|
||||||
required
|
<div class="flex items-center gap-4 mb-8">
|
||||||
/>
|
<div class="h-px flex-1 bg-white/5"></div>
|
||||||
|
<span class="text-[10px] font-black text-slate-500 uppercase tracking-widest">O entrar con email</span>
|
||||||
|
<div class="h-px flex-1 bg-white/5"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form @submit.prevent="handleLogin" class="space-y-4">
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<label class="text-[10px] font-black text-primary uppercase tracking-widest ml-1">Terminal de Correo</label>
|
||||||
|
<div class="relative group">
|
||||||
|
<span class="material-icons absolute left-4 top-1/2 -translate-y-1/2 text-primary/40 text-sm">alternate_email</span>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
v-model="email"
|
||||||
|
placeholder="ACCESS_ID@SIBU.COM"
|
||||||
|
required
|
||||||
|
class="w-full pl-12 pr-4 h-14 bg-white/5 border border-white/10 rounded-2xl text-white font-bold placeholder:text-slate-600 focus:border-primary focus:ring-0 transition-all uppercase text-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="space-y-1.5">
|
||||||
<label for="password">Contraseña</label>
|
<label class="text-[10px] font-black text-primary uppercase tracking-widest ml-1">Código de Acceso</label>
|
||||||
<input
|
<div class="relative group">
|
||||||
type="password"
|
<span class="material-icons absolute left-4 top-1/2 -translate-y-1/2 text-primary/40 text-sm">lock_open</span>
|
||||||
id="password"
|
<input
|
||||||
v-model="password"
|
type="password"
|
||||||
placeholder="********"
|
v-model="password"
|
||||||
required
|
placeholder="••••••••"
|
||||||
/>
|
required
|
||||||
|
class="w-full pl-12 pr-4 h-14 bg-white/5 border border-white/10 rounded-2xl text-white font-bold focus:border-primary focus:ring-0 transition-all text-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-options">
|
<div class="flex items-center justify-between pt-2">
|
||||||
<label class="checkbox-container">
|
<label class="flex items-center gap-2 cursor-pointer group">
|
||||||
<input type="checkbox" v-model="keepSession" />
|
<input type="checkbox" v-model="keepSession" class="hidden" />
|
||||||
<span class="checkmark"></span>
|
<div class="size-5 rounded-lg border-2 border-white/10 flex items-center justify-center transition-colors" :class="keepSession ? 'bg-primary border-primary' : ''">
|
||||||
Mantener sesión
|
<span class="material-icons text-slate-900 text-xs" v-if="keepSession">check</span>
|
||||||
|
</div>
|
||||||
|
<span class="text-[10px] font-bold text-slate-500 uppercase">Mantener sesión</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p v-if="errorMessage" class="error-text">{{ errorMessage }}</p>
|
<p v-if="errorMessage" class="text-xs font-bold text-red-500 uppercase tracking-tight text-center">{{ errorMessage }}</p>
|
||||||
|
|
||||||
<button type="submit" class="auth-button" :disabled="isLoading">
|
<button
|
||||||
<span v-if="isLoading">Cargando...</span>
|
type="submit"
|
||||||
<span v-else>Entrar</span>
|
class="w-full h-14 bg-primary text-slate-900 rounded-2xl font-black uppercase tracking-[0.2em] text-xs shadow-xl shadow-primary/20 active:scale-95 transition-all mt-4"
|
||||||
|
:disabled="isLoading"
|
||||||
|
>
|
||||||
|
{{ isLoading ? 'Validando...' : 'Acceder al Sistema' }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="auth-footer">
|
<div class="mt-8 text-center">
|
||||||
<p>¿No tienes cuenta? <a @click.prevent="onToggle" href="#">Regístrate aquí</a></p>
|
<p class="text-[11px] font-bold text-slate-500 uppercase">
|
||||||
|
¿Nuevo en la red?
|
||||||
|
<button @click="emit('toggle')" class="text-primary hover:underline ml-1">Crear Registro</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.login-form {
|
input::placeholder {
|
||||||
width: 100%;
|
letter-spacing: 0.1em;
|
||||||
}
|
|
||||||
|
|
||||||
.auth-title {
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="email"],
|
|
||||||
input[type="password"] {
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
color: var(--text-primary);
|
|
||||||
font-size: 16px;
|
|
||||||
transition: border-color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:focus {
|
|
||||||
outline: none;
|
|
||||||
border-color: var(--accent-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-options {
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-button {
|
|
||||||
margin-top: 12px;
|
|
||||||
padding: 14px;
|
|
||||||
background: var(--accent-color);
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.2s, background 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-button:hover:not(:disabled) {
|
|
||||||
background: var(--accent-hover);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-button:disabled {
|
|
||||||
opacity: 0.7;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-text {
|
|
||||||
color: #ef5350;
|
|
||||||
font-size: 14px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-footer {
|
|
||||||
margin-top: 24px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-footer a {
|
|
||||||
color: var(--accent-color);
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,17 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { authService } from '@/services/authService'
|
import { authService } from '@/services/authService'
|
||||||
|
import { analyticsService } from '@/services/analyticsService'
|
||||||
|
|
||||||
const { onToggle, onSuccess } = defineProps<{
|
const emit = defineEmits(['toggle', 'success'])
|
||||||
onToggle: () => void,
|
|
||||||
onSuccess: () => void
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Form data
|
|
||||||
const fullName = ref('')
|
const fullName = ref('')
|
||||||
const email = ref('')
|
const email = ref('')
|
||||||
const password = ref('')
|
const password = ref('')
|
||||||
|
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(false)
|
||||||
const errorMessage = ref('')
|
const errorMessage = ref('')
|
||||||
const successMessage = ref('')
|
const successMessage = ref('')
|
||||||
@ -27,12 +23,17 @@ const handleRegister = async () => {
|
|||||||
password: password.value
|
password: password.value
|
||||||
})
|
})
|
||||||
|
|
||||||
successMessage.value = 'Registro exitoso. Ya puedes iniciar sesión.'
|
analyticsService.logEvent({
|
||||||
|
event_name: 'sign_up',
|
||||||
|
properties: { method: 'email' }
|
||||||
|
})
|
||||||
|
|
||||||
|
successMessage.value = 'Registro exitoso. Ahora puedes entrar.'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onSuccess() // Back to login
|
emit('success')
|
||||||
}, 2000)
|
}, 2000)
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
errorMessage.value = error.response?.data?.detail || 'Error al registrarse'
|
errorMessage.value = error.response?.data?.detail || 'Error al crear la cuenta.'
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
@ -40,216 +41,73 @@ const handleRegister = async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="register-form">
|
<div class="register-hud">
|
||||||
<h2 class="auth-title">Registrarse</h2>
|
<div v-if="successMessage" class="bg-primary/10 border border-primary/50 p-6 rounded-3xl text-center mb-6">
|
||||||
|
<span class="material-icons text-primary text-4xl mb-2">verified_user</span>
|
||||||
<div class="form-scroll-container">
|
<h3 class="text-white font-black uppercase text-sm mb-1">Acceso Concedido</h3>
|
||||||
<form @submit.prevent="handleRegister" class="form-container">
|
<p class="text-xs text-primary/80 font-bold uppercase">{{ successMessage }}</p>
|
||||||
<!-- Common Fields -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Nombre Completo</label>
|
|
||||||
<input type="text" v-model="fullName" placeholder="Juan Pérez" required />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Correo Electrónico</label>
|
|
||||||
<input type="email" v-model="email" placeholder="juan@correo.com" required />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Contraseña</label>
|
|
||||||
<input type="password" v-model="password" placeholder="********" required />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p v-if="errorMessage" class="error-text">{{ errorMessage }}</p>
|
|
||||||
<p v-if="successMessage" class="success-text">{{ successMessage }}</p>
|
|
||||||
|
|
||||||
<button type="submit" class="auth-button" :disabled="isLoading">
|
|
||||||
<span v-if="isLoading">Cargando...</span>
|
|
||||||
<span v-else>Registrarse</span>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form v-else @submit.prevent="handleRegister" class="space-y-4">
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<label class="text-[10px] font-black text-primary uppercase tracking-widest ml-1">Identidad de Usuario</label>
|
||||||
|
<div class="relative group">
|
||||||
|
<span class="material-icons absolute left-4 top-1/2 -translate-y-1/2 text-primary/40 text-sm">badge</span>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="fullName"
|
||||||
|
placeholder="NOMBRE COMPLETO"
|
||||||
|
required
|
||||||
|
class="w-full pl-12 pr-4 h-14 bg-white/5 border border-white/10 rounded-2xl text-white font-bold placeholder:text-slate-600 focus:border-primary focus:ring-0 transition-all uppercase text-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<label class="text-[10px] font-black text-primary uppercase tracking-widest ml-1">Terminal de Correo</label>
|
||||||
|
<div class="relative group">
|
||||||
|
<span class="material-icons absolute left-4 top-1/2 -translate-y-1/2 text-primary/40 text-sm">alternate_email</span>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
v-model="email"
|
||||||
|
placeholder="USUARIO@SIBU.COM"
|
||||||
|
required
|
||||||
|
class="w-full pl-12 pr-4 h-14 bg-white/5 border border-white/10 rounded-2xl text-white font-bold placeholder:text-slate-600 focus:border-primary focus:ring-0 transition-all uppercase text-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<label class="text-[10px] font-black text-primary uppercase tracking-widest ml-1">Definir Código de Acceso</label>
|
||||||
|
<div class="relative group">
|
||||||
|
<span class="material-icons absolute left-4 top-1/2 -translate-y-1/2 text-primary/40 text-sm">security</span>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
v-model="password"
|
||||||
|
placeholder="MÍNIMO 8 CARACTERES"
|
||||||
|
required
|
||||||
|
minlength="8"
|
||||||
|
class="w-full pl-12 pr-4 h-14 bg-white/5 border border-white/10 rounded-2xl text-white font-bold placeholder:text-slate-600 focus:border-primary focus:ring-0 transition-all text-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p v-if="errorMessage" class="text-xs font-bold text-red-500 uppercase tracking-tight text-center">{{ errorMessage }}</p>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="w-full h-14 bg-primary text-slate-900 rounded-2xl font-black uppercase tracking-[0.2em] text-xs shadow-xl shadow-primary/20 active:scale-95 transition-all mt-6"
|
||||||
|
:disabled="isLoading"
|
||||||
|
>
|
||||||
|
{{ isLoading ? 'Procesando Datos...' : 'Registrar Credenciales' }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div class="auth-footer">
|
<div class="mt-8 text-center">
|
||||||
<p>¿Ya tienes cuenta? <a @click.prevent="onToggle" href="#">Inicia sesión</a></p>
|
<p class="text-[11px] font-bold text-slate-500 uppercase">
|
||||||
|
¿Ya tienes autorización?
|
||||||
|
<button @click="emit('toggle')" class="text-primary hover:underline ml-1">Regresar al Login</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.register-form {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-title {
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-selection {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selection-detail {
|
|
||||||
text-align: center;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-cards {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-card {
|
|
||||||
border: 2px solid var(--border-color);
|
|
||||||
border-radius: 12px;
|
|
||||||
padding: 16px;
|
|
||||||
text-align: center;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-card:hover {
|
|
||||||
border-color: var(--accent-color);
|
|
||||||
transform: translateY(-4px);
|
|
||||||
background: var(--hover-bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-card .material-icons {
|
|
||||||
font-size: 32px;
|
|
||||||
color: var(--accent-color);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-card h3 {
|
|
||||||
font-size: 16px;
|
|
||||||
margin: 4px 0;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-card p {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-scroll-container {
|
|
||||||
max-height: 450px;
|
|
||||||
overflow-y: auto;
|
|
||||||
padding-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Custom Scrollbar */
|
|
||||||
.form-scroll-container::-webkit-scrollbar {
|
|
||||||
width: 4px;
|
|
||||||
}
|
|
||||||
.form-scroll-container::-webkit-scrollbar-thumb {
|
|
||||||
background: var(--border-color);
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-link {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vehicle-tabs {
|
|
||||||
display: flex;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 4px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vehicle-tabs button {
|
|
||||||
flex: 1;
|
|
||||||
padding: 8px;
|
|
||||||
border: none;
|
|
||||||
background: transparent;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-weight: 600;
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vehicle-tabs button.active {
|
|
||||||
background: var(--card-bg);
|
|
||||||
color: var(--accent-color);
|
|
||||||
box-shadow: 0 2px 4px var(--shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
color: var(--text-primary);
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="file"] {
|
|
||||||
font-size: 12px;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-button {
|
|
||||||
margin-top: 12px;
|
|
||||||
padding: 14px;
|
|
||||||
background: var(--accent-color);
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-text { color: #ef5350; font-size: 14px; }
|
|
||||||
.success-text { color: #4caf50; font-size: 14px; font-weight: 600; }
|
|
||||||
|
|
||||||
.auth-footer {
|
|
||||||
margin-top: 24px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-footer a {
|
|
||||||
color: var(--accent-color);
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
30
frontend/src/firebaseConfig.ts
Normal file
30
frontend/src/firebaseConfig.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { initializeApp } from 'firebase/app';
|
||||||
|
import { getAuth, GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
|
||||||
|
|
||||||
|
const firebaseConfig = {
|
||||||
|
apiKey: "AIzaSyAG8nmGLHYmXGkl018NjW2sMcIiutM4ne0",
|
||||||
|
authDomain: "sibu2-0-transport-2026.firebaseapp.com",
|
||||||
|
projectId: "sibu2-0-transport-2026",
|
||||||
|
storageBucket: "sibu2-0-transport-2026.firebasestorage.app",
|
||||||
|
messagingSenderId: "1015760260932",
|
||||||
|
appId: "1:1015760260932:web:5657b544bc8099ab54d111"
|
||||||
|
};
|
||||||
|
|
||||||
|
const app = initializeApp(firebaseConfig);
|
||||||
|
export const auth = getAuth(app);
|
||||||
|
export const googleProvider = new GoogleAuthProvider();
|
||||||
|
|
||||||
|
export const signInWithGoogle = async () => {
|
||||||
|
try {
|
||||||
|
const result = await signInWithPopup(auth, googleProvider);
|
||||||
|
// This gives you a Google Access Token. You can use it to access the Google API.
|
||||||
|
const token = await result.user.getIdToken();
|
||||||
|
return {
|
||||||
|
user: result.user,
|
||||||
|
token: token
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error signing in with Google", error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { apiClient } from './apiClient'
|
import { apiClient } from './apiClient'
|
||||||
|
|
||||||
export interface AnalyticsEvent {
|
export interface AnalyticsEvent {
|
||||||
event_name: 'app_open' | 'screen_view' | 'route_selected' | 'stop_selected' | 'schedule_viewed' | 'reminder_created' | 'promo_view' | 'promo_click' | 'taxi_view' | 'taxi_click' | 'shuttle_view' | 'shuttle_contact' | 'business_view' | 'business_contact'
|
event_name: 'app_open' | 'screen_view' | 'route_selected' | 'stop_selected' | 'schedule_viewed' | 'reminder_created' | 'promo_view' | 'promo_click' | 'taxi_view' | 'taxi_click' | 'shuttle_view' | 'shuttle_contact' | 'business_view' | 'business_contact' | 'login' | 'sign_up'
|
||||||
screen_name?: string
|
screen_name?: string
|
||||||
item_id?: string
|
item_id?: string
|
||||||
properties?: Record<string, any>
|
properties?: Record<string, any>
|
||||||
|
|||||||
@ -14,6 +14,11 @@ export const authService = {
|
|||||||
return response.data
|
return response.data
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async googleLogin(idToken: string): Promise<LoginResponse> {
|
||||||
|
const response = await apiClient.post<LoginResponse>('/api/auth/google', { id_token: idToken })
|
||||||
|
return response.data
|
||||||
|
},
|
||||||
|
|
||||||
async registerPassenger(data: any) {
|
async registerPassenger(data: any) {
|
||||||
const response = await apiClient.post('/api/auth/register/passenger', data)
|
const response = await apiClient.post('/api/auth/register/passenger', data)
|
||||||
return response.data
|
return response.data
|
||||||
|
|||||||
@ -11,78 +11,134 @@ const toggleAuth = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="auth-view">
|
<div class="auth-view-hud bg-[#0F1115] min-h-screen flex items-center justify-center p-6 relative overflow-hidden">
|
||||||
<div class="auth-box">
|
<!-- HUD Background Elements -->
|
||||||
<div class="auth-header">
|
<div class="absolute inset-0 pointer-events-none">
|
||||||
<img src="/icon-192.png" alt="SIBU Logo" class="logo" />
|
<div class="scanning-lines"></div>
|
||||||
<h1 class="brand-name">SIBU</h1>
|
<div class="hud-corner top-left"></div>
|
||||||
<p class="brand-tagline">Moviendo a tu comunidad</p>
|
<div class="hud-corner top-right"></div>
|
||||||
</div>
|
<div class="hud-corner bottom-left"></div>
|
||||||
|
<div class="hud-corner bottom-right"></div>
|
||||||
|
|
||||||
<transition name="fade" mode="out-in">
|
<!-- Animated HUD Circles -->
|
||||||
<LoginForm v-if="isLogin" :on-toggle="toggleAuth" />
|
<div class="hud-circle opacity-10"></div>
|
||||||
<RegisterForm v-else :on-toggle="toggleAuth" :on-success="() => isLogin = true" />
|
<div class="hud-circle-inner opacity-5"></div>
|
||||||
</transition>
|
</div>
|
||||||
|
|
||||||
|
<div class="auth-container relative z-10 w-full max-w-md">
|
||||||
|
<!-- SIBU Branding -->
|
||||||
|
<div class="text-center mb-10">
|
||||||
|
<h1 class="text-5xl font-black italic tracking-tighter text-primary mb-2">SIBU</h1>
|
||||||
|
<div class="flex items-center justify-center gap-2">
|
||||||
|
<span class="h-px w-8 bg-primary/30"></span>
|
||||||
|
<p class="text-[10px] font-bold text-primary tracking-[0.3em] uppercase">Auth System v2.0</p>
|
||||||
|
<span class="h-px w-8 bg-primary/30"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Auth Box -->
|
||||||
|
<div class="bg-[#1C1F26]/60 backdrop-blur-xl rounded-[2.5rem] p-8 border border-white/5 shadow-2xl relative">
|
||||||
|
<!-- Floating HUD bracket -->
|
||||||
|
<div class="absolute -top-4 -left-4 size-12 border-t-2 border-l-2 border-primary/40 rounded-tl-2xl"></div>
|
||||||
|
<div class="absolute -bottom-4 -right-4 size-12 border-b-2 border-r-2 border-primary/40 rounded-br-2xl"></div>
|
||||||
|
|
||||||
|
<transition name="hud-fade" mode="out-in">
|
||||||
|
<div :key="isLogin ? 'login' : 'register'">
|
||||||
|
<div class="mb-8">
|
||||||
|
<h2 class="text-2xl font-black text-white mb-1">
|
||||||
|
{{ isLogin ? 'SNC: INICIAR SESIÓN' : 'SNC: REGISTRO' }}
|
||||||
|
</h2>
|
||||||
|
<p class="text-xs text-slate-500 font-bold uppercase tracking-wider">
|
||||||
|
{{ isLogin ? 'Acceso autorizado requerido' : 'Crear nuevas credenciales de acceso' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<LoginForm v-if="isLogin" @toggle="toggleAuth" />
|
||||||
|
<RegisterForm v-else @toggle="toggleAuth" @success="isLogin = true" />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer Help -->
|
||||||
|
<div class="mt-8 text-center">
|
||||||
|
<p class="text-[10px] font-bold text-slate-600 uppercase tracking-widest">
|
||||||
|
Encriptación End-to-End • SIBU Cloud Services
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.auth-view {
|
.auth-view-hud {
|
||||||
min-height: 100vh;
|
font-family: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: linear-gradient(135deg, #42b983 0%, #2c3e50 100%);
|
|
||||||
padding: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-box {
|
.scanning-lines {
|
||||||
background: var(--card-bg);
|
position: absolute;
|
||||||
width: 100%;
|
inset: 0;
|
||||||
max-width: 440px;
|
background: linear-gradient(
|
||||||
padding: 40px;
|
to bottom,
|
||||||
border-radius: 20px;
|
transparent 50%,
|
||||||
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
|
rgba(254, 231, 21, 0.02) 50%
|
||||||
|
);
|
||||||
|
background-size: 100% 4px;
|
||||||
|
animation: scan 10s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-header {
|
@keyframes scan {
|
||||||
text-align: center;
|
from { background-position: 0 0; }
|
||||||
margin-bottom: 32px;
|
to { background-position: 0 100%; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.hud-corner {
|
||||||
width: 80px;
|
position: absolute;
|
||||||
height: 80px;
|
width: 40px;
|
||||||
margin-bottom: 12px;
|
height: 40px;
|
||||||
|
border-color: rgba(254, 231, 21, 0.2);
|
||||||
|
border-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-name {
|
.top-left { top: 40px; left: 40px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
|
||||||
font-size: 28px;
|
.top-right { top: 40px; right: 40px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
|
||||||
font-weight: 800;
|
.bottom-left { bottom: 40px; left: 40px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
|
||||||
color: var(--text-primary);
|
.bottom-right { bottom: 40px; right: 40px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }
|
||||||
margin: 0;
|
|
||||||
|
.hud-circle {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 600px;
|
||||||
|
height: 600px;
|
||||||
|
border: 1px dashed rgba(254, 231, 21, 0.3);
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 60s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-tagline {
|
.hud-circle-inner {
|
||||||
font-size: 14px;
|
position: absolute;
|
||||||
color: var(--text-secondary);
|
top: 50%;
|
||||||
margin: 4px 0 0 0;
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
|
border: 40px double rgba(254, 231, 21, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Animations */
|
@keyframes spin {
|
||||||
.fade-enter-active,
|
from { transform: translate(-50%, -50%) rotate(0deg); }
|
||||||
.fade-leave-active {
|
to { transform: translate(-50%, -50%) rotate(360deg); }
|
||||||
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fade-enter-from {
|
.hud-fade-enter-active, .hud-fade-leave-active {
|
||||||
|
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hud-fade-enter-from, .hud-fade-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(10px);
|
transform: scale(0.95);
|
||||||
}
|
filter: blur(10px);
|
||||||
|
|
||||||
.fade-leave-to {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user