refacto : clarity and selector consistency

This commit is contained in:
BlackSigKill 2026-02-13 17:27:20 +01:00
parent 76017392ae
commit 8f9e201496
2 changed files with 13 additions and 12 deletions

View file

@ -205,7 +205,7 @@
Sign in with Google
</button>
<div class="divider" style="display:none">or</div>
<div id="divider" class="divider" style="display:none">or</div>
<form id="email-form" onsubmit="emailAuth(event)" style="display:none">
<div class="form-group">
@ -277,9 +277,19 @@
const auth = getAuth(fbApp);
const provider = new GoogleAuthProvider();
function showError(msg) {
const el = document.getElementById('error');
el.textContent = msg;
el.style.display = 'block';
}
function hideError() {
document.getElementById('error').style.display = 'none';
}
const googleBtn = document.getElementById('google-btn');
const emailForm = document.getElementById('email-form');
const divider = document.querySelector('.divider');
const divider = document.getElementById('divider');
const providerState = {
google: true,
password: true,
@ -307,16 +317,6 @@
renderProviders();
function showError(msg) {
const el = document.getElementById('error');
el.textContent = msg;
el.style.display = 'block';
}
function hideError() {
document.getElementById('error').style.display = 'none';
}
function setLoading(loading) {
document.getElementById('google-btn').disabled = loading;
document.getElementById('email-btn').disabled = loading;

View file

@ -58,6 +58,7 @@ export default function authGatePlugin() {
authProviderOverrides.google = AUTH_GOOGLE_ENABLED !== 'false';
}
if (AUTH_EMAIL_ENABLED !== undefined) {
// Firebase calls it "password" provider; env uses "EMAIL" for clarity
authProviderOverrides.password = AUTH_EMAIL_ENABLED !== 'false';
}
if (Object.keys(authProviderOverrides).length > 0) {