Version 2.1.4 - Modification de l'ajout des Nodes
All checks were successful
Subsonics - Web/pipeline/head This commit looks good

This commit is contained in:
Raphael 2024-11-17 18:23:40 +01:00
parent 08f50f71a8
commit 925efc662d
7 changed files with 27 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "subsonics-web",
"version": "2.1.1",
"version": "2.1.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "subsonics-web",
"version": "2.1.1",
"version": "2.1.3",
"dependencies": {
"cookie": "^0.5.0",
"cookie-parser": "^1.4.6",

View File

@ -1,7 +1,7 @@
{
"name": "subsonics-web",
"author": "Raphix",
"version": "2.1.3",
"version": "2.1.4",
"nodemonConfig": {
"ext": "js, html",
"ignore": [

View File

@ -32,7 +32,6 @@ function setup() {
// Config GETTER
function getConfig(dlog) {
dlog.step.init("getConfig", "Récupération du fichier de configuration")
@ -42,6 +41,7 @@ function getConfig(dlog) {
var config_data = JSON.parse(fs.readFileSync(__glob.CONFIG))
dlog.log("Fichier de configuration trouvé : " + __glob.CONFIG)
dlog.step.end("getConfig")

View File

@ -1,4 +1,3 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const { __glob } = require("../modules/global-variables");
const { LogType } = require('loguix');
const discord = require("./discord-bot")

View File

@ -14,7 +14,6 @@ const { Server } = require("socket.io")
var fs = require("fs")
var path = require("path")
const { Metric } = require("webmetrik");
const { type } = require("os");
const markdownit = require("markdown-it")({
html: true,
linkify: true,

View File

@ -201,14 +201,19 @@ function loadNodesView() {
<input placeholder='Host' type='text' id="node-host" class="report-type">
<input placeholder='Port' type='number' id="node-port" class="report-type">
<input value="2333" placeholder='Port' type='number' id="node-port" class="report-type">
<input placeholder='Mot de passe' type='text' id="node-password" class="report-type">
<br>
<input value="youshallnotpass" placeholder='Mot de passe' type='text' id="node-password" class="report-type">
<div style="display: flex; align-items: center;">
<input type='checkbox' id="node-secure">
<p style='font-size: 15px;'>Connexion SSL</p>
</div>
<button id="node-send-confirm" class="report-send">Ajouter</button>
</div>
`)
modal.show()
const nodeHost = getID("node-host")
@ -216,6 +221,21 @@ function loadNodesView() {
const nodePassword = getID("node-password")
const nodeSendConfirm = getID("node-send-confirm")
const nodeContent = getID("node-content")
const nodeSecure = getID("node-secure")
nodeSecure.addEventListener("change", () => {
if(nodeSecure.checked) {
nodePort.value = 443
nodePort.disabled = true
nodePort.style.backgroundColor = "#333"
nodePort.style.color = "#717171"
} else {
nodePort.value = 2333
nodePort.disabled = false
nodePort.style.backgroundColor = "#545454"
nodePort.style.color = "white"
}
})
nodeSendConfirm.addEventListener("click", () => {
nodeContent.innerHTML = "<p><i class='fa fa-spinner fa-spin'></i> Ajout du serveur ...</p>"