-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.html
178 lines (165 loc) · 5.47 KB
/
account.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Account</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/Logo.png">
<!-- the three things that jQuery Mobile needs to work -->
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="QR-code/QRCodeReader.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<!-- <script src="./qr.js"></script> -->
<script src="https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"></script>
</head>
<body>
<div class="account-container">
<div class="header">
<span class="material-icons back-icon"> navigate_before </span>
<div class="Logo"> <img src="images/Logo.png"> </div>
</div>
<div class="heading">
<h1>ACCOUNT</h1>
<h2>Your Account Information</h2>
</div>
<div class="avatar">
<div class="avatar-image">
<img src="images/avatar.png" alt="avatar">
</div>
<div class="avatar-info">
<p class="user-name">David Spade</p>
<p class="user-email">[email protected]</p>
</div>
<a href="QR-code/QRCode.html" data-ajax="false">
<div class="qr-code">
<img src="images/qr.png"alt="qr-code">
</div>
</a>
</div>
<!-- <div class="account-body">-->
<a href="favourites.html" data-ajax="false">
<div class="favourites-list">
<div class="favourites-list-icon account-property-icon">
<img src="images/favouriteList.png" alt="favourite-list">
</div>
<div class="favourites-list-text account-property-text">
<p>Favourite List</p>
</div>
<div class="favourites-list-arrow account-property-arrow">
<span class="material-icons">chevron_right</span>
</div>
</div>
</a>
<a href="OrderHistory/OrderHistory.html" data-ajax="false">
<div class="order-history">
<div class="order-history-icon account-property-icon">
<img src="images/orderList.png" alt="order-history">
</div>
<div class="order-history-text account-property-text">
<p>Order History</p>
</div>
<div class="order-history-arrow account-property-arrow">
<span class="material-icons">chevron_right</span>
</div>
</div>
</a>
<a href="#popupVideo" data-rel="popup"
data-position-to="window" id="openScan">
<div class="share-credit">
<div class="share-credit-icon account-property-icon">
<img src="images/shareCredit.png" alt="share-credit">
</div>
<div class="share-credit-text account-property-text">
<p>Share Credit</p>
</div>
<div class="share-credit-arrow account-property-arrow">
<span class="material-icons">chevron_right</span>
</div>
</div>
</a>
<a href="About/About.html" data-ajax="false">
<div class="about">
<div class="about-icon account-property-icon">
<img src="images/about.png" alt="about">
</div>
<div class="about-text account-property-text">
<p>About</p>
</div>
<div class="about-arrow account-property-arrow">
<span class="material-icons">chevron_right</span>
</div>
</div>
</a>
<div class="logout" id="logout">
<div class="logout-icon account-property-icon">
<img src="images/logout.png" alt="logout">
</div>
<div class="logout-text account-property-text">
<p>Logout</p>
</div>
<div class="logout-arrow account-property-arrow">
<span class="material-icons">chevron_right</span>
</div>
</div>
<div data-role="popup" id="popupVideo" data-theme="a" class="ui-corner-all">
<a href="#" data-rel="back"
class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<div class="popup-heading">
<h2>QR Scan</h2>
</div>
<div class="video-wrap">
<video id="video" playsinline autoplay></video>
</div>
</div>
<div id="qr-toast">
<p data-role="none" id="success-message"></p>
</div>
<!-- </div>-->
<!-- <div class="footer"></div>-->
<div class="navigation">
<img src="images/home.png" id="home-icon"/>
<img src="images/cart.png" id="cart-icon"/>
<img src="images/offer.png" id="promo-icon"/>
<img src="images/rubic.png" id="game-icon"/>
<div class="nav-active">
<img class="nav-account-icon" id="user-icon" src="images/user-white.png" />
<span class="nav-account-text">Account</span>
</div>
</div>
</div>
<script type="text/javascript" src="js/accountscript.js" ></script>
<script type="text/javascript" src="js/navigation.js" ></script>
<script>
$("#openScan").click(function(){
let scanner = new Instascan.Scanner({ video: document.getElementById('video') });
scanner.addListener('scan', function (content) {
var message = "Successfully transferred 100 points to "+content;
$("#popupVideo").css("display","none");
showSuccessToast(message);
});
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
} else {
console.error('No cameras found.');
}
}).catch(function (e) {
console.error(e);
});
})
function showSuccessToast(message) {
console.log(message);
var x = document.getElementById("qr-toast");
$("#success-message").text(message);
x.className = "show";
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}
</script>
</body>
</html>