-
Notifications
You must be signed in to change notification settings - Fork 0
/
report-a-problem.html
281 lines (272 loc) · 14.4 KB
/
report-a-problem.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<html lang="en">
<head>
<link rel="icon" href="resources/icons/favicon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles/report-a-problem.css" />
<link rel="stylesheet" href="styles/menu.css" />
<link rel="stylesheet" href="styles/footer.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<title>Report A Problem - Timed</title>
<script src="reload.js"></script>
<script src="resources/productPage/productDetails.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-functions.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
</head>
<body>
<div id="bigdiv">
<div id="THEDIV">
<div id="TimedShopMainLogo">
<a href="./index.html"><img src="resources/icons/timedShopMainLogo.svg" alt="TIMED SHOP" /></a>
</div>
<div id="clockLogo">
<a href="./index.html"><img src="/resources/icons/clockLogo.svg" alt="TIMED SHOP"/></a>
</div>
<div id="menu">
<div id="row">
<a href="account.html" id="account" class="icons">
<img
alt="ACCOUNT"
src="/resources/icons/userPurple.svg"
onmouseover="this.src='resources/icons/userPurple.svg'"
onmouseout="this.src='resources/icons/user.svg'"
/>
</a>
<a href="favorites.html" id="favorites" class="icons">
<img
class="icon-badge-icon-favorites"
id="favoritesIMG"
alt="FAVORITES"
src="/resources/icons/favorites.svg"
onmouseover="this.src='resources/icons/favoritesPurple.svg'"
onmouseout="this.src='resources/icons/favorites.svg'"
/>
<div id="favoritesCount" class="icon-badge-favorites">6</div>
</a>
<a href="cart.html" id="cart" class="icon-badge-container" class="icons">
<img
class="icon-badge-icon"
alt="CART"
src="/resources/icons/cart.svg"
onmouseover="this.src='resources/icons/cartPurple.svg'"
onmouseout="this.src='resources/icons/cart.svg'"
/>
<div id="cartCount" class="icon-badge">6</div>
</a>
<a href="javascript:void(0);" id="expandMenu" class="icon" onclick="expandMenu()">
<img src="/resources/icons/expandMenu.svg">
</a>
</div>
<nav class="navMenu" id="navMenu">
<a href="sale.html?c=men&type=">SALE</a>
<a href="women.html?sortBy=newArrival&type=" id="women">WOMEN</a>
<a href="men.html">MEN</a>
<a>ABOUT</a>
<a href="register.html" id="register">REGISTER</a>
<a href="login.html" id="LogIn">LOG IN</a>
</nav>
</div>
<div id="mainDiv">
<div id="reportDiv">
<a id="reportTitle">REPORT A PROBLEM</a>
<a id="reportDescriptionTitle">If you need a response to your problem, please go to SUPPORT and send us an email.</a>
<a id="title">Title</a>
<div id="titleInputDiv">
<input id="titleInput" type="text" maxlength="200" placeholder="Compact description of your problem"></input>
</div>
<a id="titleError"></a>
<a id="descriptionTitle">Description</a>
<div id="descriptionInputDiv">
<textarea id="descriptionInput" type="text" maxlength="2000" placeholder="Describe your problem as good as you can. Please include every detail"></textarea>
</div>
<a id="descriptionError"></a>
<button id="sendButton" onclick="submitPress()">SUBMIT</button>
</div>
<div id="success">
<a id="successTitle">Problem sent successfully!</a>
<img id="successIcon" src="/resources/icons/success.svg">
<a id="successDescription">Thank you for reporting the problem. It's very helpful for us!</a>
<a id="backHomeButton" href="/sale.html">LEAVE THIS PAGE</a>
<a id="reportAnotherProblem" href="/report-a-problem.html">Report another problem</a>
</div>
<div id="error">
<a id="errorTitle">Something went wrong...</a>
<img id="successIcon" src="/resources/icons/error.svg">
<a id="errorDescription">Please try again or contact our support team at support@timedshop.com</a>
<a id="tryAgainButton" href="/report-a-problem.html">TRY AGAIN</a>
</div>
</div>
<div id="footer">
<div id="followUsDiv">
<a id="followUsText"> FOLLOW US </a>
<div id="iconsDiv">
<div id="iconsDivTop">
<a id="instagram" href="https://www.instagram.com">
<img
src="resources/icons/socials/instagram.svg"
alt="instagram"
/>
</a>
<a id="tiktok">
<img
src="resources/icons/socials/tiktok.svg"
alt="tiktok"
/>
</a>
</div>
<div id="iconsDivBottom">
<a id="twitter">
<img
src="resources/icons/socials/twitter.svg"
alt="twitter"
/>
</a>
<a id="facebook">
<img
src="resources/icons/socials/facebook.svg"
alt="facebook"
/>
</a>
</div>
</div>
</div>
<div id="helpAndInfoDiv">
<a id="helpAndInfoText"> HELP AND INFORMATION </a>
<div id="HILinks">
<a class="alink">Help</a>
<a class="alink">Privacy Policy</a>
<a class="alink">Terms & Conditions</a>
<a class="alink">Delivery</a>
<a class="alink">Return</a>
<a class="alink">FAQ</a>
</div>
</div>
<div id="timedShopDiv" class="c">
<a id="timedShopText">TIMED SHOP</a>
<div id="timedShopLinks">
<a class="alink">About</a>
<a class="alink">Contact</a>
</div>
</div>
</div>
</div>
<div id="loading">
<div class="wrapper">
<svg class="hourglass" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 206" preserveAspectRatio="none">
<path class="middle" d="M120 0H0v206h120V0zM77.1 133.2C87.5 140.9 92 145 92 152.6V178H28v-25.4c0-7.6 4.5-11.7 14.9-19.4 6-4.5 13-9.6 17.1-17 4.1 7.4 11.1 12.6 17.1 17zM60 89.7c-4.1-7.3-11.1-12.5-17.1-17C32.5 65.1 28 61 28 53.4V28h64v25.4c0 7.6-4.5 11.7-14.9 19.4-6 4.4-13 9.6-17.1 16.9z"/>
<path class="outer" d="M93.7 95.3c10.5-7.7 26.3-19.4 26.3-41.9V0H0v53.4c0 22.5 15.8 34.2 26.3 41.9 3 2.2 7.9 5.8 9 7.7-1.1 1.9-6 5.5-9 7.7C15.8 118.4 0 130.1 0 152.6V206h120v-53.4c0-22.5-15.8-34.2-26.3-41.9-3-2.2-7.9-5.8-9-7.7 1.1-2 6-5.5 9-7.7zM70.6 103c0 18 35.4 21.8 35.4 49.6V192H14v-39.4c0-27.9 35.4-31.6 35.4-49.6S14 81.2 14 53.4V14h92v39.4C106 81.2 70.6 85 70.6 103z"/>
</svg>
</div>
</div>
</div>
<script>
function loader(loaded)
{
if(loaded)
{
setTimeout(()=>{
document.getElementById("loading").style.display = "none";
document.getElementById("THEDIV").style.display = "block";
}, 1000);
}
else
{
setTimeout(()=>{
document.getElementById("THEDIV").style.display = "none";
document.getElementById("loading").style.display = "flex";
}, 1000);
}
}
loader(false);
</script>
<script>
// Initialize Firebase
// TODO: Replace with your project's customized code snippet
var config = {
apiKey: "AIzaSyCkBvDNzSvorpEdz2twDAVI09x-FaVsDGg",
authDomain: "timedshop-a5a66.firebaseapp.com",
projectId: "timedshop-a5a66",
storageBucket: "timedshop-a5a66.appspot.com",
messagingSenderId: "172835576987",
appId: "1:172835576987:web:2e588ca7a77cc008affa3e",
measurementId: "G-3VCHXLRX5K",
};
firebase.initializeApp(config);
const db = firebase.firestore();
let cartCount = document.getElementById("cartCount");
var signOutPressed = false;
var w = window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth;
firebase.auth().onAuthStateChanged((user) => {
if (user) {
var uid = user.uid;
console.log("logged in user: ", user.email);
document.getElementById("LogIn").setAttribute("style","display: none !important")
document.getElementById("register").setAttribute("style","display: none !important")
document.getElementById("account").style.display = "flex";
if(w > 768 && w <= 1024)
{
document.getElementById("navMenu").setAttribute("style", "width:50vw !important");
}
document.getElementById("favorites").style.display = "inline";
db.collection("users")
.doc(uid)
.get()
.then((data) => {
if(data.data().cart)
{
cartCount.innerText = data.data().cart.length;
}
else
{
cartCount.innerText = 0;
}
if(data.data().favorites)
{
favoritesCount.innerText = data.data().favorites.length;
}
else
{
favoritesCount.innerText = 0;
}
loader(true);
})
} else {
document.getElementById("account").setAttribute("style","display: none !important")
document.getElementById("favorites").setAttribute("style","display: none !important")
document.getElementById("LogIn").style.display = "flex";
console.log(w);
if(w > 768)
{
document.getElementById("row").setAttribute("style","margin-left: 0 !important; width: 10% !important");
}
document.getElementById("register").style.display = "flex";
if(localStorage.getItem("cartCount"))
{
document.getElementById("cartCount").innerText = localStorage.getItem("cartCount");
}
else
{
document.getElementById("cartCount").innerText = "0";
}
loader(true);
}
});
function expandMenu() {
console.log('coco')
var x = document.getElementById("navMenu");
if (x.className === "navMenu") {
x.className += " responsive";
} else {
x.className = "navMenu";
}
}
</script>
<script src="resources/report-a-problem/report-a-problem.js"></script>
</body>
</html>