-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
50 lines (50 loc) · 1.89 KB
/
main.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>5-Amigos</title>
<link rel="stylesheet" href="main.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://www.gstatic.com/firebasejs/5.9.3/firebase.js"></script>
</head>
<body>
<div class="home-page">
<div class="header">
<div>
<i class="material-icons" id="add" style="font-size:36px">person_add</i>
</div>
<h1>5 Amigos</h1>
<form class="login-form" >
<input type="text" placeholder="Email" id= "email" name="uLogin"/>
<input type="password" placeholder="Password" id="password" name="pLogin"/>
<button type="button" id="login" >login</button>
</form>
</div>
</div>
<script>
require('./authentication.js');
document.getElementById('login').addEventListener('click',()=>{
firebase.auth().signInWithEmailAndPassword(document.getElementById('email').value,document.getElementById('password').value).then(()=>{
document.location.href = 'index.html';
}).catch((error)=>{
if(error!=null)
{
alert("Wrong Email or Password !!!");
console.log(error.message);
return;
}
})
})
document.getElementById('add').addEventListener('click',()=>{
let win1 = new remote.BrowserWindow({
parent: remote.getCurrentWindow(),
modal: true
})
win1.loadFile('adduser.html');
})
const { remote } = require('electron');
</script>
</body>
</html>