mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-14 22:16:54 +00:00
Added the channel selection menu
This commit is contained in:
+2
-1
@@ -2,4 +2,5 @@ config.json
|
|||||||
.env
|
.env
|
||||||
node_modules
|
node_modules
|
||||||
index - old.html
|
index - old.html
|
||||||
makefile
|
makefile
|
||||||
|
temp.html
|
||||||
+32
-5
@@ -133,6 +133,12 @@
|
|||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-select {
|
||||||
|
width: 200px;
|
||||||
|
background-color:rgb(187, 183, 183);
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
@@ -246,8 +252,22 @@
|
|||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
xhr.setRequestHeader('serverNumber', serverSettings.Id);
|
xhr.setRequestHeader('serverNumber', serverSettings.Id);
|
||||||
xhr.onloadend = (e) => {
|
xhr.onloadend = (e) => {
|
||||||
window.localStorage.setItem('channels', (xhr.response));
|
//Channel Section
|
||||||
document.getElementById('body').classList.replace('hide', 'show');
|
const channels = JSON.parse(xhr.response);
|
||||||
|
// console.log(channels.text);
|
||||||
|
// window.localStorage.setItem('channels', (xhr.response));
|
||||||
|
|
||||||
|
for (let i = 0; i < channels.text.length; i ++) {
|
||||||
|
var channel = channels.text[i];
|
||||||
|
if (channel.name && channel.id) {
|
||||||
|
var opt = document.createElement('option');
|
||||||
|
opt.value = channel.id;
|
||||||
|
opt.innerHTML = channel.name;
|
||||||
|
document.getElementById('logchanneldropdown').appendChild(opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// document.getElementById('body').classList.replace('hide', 'show');
|
||||||
|
|
||||||
//Welcome section
|
//Welcome section
|
||||||
let wc = serverSettings.WELCOME.welcomechannel || '';
|
let wc = serverSettings.WELCOME.welcomechannel || '';
|
||||||
@@ -306,6 +326,10 @@
|
|||||||
function sendData(event, inp) {
|
function sendData(event, inp) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
var values=Array.from($(".logchanneldropdown").find(':selected')).map(function(item){
|
||||||
|
return $(item).text();
|
||||||
|
});
|
||||||
|
|
||||||
//Change saving status
|
//Change saving status
|
||||||
var b = document.getElementById('savstat');
|
var b = document.getElementById('savstat');
|
||||||
b.classList.replace('saved', 'saving');
|
b.classList.replace('saved', 'saving');
|
||||||
@@ -322,7 +346,7 @@
|
|||||||
|
|
||||||
const sevlist = ['none', 'low', 'meduim', 'high']
|
const sevlist = ['none', 'low', 'meduim', 'high']
|
||||||
serverSettings.LOG.severity = sevlist.indexOf(sevname);
|
serverSettings.LOG.severity = sevlist.indexOf(sevname);
|
||||||
serverSettings.LOG.logchannel = document.getElementById('lc').value || null;
|
serverSettings.LOG.logchannel = document.getElementById('logchanneldropdown').value || null;
|
||||||
|
|
||||||
let kl = false;
|
let kl = false;
|
||||||
if (document.getElementById('kl').checked) {
|
if (document.getElementById('kl').checked) {
|
||||||
@@ -430,8 +454,11 @@
|
|||||||
<label for="kl">Keep Logs?</label>
|
<label for="kl">Keep Logs?</label>
|
||||||
<input type="checkbox" id="kl" name="kl"><br><br>
|
<input type="checkbox" id="kl" name="kl"><br><br>
|
||||||
|
|
||||||
<label for="lc">Logging Channel Name:</label>
|
<!-- <label for="lc">Logging Channel Name:</label>
|
||||||
<input type="text" id="lc" name="lc"><br><br>
|
<input type="text" id="lc" name="lc"><br><br> -->
|
||||||
|
<select id="logchanneldropdown" class="form-select mb-5" aria-label="Default select example">
|
||||||
|
<option selected=""></option>
|
||||||
|
</select>
|
||||||
|
|
||||||
<div id="sevradio">
|
<div id="sevradio">
|
||||||
<p style="margin-bottom: 0px; text-underline-offset: 2px;"><u>Log Severity</u></p>
|
<p style="margin-bottom: 0px; text-underline-offset: 2px;"><u>Log Severity</u></p>
|
||||||
|
|||||||
+2
-2
@@ -318,12 +318,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- NAVBAR END -->
|
<!-- NAVBAR END -->
|
||||||
|
|
||||||
<!-- Header Begin -->
|
<!-- Header Begin -->
|
||||||
<!-- https://livewire.thewire.in/wp-content/uploads/2018/09/ekg-line-ekg-monitor-ekg-machine-heart-health-blue-ecg-monitor-shows-the-heart-beat-the-heart-stops-for-three-seconds-and-starts-again_nelyjny6x__F0000.png -->
|
<!-- https://livewire.thewire.in/wp-content/uploads/2018/09/ekg-line-ekg-monitor-ekg-machine-heart-health-blue-ecg-monitor-shows-the-heart-beat-the-heart-stops-for-three-seconds-and-starts-again_nelyjny6x__F0000.png -->
|
||||||
<div class="row w-100 h-100" style="background-image: url('https://www.pgsindia.co.in/wp-content/uploads/2016/01/animated-web-design-slideshow-background.gif'); background-size: cover; background-repeat: no-repeat;">
|
<div class="row w-100 h-100" style="background-image: url('https://github.com/ION606/selmer-bot-website/blob/main/assets/Header%20BK.gif?raw=true'); background-size: cover; background-repeat: no-repeat;">
|
||||||
<div class="row w-100" style="color: rgb(10, 169, 243); text-align: center">
|
<div class="row w-100" style="color: rgb(10, 169, 243); text-align: center">
|
||||||
<h1 style="margin-top: 100px; -webkit-text-stroke: 2px rgb(255, 255, 255);">WELCOME TO THE SELMER BOT DASHBOARD</h1>
|
<h1 style="margin-top: 100px; -webkit-text-stroke: 2px rgb(255, 255, 255);">WELCOME TO THE SELMER BOT DASHBOARD</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user