forked from yashwanths814/nammayatri
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
52 lines (44 loc) · 1.62 KB
/
script.js
File metadata and controls
52 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const loginForm = document.querySelector('.login-form');
const signupForm = document.querySelector('.signup-form');
function showSignup() {
loginForm.classList.add('slide-left');
signupForm.classList.remove('slide-right');
}
function showLogin() {
loginForm.classList.remove('slide-left');
signupForm.classList.add('slide-right');
}
function sendLoginOTP() {
const phone = document.getElementById('loginPhone').value;
// Simulate sending OTP via email
alert(`Simulating sending login OTP to email associated with phone number: ${phone}`);
// Add actual backend integration here
}
function verifyLoginOTP() {
const otp = document.getElementById('loginOTP').value;
// Simulate verifying OTP
alert(`Simulating verifying login OTP: ${otp}`);
// Add actual backend verification and login logic here
}
function sendSignupOTP() {
const phone = document.getElementById('signupPhone').value;
// Simulate sending OTP via email
alert(`Simulating sending signup OTP to email associated with phone number: ${phone}`);
// Add actual backend integration here
}
function verifySignupOTP() {
const otp = document.getElementById('signupOTP').value;
// Simulate verifying OTP
alert(`Simulating verifying signup OTP: ${otp}`);
// Add actual backend verification and signup logic here
}
function googleSignIn() {
// Simulate Google Sign-In
alert('Simulating Google Sign-In for login');
// Add actual Google Sign-In integration here
}
function googleSignUp() {
// Simulate Google Sign-Up
alert('Simulating Google Sign-Up');
// Add actual Google Sign-Up integration here
}