Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 3a1c17b

Browse files
author
bhasher
committed
Report issue bugfix and autonomous
1 parent 2d93ea7 commit 3a1c17b

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

src/publics/css/base.less

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@background-color: #222;
66
@color: #fff;
77
@font: sans-serif;
8+
@absolute-color: #d5e6ed;
89

910
*{
1011
margin: 0;
@@ -154,7 +155,7 @@ div#welcome{
154155
-webkit-transform: translate(-50%, -50%);
155156
transform: translate(-50%, -50%);
156157
color: #111111;
157-
background-color: #d5e6ed;
158+
background-color: @absolute-color;
158159
margin: 0 auto;
159160
padding: 1em;
160161
border-radius: 20px;
@@ -185,6 +186,20 @@ div#welcome{
185186
input[type=submit]{
186187
float: right;
187188
}
189+
190+
span{
191+
float: left;
192+
}
193+
194+
input[type=submit],
195+
span{
196+
background-color: darken(@absolute-color, 10%);
197+
border: 1px solid darken(@absolute-color, 20%);
198+
border-radius: 5px;
199+
padding: 5px 10px;
200+
size: 50px;
201+
cursor: pointer;
202+
}
188203
}
189204

190205
.blur-background > *:not(#body):not(#report-issue) {

src/publics/js/dev/page/base.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ new Welcome(_.id('welcome-button'));
1515

1616
document.getElementById('link-welcome').onclick = Welcome.show;
1717

18-
document.getElementById('link-report').onclick = () => {
19-
document.getElementById('report-issue').style.display = "block";
20-
document.getElementById('main').classList.add("blur-background");
21-
};
22-
23-
document.getElementById('reported').addEventListener('click', e => {
24-
document.getElementById('report-issue').style.display = "none";
25-
document.getElementById('main').classList.remove("blur-background");
26-
});
27-
28-
29-
3018
/*
3119
let token =
3220
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmb28iOiJiYXIiLCJleHAiOjEzOTMyODY4OTMsImlhdCI6MTM5MzI2ODg5M30.4-iaDojEVl0pJQMjrbM1EzUIfAZgsbK_kgnVyVxFSVo";

src/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ router.post('/report-issue', async (req, res) => {
6464
try{
6565
const report = req.body.report;
6666
const agree = Boolean(req.body.agree);
67-
hook.warn('Report', `***Share data:*** ${agree}\n***Report:***\n${report}`);
67+
hook.info('Report', `***Share data:*** ${agree}\n***Report:***\n${report}`);
6868
} catch (err) {
6969
console.log(err);
7070
throw new Error(err);

src/views/component/footer.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
<a href="#" id="link-welcome">Welcome&#8239message</a>
77
<a href="https://github.com/allEyezOnCode/CodeWe">Github</a>
88
<a href="#">Support</a>
9-
<a href="#report" id="link-report">Report&#8239issue</a>
9+
<a href="#report" id="link-report" onclick="l()">Report&#8239issue</a>
1010
</div>
1111
Copyright © 2020 Dewilde Alexandre, Dubois Brieuc and Fischer Nicolas
1212
</div>
13+
<script type="application/javascript">
14+
const l=()=>{document.getElementById('report-issue').style.display="block";document.getElementById('main').classList.add("blur-background");};
15+
</script>

src/views/component/report-issue.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ <h3>Which problem do you want to report ?</h3>
66
<p>
77
<input type="checkbox" checked name="agree"/><label>I agree to anonymously share certain browser-related information with the development team.</label>
88
</p>
9-
<input type="submit" id="reported" value="Send" />
9+
<span onclick="k()">Cancel</span>
10+
<input type="submit" id="reported" value="Send" onclick="k()"/>
1011
</p>
1112
</form>
1213
</div>
14+
<script type="application/javascript">const k=()=>{document.getElementById('report-issue').style.display="none";document.getElementById('main').classList.remove("blur-background");};</script>

0 commit comments

Comments
 (0)