سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 03:00 UTC
fix(login): prevent inert Google and OTP clicks before handlers initialize
davoodmehraban89 committed
Oct 12, 2026 at 19:38 UTC
f17f310e17039018a9c19158a419847c2e6adea0
1 file changed
+8
-8
index.html
+8
-8
@@ -228,32 +228,32 @@ body{background:#f6f9fc}
228
<div><h1>نرمافزار ERP سازمانی فینورا</h1><p>ورود یا ثبتنام امن در محیط سازمانی</p></div>
229
</div>
230
<div id="auth-form-container">
231
- <button class="btn auth-google" onclick="signInWithGoogle()"><span class="auth-google-mark">G</span><span>ادامه با Google</span></button>
231
+ <button disabled class="btn auth-google" onclick="signInWithGoogle()"><span class="auth-google-mark">G</span><span>ادامه با Google</span></button>
232
<div class="auth-divider">یا با ایمیل</div>
233
<div class="form-group"><label>ایمیل</label><input type="email" id="auth-email" class="form-control" placeholder="name@example.com" autocomplete="email" autocapitalize="none" dir="ltr" /></div>
234
<div class="form-group"><label>رمز عبور</label><input type="password" id="auth-password" class="form-control" placeholder="رمز عبور" autocomplete="current-password" dir="ltr" /></div>
235
<div class="auth-actions">
236
<button id="auth-login-button" class="btn btn-primary" onclick="handleLogin()" disabled>ورود با رمز</button>
237
- <button class="btn btn-secondary" onclick="startEmailOtp(false,false)">ورود با کد ایمیل</button>
237
+ <button disabled class="btn btn-secondary" onclick="startEmailOtp(false,false)">ورود با کد ایمیل</button>
238
</div>
239
<p id="auth-login-status" role="status" aria-live="polite" data-state="loading" style="font-size:12px;line-height:1.9;margin-top:8px;min-height:24px;color:#475569">در حال آمادهسازی فرم ورود...</p>
240
- <button type="button" id="auth-connectivity-check" class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="checkAuthConnectivity()">بررسی اتصال به سرور ورود</button>
240
+ <button disabled type="button" id="auth-connectivity-check" class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="checkAuthConnectivity()">بررسی اتصال به سرور ورود</button>
241
<p id="auth-connectivity-result" aria-live="polite" style="font-size:12px;line-height:1.9;margin-top:8px;overflow-wrap:anywhere"></p>
242
- <button class="btn auth-signup" onclick="startEmailOtp(false,true)">ثبتنام با کد ایمیل</button>
242
+ <button disabled class="btn auth-signup" onclick="startEmailOtp(false,true)">ثبتنام با کد ایمیل</button>
243
<p class="auth-note">ورود با کد ایمیل برای حساب موجود است. ایجاد حساب جدید فقط از مسیر «ثبتنام با کد ایمیل» انجام میشود.</p>
244
</div>
245
<div id="auth-otp-container" style="display:none">
246
<p style="font-size:13px;line-height:1.9;margin-bottom:12px">کد یکبارمصرف به <strong dir="ltr" id="auth-otp-email-label"></strong> ارسال شد. پوشهی هرزنامه را هم ببینید.</p>
247
<div class="form-group"><label>کد تأیید</label><input type="text" id="auth-otp" class="form-control" inputmode="numeric" autocomplete="one-time-code" placeholder="------" dir="ltr" /></div>
248
- <div class="auth-actions"><button class="btn btn-primary" onclick="verifyEmailOtp()">تأیید کد</button><button class="btn btn-secondary" onclick="startEmailOtp(true)">ارسال دوباره</button></div>
249
- <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="backToAuthMain()">بازگشت</button>
248
+ <div class="auth-actions"><button disabled class="btn btn-primary" onclick="verifyEmailOtp()">تأیید کد</button><button disabled class="btn btn-secondary" onclick="startEmailOtp(true)">ارسال دوباره</button></div>
249
+ <button disabled class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="backToAuthMain()">بازگشت</button>
250
</div>
251
<div id="auth-setpass-container" style="display:none">
252
<p style="font-size:13px;line-height:1.9;margin-bottom:12px">ایمیل شما تأیید شد. برای ورودهای بعدی میتوانید یک رمز عبور تعیین کنید.</p>
253
<div class="form-group"><label>رمز عبور جدید</label><input type="password" id="auth-newpass" class="form-control" placeholder="حداقل ۸ کاراکتر" autocomplete="new-password" dir="ltr" /></div>
254
<div class="form-group"><label>تکرار رمز عبور</label><input type="password" id="auth-newpass2" class="form-control" placeholder="تکرار رمز" autocomplete="new-password" dir="ltr" /></div>
255
- <button class="btn btn-primary" style="width:100%;margin-top:16px" onclick="saveNewPassword()">ذخیره رمز و ورود</button>
256
- <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="skipSetPassword()">فعلاً بدون رمز ادامه بده</button>
255
+ <button disabled class="btn btn-primary" style="width:100%;margin-top:16px" onclick="saveNewPassword()">ذخیره رمز و ورود</button>
256
+ <button disabled class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="skipSetPassword()">فعلاً بدون رمز ادامه بده</button>
257
</div>
258
</div>
259
<aside class="auth-visual" aria-label="معرفی فینورا">