-
Notifications
You must be signed in to change notification settings - Fork 0
/
renderersettings.js
42 lines (26 loc) · 1.05 KB
/
renderersettings.js
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
window.addEventListener('DOMContentLoaded', () => {
const view1Button = document.getElementById('showmainmenu');
const view2Button = document.getElementById('showsettingsmenu');
window.materialapi.configrequest()
window.refreshapi.configrequest((event, config) => {
networkcard.value = config.networkcard;
apivalue.value = config.apiKey;
});
view1Button.addEventListener('click', () => {
window.appapi.showview('mainwiew');
});
view2Button.addEventListener('click', () => {
window.appapi.showview('settingswiew');
});
const networkcard = document.getElementById('networkcardvalue');
const apivalue = document.getElementById('apikeyvalue');
const saveConfig = document.getElementById('saveConfig');
saveConfig.addEventListener('click', () => {
window.appapi.logreport('Clic sur le bouton de sauvegarde !');
const newConfig = {
networkcard: document.getElementById('networkcardvalue').value,
apiKey: document.getElementById('apikeyvalue').value
};
window.materialapi.setconfig(newConfig);
});
});