Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
amethystnetwork-dev
GitHub Repository: amethystnetwork-dev/Incognito
Path: blob/main/static/script/support.js
917 views
1
/**
2
* Incognito
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16
*/
17
18
/*
19
_____ _ _ _
20
| __ \ | | | | | |
21
| |__) | ___ _ __ | |_ ___ __| | | |__ _ _
22
| ___/ / _ \ | '__| | __| / _ \ / _` | | '_ \ | | | |
23
| | | (_) | | | | |_ | __/ | (_| | | |_) | | |_| |
24
|_| \___/ |_| \__| \___| \__,_| |_.__/ \__, |
25
__/ |
26
|___/
27
_ _ _ _ _ _ _
28
/\ | | | | | | | \ | | | | | |
29
/ \ _ __ ___ ___ | |_ | |__ _ _ ___ | |_ | \| | ___ | |_ __ __ ___ _ __ | | __
30
/ /\ \ | '_ ` _ \ / _ \ | __| | '_ \ | | | | / __| | __| | . ` | / _ \ | __| \ \ /\ / / / _ \ | '__| | |/ /
31
/ ____ \ | | | | | | | __/ | |_ | | | | | |_| | \__ \ | |_ | |\ | | __/ | |_ \ V V / | (_) | | | | <
32
/_/ \_\ |_| |_| |_| \___| \__| |_| |_| \__, | |___/ \__| |_| \_| \___| \__| \_/\_/ \___/ |_| |_|\_\
33
__/ |
34
|___/
35
*/
36
async function support(app) {
37
app.search.title.style.display = 'block';
38
app.search.title.textContent = 'Support';
39
app.search.input.style.display = 'none';
40
app.main.support = app.createElement(
41
'div',
42
await getData(app));
43
app.search.back.style.display = 'inline';
44
app.search.back.href = '#';
45
};
46
47
async function getData(app) {
48
const res = await fetch('./support.json');
49
const json = await res.json();
50
51
const entries = [];
52
53
for (const entry of json) {
54
entries.push(
55
app.createElement('section', [
56
app.createElement('span', entry.question, {
57
style: {
58
display: 'block',
59
'margin-bottom': '6px',
60
'font-size': '18px',
61
'font-weight': '500'
62
}
63
}),
64
app.createElement('p', entry.answer, {
65
style: {
66
'margin-bottom': '0'
67
}
68
})
69
], {
70
class: 'data-section'
71
})
72
)
73
};
74
return entries;
75
};
76
77
export { support };
78