forked from nickredmark/ooth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (34 loc) · 1.45 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<script src="vue/vue.js"></script>
</head>
<body>
<div id="app">
<h1>Minimal Ooth Example</h1>
<template v-if="user">
<p>Hello, {{ user._id }}</p>
<button v-on:click="logout($event)">Log out</button>
</template>
<template v-else>
<div>
<h2>Register</h2>
<form v-on:submit.prevent="register($event)">
<div><label>E-Mail <input v-model="registerUser.email" id="register-email" type="email"/></label></div>
<div><label>Password <input v-model="registerUser.password" id="register-password" type="password"/></label></div>
<button>Register</button>
</form>
</div>
<div>
<h2>Log in</h2>
<form v-on:submit.prevent="loginWithEmailPassword(loginUser.email, loginUser.password)">
<div><label>E-Mail <input v-model="loginUser.email" id="login-email" type="email"/></label></div>
<div><label>Password <input v-model="loginUser.password" id="login-password" type="password"/></label></div>
<button>Log in</button>
</form>
</div>
</template>
</div>
<script src="app.js"></script>
</body>
</html>