From 93f793bd95c72d1da23a9e75c1f44d2f80d8c89e Mon Sep 17 00:00:00 2001 From: Raphix Date: Sun, 30 Apr 2023 19:00:04 +0200 Subject: [PATCH] 2.0.1 Official Version --- infoupdate.html | 21 ++++-- main.js | 27 ++++++-- package.json | 2 +- templates/app/app.css | 152 +++++++++++++++++++++++++++++++++++++---- templates/app/app.html | 24 ++++++- templates/app/app.js | 72 ++++++++++++++++++- 6 files changed, 268 insertions(+), 30 deletions(-) diff --git a/infoupdate.html b/infoupdate.html index c7c4f9a..656c57e 100644 --- a/infoupdate.html +++ b/infoupdate.html @@ -1,12 +1,25 @@ +

Subsonics 2.1.0

+

Sortie le : 30/04/2022

+

Ajouts & Fixes :

+ +
+ +

Subsonics 2.0.9

Sortie le : 29/04/2022

Ajouts & Fixes :


diff --git a/main.js b/main.js index a1e472c..aac008c 100644 --- a/main.js +++ b/main.js @@ -176,9 +176,6 @@ async function createWindow() { const settings = {} settings["token"] = token - - - fs.writeFile(__dirname + path.sep + "settings.json", JSON.stringify(settings, null, 2), (err) => { log.client("Saving token in settings !") @@ -259,6 +256,13 @@ async function createWindow() { }) + ipc.on("moveQueue", (ev, identifier) => { + const settings = require( __dirname + path.sep + "settings.json") + log.client("Control : Move queue Bot Requsted !") + socket.emit("moveQueue", settings.token, identifier) + + }) + ipc.on("findReq", (ev, value) => { const settings = require( __dirname + path.sep + "settings.json") log.client("Control : Find search Bot Requsted !") @@ -313,6 +317,19 @@ async function createWindow() { }) + ipc.on("report", (ev, report) => { + + const settings = require( __dirname + path.sep + "settings.json") + log.client("Report : Envoi d'un rapport !") + report["version"] = require("./package.json").version + socket.emit("report", settings.token, report) + }) + + socket.on("reportAns", (ans) => { + + win.webContents.send("reportForm", ans) + }) + if (process.defaultApp) { @@ -334,7 +351,7 @@ async function createWindow() { ipc.on("askUpdateState", () => { - askUpdateState() + askUpdateState() }) async function askUpdateState() { @@ -366,7 +383,7 @@ app.on("open-url", (ev, url) => { app.whenReady().then(() => { - const icon = nativeImage.createFromPath('src/logo.ico') + const icon = nativeImage.createFromPath(__dirname + path.sep + 'src' + path.sep + "logo.ico") tray = new Tray(icon) diff --git a/package.json b/package.json index 1790bd2..fc42837 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "subsonics-manager", - "version": "2.0.9", + "version": "2.1.0", "description": "Manager for subsonics", "main": "main.js", "scripts": { diff --git a/templates/app/app.css b/templates/app/app.css index 57ac668..bd52111 100644 --- a/templates/app/app.css +++ b/templates/app/app.css @@ -154,12 +154,38 @@ color: white; } +.bug { + + font-family: 'Open Sans', sans-serif !important; + background-color: transparent; + border: solid; + border-radius: 15px; + padding: 2%; + border-color: rgb(255, 46, 46); + color: white; + transition: all 0.2s ease 0s; +} + +.bug:hover { + + + background-color: rgb(255, 46, 46); + box-shadow: 2px 2px 5px rgb(255, 46, 46); +} + +.bug:active { + + background-color: transparent; + +} + .stLine { display: flex; flex-direction: row; text-align: start; align-items: center; + margin-top: 10px; } .stPct { @@ -388,10 +414,6 @@ input[type=range] { } -#listContent { - - padding: 5%; -} .infoVersion { @@ -467,9 +489,55 @@ input[type=range] { margin: 0; vertical-align: middle; align-items: center; + width: 100%; + padding-left: 5%; + padding-right: 5%; + padding-top: 2%; + padding-bottom: 2%; justify-content: space-between; + transition: 0.2s; + cursor: pointer; + -webkit-user-select: none; + } +.ressong { + display: flex; + flex-direction: row; + margin: 0; + vertical-align: middle; + align-items: center; + justify-content: space-between; + +} + + + +#listDialog { + padding: 0 !important; + padding-bottom: 5% !important; +} + +#listDialog .menuheader { + + padding: 5%; +} + +#listContent { + + padding-top: 5%; + padding-bottom: 5%; +} + + +.song:hover { + + background-color: #2d2d2d ; + +} + + + .titleSong { width: 100%; @@ -506,16 +574,72 @@ input[type=range] { .devversion { - position: absolute; - bottom: 0; - font-size: 10px; - text-align: center; - width: 100%; - background-color: red; - color: white; + height: 10px; + width: 100%; + background-color: red; + color: white; + font-size: 10px; + text-align: center; + position: absolute; + bottom: 0; + transition: 0.5s; + } -.devversion p { - position: relative; - bottom: -6px; +.devversion:hover { + position: absolute; + content: initial; + height: 40px; +} + +.devversion .dp { + + display: none; + +} + +.devversion:hover .dp { + display: initial; + position: absolute; + text-align: center; + bottom: -9px; + right: 25%; +} + + + +.sendChos { + + width: 100%; + margin-bottom: 5px; + margin-top: 5px; + border-color: #1c1c1c; + border-radius: 15px; + border-width: 2px; + background-color: transparent; + color: white; + padding: 2%; +} + +.sendChos option { + + background-color:rgb(61, 61, 61); + +} + +.sendText { + + margin-top: 5px; + width: 100%; + height: 100px; + padding: 5%; + border-radius: 5px; + margin-bottom: 10px; +} + +.send { + + display: flex; + flex-direction: column; + align-items: center; } \ No newline at end of file diff --git a/templates/app/app.html b/templates/app/app.html index 75662be..35f48d9 100644 --- a/templates/app/app.html +++ b/templates/app/app.html @@ -75,7 +75,7 @@ -
+
@@ -91,9 +91,12 @@

Actions :

- + +
+
+

Bug ou suggestion :

+
- @@ -105,6 +108,21 @@ + + + + + + + + +

Submanager - Version

Fait avec 💖 par Raphix

diff --git a/templates/app/app.js b/templates/app/app.js index 471b39c..28d2966 100644 --- a/templates/app/app.js +++ b/templates/app/app.js @@ -38,6 +38,15 @@ const patchnote = document.getElementById("patchnote") const patchClose = document.getElementById("patchClose") const patchInfo = document.getElementById("patchInfo") +const sendDialog = document.getElementById("sendDialog") +const send = document.getElementById("bug") +const sendClose = document.getElementById("sendClose") +const sendContent = document.getElementById("sendContent") +const sendInfo = document.getElementById("sendInfo") +const sendSend = document.getElementById("sendSend") +const sendText = document.getElementById("sendText") +const sendChos = document.getElementById("sendChos") + const volCursor = document.getElementById("volCursor") const volPct = document.getElementById("volPct") @@ -52,7 +61,14 @@ restart.addEventListener("click", () => { if(packageJson.dev == true) { - document.getElementById("devversion").innerHTML = "

Cette version est expérimentale.
En cas de bug, prévenez Raphix#8343

" + document.getElementById("devversion").innerHTML = "

Cette version est expérimentale.
En cas de bug, cliquez ici

" + const sendB = document.getElementById("bugD") + + sendB.addEventListener("click", () => { + + sendDialog.showModal() + + }) } var durationAll = 0 @@ -84,6 +100,49 @@ stClose.addEventListener("click", () => { stDialog.close() }) +send.addEventListener("click", () => { + + sendDialog.showModal() + +}) + +sendClose.addEventListener("click", () => { + + sendDialog.close() +}) + +sendSend.addEventListener("click", () => { + + sendInfo.innerHTML = "" + + if(sendText.value == "") { + + sendInfo.innerHTML = '

Le formulaire n\'a pas été rempli correctement !

' + } else { + + const report = { + "type":sendChos.value, + "text": sendText.value + + } + + ipc.send("report", report) + + } + +}) + +ipc.on("reportForm", (ev, ans) => { + if(ans == true) { + sendInfo.innerHTML = '

Le formulaire a été envoyé !

' + + } else { + + sendInfo.innerHTML = '

Erreur lors de l\'envoi du formulaire !

' + } + +}) + durationBar.value = 0 listNumber.classList.add("exitNotShow") @@ -209,7 +268,7 @@ ipc.on("findResult", (ev, list) => { for(var title of data) { - contentToPush.push('

' + title.title + '

') + contentToPush.push('

' + title.title + '

') } if(contentToPush.join("") == "") { @@ -380,7 +439,7 @@ ipc.on("actualize", (ev, data) => { queueNum += 1 console.log(queueNum) console.log(data.queue.indexOf(title) + " - " + title.title) - contentToPush.push('

' + title.title + '

') + contentToPush.push('

' + title.title + '

') } if(contentToPush.join("") == "") { @@ -399,11 +458,18 @@ ipc.on("actualize", (ev, data) => { console.log(data.queue.indexOf(title) + " - " + title.title) const titleBtn = document.getElementById(data.queue.indexOf(title)+ "_delete") + const moveBtn = document.getElementById(data.queue.indexOf(title)+ "_move") titleBtn.addEventListener("click", () => { ipc.send("deleteQueue", titleBtn.id.replace("_delete", "")) }) + + moveBtn.addEventListener("click", () => { + + ipc.send("moveQueue", moveBtn.id.replace("_move", "")) + + }) }