diff --git a/package-lock.json b/package-lock.json index 3f82cb1..a757989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "subsonics-discord", - "version": "5.5", + "version": "7.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "subsonics-discord", - "version": "5.5", + "version": "7.5", "dependencies": { "cookie-parser": "^1.4.6", "discord.js": "^14.9.0", diff --git a/package.json b/package.json index e60ea45..f53cfbd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "subsonics-discord", "author": "Raphix", - "version": "7.0", + "version": "7.5", "nodemonConfig": { "ext": "js, html", "ignore": [ diff --git a/src/close.html b/src/close.html deleted file mode 100644 index c45dd98..0000000 --- a/src/close.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - Submanager - - - - - - \ No newline at end of file diff --git a/src/close/close.css b/src/close/close.css new file mode 100644 index 0000000..70cc12d --- /dev/null +++ b/src/close/close.css @@ -0,0 +1,155 @@ +@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap'); + + +body { + + background-color: #171717 !important; + font-family: 'Open Sans', sans-serif !important; + padding: 3%; +} + +.top-title { + + display: flex; + width: 100%; + flex-direction: row; + justify-content: center; + align-items: center; + color: white; +} + + +.top-logo { + + width: 5vw; + border-radius: 10%; + +} + +.buttonClose { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 15px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 5px; + outline: none; + + +} + +.text { + text-align: center; + font-size: 2vw; + color: white; + + +} + + + +.boxtext { + margin-top: 5%; + border-radius: 15px; + background-color: #3d3d3d; + width: 50%; + padding: 3%; + margin-right: auto; + margin-left: auto; +} + +.buttonClose:hover { + + color: red; +} + +.buttonClose:active { + + color: rgb(255, 255, 255); +} + +.buttonReduce { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 13px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 5px; + outline: none; + + +} + +.buttonReduce:hover { + + color: rgb(46, 196, 255); +} + +.buttonReduce:active { + + color: rgb(255, 255, 255); +} + + +header { + + display: flex; +} + +.content { + + padding: 5%; + padding-top: 0; + +} + +.buttonFav { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 13px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 0; + outline: none; + + +} + +.buttonFav:hover { + + color: rgb(242, 255, 53); +} + +.buttonFav:active { + + color: rgb(255, 255, 255); +} + +.title-t { + + width: +30%; + margin-left: 1%; + margin-top: 1%; + +} \ No newline at end of file diff --git a/src/close/close.html b/src/close/close.html new file mode 100644 index 0000000..6c32b1f --- /dev/null +++ b/src/close/close.html @@ -0,0 +1,21 @@ + + + + + + + + Subsonics - Submanager + + +
+ + Logo +
+
+

Vous pouvez fermer cette fenêtre !

+

En cas de problème, prévenez Raphix#8434 !

+
+ + + \ No newline at end of file diff --git a/src/close/logo.png b/src/close/logo.png new file mode 100644 index 0000000..d132a6b Binary files /dev/null and b/src/close/logo.png differ diff --git a/src/close/title.png b/src/close/title.png new file mode 100644 index 0000000..7097877 Binary files /dev/null and b/src/close/title.png differ diff --git a/src/error/error.css b/src/error/error.css new file mode 100644 index 0000000..575ed3c --- /dev/null +++ b/src/error/error.css @@ -0,0 +1,155 @@ +@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap'); + + +body { + + background-color: #171717 !important; + font-family: 'Open Sans', sans-serif !important; + padding: 3%; +} + +.top-title { + + display: flex; + width: 100%; + flex-direction: row; + justify-content: center; + align-items: center; + color: white; +} + + +.top-logo { + + width: 5vw; + border-radius: 10%; + +} + +.buttonClose { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 15px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 5px; + outline: none; + + +} + +.text { + text-align: center; + font-size: 2vw; + color: rgb(255, 2, 2); + + +} + + + +.boxtext { + margin-top: 5%; + border-radius: 15px; + background-color: #3d3d3d; + width: 50%; + padding: 3%; + margin-right: auto; + margin-left: auto; +} + +.buttonClose:hover { + + color: red; +} + +.buttonClose:active { + + color: rgb(255, 255, 255); +} + +.buttonReduce { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 13px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 5px; + outline: none; + + +} + +.buttonReduce:hover { + + color: rgb(46, 196, 255); +} + +.buttonReduce:active { + + color: rgb(255, 255, 255); +} + + +header { + + display: flex; +} + +.content { + + padding: 5%; + padding-top: 0; + +} + +.buttonFav { + + background-color: transparent; + border: none; + border-radius: 15px; + cursor: pointer; + transition: all 0.3s ease 0s; + font-family: 'noto Sans', sans-serif; + font-weight: 500; + font-size: 13px; + color: white; + text-decoration: none; + -webkit-app-region: no-drag; + margin: 0; + outline: none; + + +} + +.buttonFav:hover { + + color: rgb(242, 255, 53); +} + +.buttonFav:active { + + color: rgb(255, 255, 255); +} + +.title-t { + + width: +30%; + margin-left: 1%; + margin-top: 1%; + +} \ No newline at end of file diff --git a/src/error/error.html b/src/error/error.html new file mode 100644 index 0000000..18e71d4 --- /dev/null +++ b/src/error/error.html @@ -0,0 +1,21 @@ + + + + + + + + Subsonics - Submanager + + +
+ + Logo +
+
+

Echec de connexion par Discord !

+

Vous pouvez fermer cette fenêtre et réessayer !

+
+ + + \ No newline at end of file diff --git a/src/error/logo.png b/src/error/logo.png new file mode 100644 index 0000000..d132a6b Binary files /dev/null and b/src/error/logo.png differ diff --git a/src/error/title.png b/src/error/title.png new file mode 100644 index 0000000..7097877 Binary files /dev/null and b/src/error/title.png differ diff --git a/src/main.js b/src/main.js index 6bb134b..775dd65 100644 --- a/src/main.js +++ b/src/main.js @@ -817,7 +817,7 @@ function startServer(client) { if(req.query.error) { socket.emit("authFailed") - res.send("SubSonics Manager : ERREUR : DISCORD AUTH FAILED !") + res.sendFile(__dirname + path.sep + "error" + path.sep + "error.html") log.server("Discord Auth : Erreur - Refus de connexion chez le service Discord : Token de Connexion : " + token + " associé à Client ID : " + socket.id) } else { @@ -851,7 +851,7 @@ function startServer(client) { res.clearCookie("authLoginFollow") - res.send("SubSonics Manager : Vous pouvez fermer cette fenêtre ! Si rien ne ce passe sur l'application, prévenez Raphix !") + res.sendFile(__dirname + path.sep + "close" + path.sep + "close.html") } catch(error) { @@ -860,7 +860,7 @@ function startServer(client) { } } else { - res.send("SubSonics Manager : ERREUR : DISCORD AUTH FAILED !") + res.sendFile(__dirname + path.sep + "error" + path.sep + "error.html") } @@ -868,12 +868,13 @@ function startServer(client) { } } else { - res.send("SubSonics Manager : ERREUR : AUCUN TOKEN ENREGISTRÉ !") + res.sendFile(__dirname + path.sep + "error" + path.sep + "error.html") } + } else { - res.send("SubSonics Manager : ERREUR : AUCUN TOKEN ENREGISTRÉ !") + res.sendFile(__dirname + path.sep + "error" + path.sep + "error.html") }