diff --git a/README.md b/README.md
index 18751b9..04c93a4 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,65 @@
-# web
+# Subsonics Web
+
+
+
+## Instruction
+
+* En cas de bug, n'hésitez pas à faire un **report** sur votre profil.
+* Vous pouvez utiliser la commande **/restart** sur Discord pour redémarrer l'intégralité du programme !
+
+
+
+
+
+
+
+## Changelog
+
+### Subsonics - Web - 0.5.0
+- **Adds :** *Web features : Search & Play*
+#### Details
+**Web Player Features**
+> - Search & Play
+>> - SEND/ SEARCH_SONGS
+>> - SEND/ PLAY_SONG
+
+
+
+
+### Subsonics - Web - 0.6.0
+- **Adds :** *Web features : Playlist | Pipeline Deploy V2 | Search Ellipis*
+#### Details
+**Web Player Features**
+> - Playlist
+>> - SEND/ SEARCH_SONGS
+>> - SEND/ ADD_SONGS
+> - Make a popup
+>> - Lire maintenant
+>> - Ajouter à une playlist
+**Pipeline Deploy V2**
+>> - Copy /data/ except "betas.json"
+>> - Reinject /data/
+
+
+
+### Subsonics - Web - 0.7.0
+- **Adds :** *Settings : Web Page Change, Logs, Connexions, Gestion d'accès, Beta | Users V2 | Handle CLP & Banned account*
+#### Details
+-- TO DO
+
+
+
+### Subsonics - Web - 0.8.0
+- **Adds :** *Alerts, Playlist Share, See Who is Online*
+#### Details
+-- TO DO
+
+
+
+### Subsonics - Web - 1.0.0
+- **Adds :** *Bugs Fixes & Trailer*
+#### Details
+-- TO DO
+
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index a14bffa..85e4145 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "subsonics-web",
- "version": "0.4.1",
+ "version": "0.5.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "subsonics-web",
- "version": "0.4.1",
+ "version": "0.5.0",
"dependencies": {
"cookie": "^0.5.0",
"cookie-parser": "^1.4.6",
@@ -15,6 +15,7 @@
"erela.js": "^2.4.0",
"express": "^4.18.2",
"express-favicon": "^2.0.4",
+ "markdown-it": "^13.0.1",
"nodemon": "^2.0.22",
"pm2": "^5.3.0",
"socket.io": "^4.6.1",
@@ -1224,6 +1225,17 @@
"node": ">=8.6"
}
},
+ "node_modules/entities": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
+ "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/erela.js": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/erela.js/-/erela.js-2.4.0.tgz",
@@ -1903,6 +1915,14 @@
"node": ">=0.2.0"
}
},
+ "node_modules/linkify-it": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
+ "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
+ "dependencies": {
+ "uc.micro": "^1.0.1"
+ }
+ },
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
@@ -1929,6 +1949,31 @@
"node": ">=12"
}
},
+ "node_modules/markdown-it": {
+ "version": "13.0.1",
+ "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
+ "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
+ "dependencies": {
+ "argparse": "^2.0.1",
+ "entities": "~3.0.1",
+ "linkify-it": "^4.0.1",
+ "mdurl": "^1.0.1",
+ "uc.micro": "^1.0.5"
+ },
+ "bin": {
+ "markdown-it": "bin/markdown-it.js"
+ }
+ },
+ "node_modules/markdown-it/node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ },
+ "node_modules/mdurl": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
+ "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
+ },
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -3258,6 +3303,11 @@
"node": ">= 0.6"
}
},
+ "node_modules/uc.micro": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
+ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
+ },
"node_modules/undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
@@ -4304,6 +4354,11 @@
"ansi-colors": "^4.1.1"
}
},
+ "entities": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
+ "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
+ },
"erela.js": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/erela.js/-/erela.js-2.4.0.tgz",
@@ -4796,6 +4851,14 @@
"resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz",
"integrity": "sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA=="
},
+ "linkify-it": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
+ "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
+ "requires": {
+ "uc.micro": "^1.0.1"
+ }
+ },
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
@@ -4816,6 +4879,30 @@
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="
},
+ "markdown-it": {
+ "version": "13.0.1",
+ "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
+ "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
+ "requires": {
+ "argparse": "^2.0.1",
+ "entities": "~3.0.1",
+ "linkify-it": "^4.0.1",
+ "mdurl": "^1.0.1",
+ "uc.micro": "^1.0.5"
+ },
+ "dependencies": {
+ "argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ }
+ }
+ },
+ "mdurl": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
+ "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
+ },
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -5773,6 +5860,11 @@
"mime-types": "~2.1.24"
}
},
+ "uc.micro": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
+ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
+ },
"undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
diff --git a/package.json b/package.json
index a6d6bac..46100b5 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "subsonics-web",
"author": "Raphix",
- "version": "0.4.2",
+ "version": "0.5.0",
"nodemonConfig": {
"ext": "js, html",
"ignore": [
@@ -19,6 +19,7 @@
"erela.js": "^2.4.0",
"express": "^4.18.2",
"express-favicon": "^2.0.4",
+ "markdown-it": "^13.0.1",
"nodemon": "^2.0.22",
"pm2": "^5.3.0",
"socket.io": "^4.6.1",
diff --git a/src/modules/discord-bot.js b/src/modules/discord-bot.js
index 843fd9d..a67bfd8 100644
--- a/src/modules/discord-bot.js
+++ b/src/modules/discord-bot.js
@@ -12,13 +12,20 @@ const client = new Client({
intents:[GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMembers],
})
-const membersVoices = new Map()
+var membersVoices = new Map()
module.exports.getClient = function () {
return client
}
+module.exports.getMemberVoices = function () {
+
+ return membersVoices
+}
+
+
+
module.exports.DiscordBot = class {
constructor(config, dlog) {
@@ -257,4 +264,5 @@ function startErelaManager(dlog, config) {
// THIS IS REQUIRED. Send raw events to Erela.js
client.on("raw", d => client.manager.updateVoiceState(d));
-}
\ No newline at end of file
+}
+
diff --git a/src/modules/global-variables.js b/src/modules/global-variables.js
index fb47b8f..2c763df 100644
--- a/src/modules/global-variables.js
+++ b/src/modules/global-variables.js
@@ -16,6 +16,7 @@ const __glob = {
PACKAGE: root + path.sep + "package.json",
DATA: root + path.sep + "data" + path.sep,
NODES: root + path.sep + "data" + path.sep + "nodes.json",
+ README: root + path.sep + "README.md"
};
const webroot = __glob.WEB_DIR + path.sep
diff --git a/src/modules/sub-player.js b/src/modules/sub-player.js
index dfcd593..93480be 100644
--- a/src/modules/sub-player.js
+++ b/src/modules/sub-player.js
@@ -4,6 +4,7 @@ const { LogType } = require("./sub-log");
var { List } = require("./sub-list")
const discord = require("./discord-bot")
var ytfps = require("ytfps");
+const { use } = require("../web/routes/login");
const packageJson = require(__glob.PACKAGE);
@@ -177,7 +178,7 @@ module.exports.getState = function(client, interaction) {
}
-module.exports.SPECIAL_MJ = async function (client) {
+module.exports.SPECIAL_MJ = async function (client, userId) {
if(!client) {
@@ -186,12 +187,13 @@ module.exports.SPECIAL_MJ = async function (client) {
let player = client.manager.players.get("137291455336022018")
+ var memberVoices = discord.getMemberVoices()
if(!player) {
player = client.manager.create({
guild: "137291455336022018",
- voiceChannel: "664355734288465920",
+ voiceChannel: memberVoices.get(userId),
textChannel: "664355637685256203",
});
@@ -221,6 +223,61 @@ module.exports.SPECIAL_MJ = async function (client) {
}
+module.exports.addSong = async function (data, client, userId, quick) {
+
+ if(!client) {
+
+ client = discord.getClient()
+ }
+
+ let player = client.manager.players.get("137291455336022018")
+
+ var memberVoices = discord.getMemberVoices()
+ var channelId = memberVoices.get(userId)
+
+ if(!channelId) {
+
+ channelId = "664355808250953739"
+ }
+
+ if(!player) {
+
+ player = client.manager.create({
+ guild: "137291455336022018",
+ voiceChannel: channelId,
+ textChannel: "664355637685256203",
+ });
+
+
+ player.connect();
+ }
+
+
+ const songs = await client.manager.search(data.uri)
+
+ if(quick) {
+
+ player.play(songs.tracks[0])
+
+ } else {
+
+ if(!player.playing && player.paused == false) {
+
+ player.play(songs.tracks[0])
+
+ } else {
+
+ list.add(songs.tracks[0])
+
+ }
+ }
+
+
+
+ process.emit("MUSIC_UPDATE_STATE")
+
+}
+
module.exports.skip = function (client, interaction) {
if(interaction) {
@@ -371,6 +428,25 @@ module.exports.changeShuffle = function (client) {
}
process.emit("MUSIC_UPDATE_STATE")
+
+}
+
+const slog = new LogType("Search")
+
+module.exports.search = async function (data, client) {
+
+
+ if(!client) {
+
+ client = discord.getClient()
+ }
+
+ slog.log("Recherche avec les mots clés : " + data)
+
+ const songs = await client.manager.search(data)
+ return songs
+
+
}
diff --git a/src/modules/sub-web.js b/src/modules/sub-web.js
index 0bd7a6c..873cd54 100644
--- a/src/modules/sub-web.js
+++ b/src/modules/sub-web.js
@@ -246,7 +246,15 @@ function IOConnection(io) {
GetRequest(io, socket, "SPECIAL/MJ", () => {
- subplayer.SPECIAL_MJ()
+ var cookiesA = socket.handshake.headers.cookie
+ cookiesA = cook.parse(cookiesA)
+ var tokenA = cookiesA.token
+
+ var userA = auth.getUser(tokenA)
+ var userId = userA.user.id
+
+
+ subplayer.SPECIAL_MJ(null, userId)
io.emit("ANSWER/GET/SPECIAL/MJ", "OK")
})
@@ -391,9 +399,113 @@ function IOConnection(io) {
})
-
-
+ socket.on("SEND/SEARCH", async (data) => {
+
+
+ var cookies = socket.handshake.headers.cookie
+
+ if(cookies) {
+
+ cookies = cook.parse(cookies)
+ var token = cookies.token
+
+ if(auth.checkUser(token)) {
+
+
+ const results = await subplayer.search(data)
+
+
+ io.emit("ANSWER/SEND/SEARCH", results)
+
+ } else {
+
+ io.emit("ANSWER/SEND/SEARCH", {"error":"USER_DONT_EXIST"})
+ }
+ } else {
+ io.emit("ANSWER/SEND/SEARCH", {"error":"TOKEN_NOT_FINDED"})
+
+ }
+
+
+
+ })
+
+ socket.on("SEND/ADD_SONG", async (data) => {
+
+
+ var cookies = socket.handshake.headers.cookie
+
+ if(cookies) {
+
+ cookies = cook.parse(cookies)
+ var token = cookies.token
+
+ if(auth.checkUser(token)) {
+
+
+
+ var user = auth.getUser(token)
+ var userId = user.user.id
+
+
+ subplayer.addSong(data, null, userId)
+
+
+ io.emit("ANSWER/SEND/ADD_SONG/OK")
+
+ } else {
+
+ io.emit("ANSWER/SEND/ADD_SONG", {"error":"USER_DONT_EXIST"})
+ }
+ } else {
+ io.emit("ANSWER/SEND/ADD_SONG", {"error":"TOKEN_NOT_FINDED"})
+
+ }
+
+
+
+ })
+
+ socket.on("SEND/ADD_SONG_NOW", async (data) => {
+
+
+ var cookies = socket.handshake.headers.cookie
+
+ if(cookies) {
+
+ cookies = cook.parse(cookies)
+ var token = cookies.token
+
+ if(auth.checkUser(token)) {
+
+
+
+ var user = auth.getUser(token)
+ var userId = user.user.id
+
+
+ subplayer.addSong(data, null, userId, true)
+
+
+ io.emit("ANSWER/SEND/ADD_SONG_NOW/OK")
+
+ } else {
+
+ io.emit("ANSWER/SEND/ADD_SONG_NOW", {"error":"USER_DONT_EXIST"})
+ }
+ } else {
+ io.emit("ANSWER/SEND/ADD_SONG_NOW", {"error":"TOKEN_NOT_FINDED"})
+
+ }
+
+
+
+ })
+
+
+
+
})
diff --git a/src/web/public/javascript/__index_script.js b/src/web/public/javascript/__index_script.js
index 7012bc5..ff1feec 100644
--- a/src/web/public/javascript/__index_script.js
+++ b/src/web/public/javascript/__index_script.js
@@ -43,6 +43,132 @@ const report_level = document.getElementById("report_level")
const report_desc = document.getElementById("report_desc")
const report_send = document.getElementById("report_send")
+const searchBar = document.getElementById("searchBar")
+const searchcontent = document.getElementById("search_content")
+
+const WelcomeContent = searchcontent.outerHTML
+
+var xMousePos = 0;
+var yMousePos = 0;
+document.onmousemove = function(e)
+{
+ xMousePos = e.clientX + window.pageXOffset;
+ yMousePos = e.clientY + window.pageYOffset;
+};
+
+
+
+searchBar.addEventListener("change", () => {
+
+ if(searchBar.value == "") {
+
+ searchcontent.innerHTML = WelcomeContent
+ } else {
+
+ send("SEARCH", searchBar.value).then(results => {
+
+ if(results.tracks != null) {
+ const data = results.tracks
+
+ console.log(data)
+ var contentToPush = new Array()
+
+ for(var title of data) {
+
+ var Formatduration = null
+ durationAll = title.duration
+
+ const maxhours = Math.floor(durationAll / 3600000);
+
+ var maxmin = Math.trunc(durationAll / 60000) - (Math.floor(durationAll / 60000 / 60) * 60);
+ var maxsec = Math.floor(durationAll / 1000) - (Math.floor(durationAll / 1000 / 60) * 60);
+
+
+ if (maxsec < 10) {
+ maxsec = `0${maxsec}`;
+ }
+
+
+ if(maxhours != 0) {
+
+ if (maxmin < 10) {
+ maxmin = `0${maxmin}`;
+ }
+
+
+ max = maxhours + ":" + maxmin + ":" + maxsec
+ } else {
+ max = maxmin + ":" + maxsec
+
+ }
+
+ Formatduration = max
+ contentToPush.push(' ' + title.author + '
' + Formatduration + '
')
+ }
+
+ if(contentToPush.join("") == "") {
+
+ searchcontent.innerHTML = 'Aucun morceau trouvé !
'
+
+ } else {
+
+ searchcontent.innerHTML = contentToPush.join("")
+ }
+
+ for(var title of data) {
+
+ const add_to = document.getElementById(data.indexOf(title) + "_ladd")
+ const test_lmore = document.getElementById(data.indexOf(title) + "_lmore")
+ const testPopup = document.getElementById(data.indexOf(title) + "_popup")
+ const playNow = document.getElementById(data.indexOf(title) + "_playNow")
+
+ testPopup.style.display = "none"
+
+ add_to.addEventListener("click", () => {
+
+ send("ADD_SONG", data[add_to.id.replace("_ladd", "")])
+ })
+
+ test_lmore.addEventListener("click",( ) => {
+
+
+ testPopup.style.display = "flex"
+ testPopup.style.top = yMousePos + "px"
+
+ document.getElementById("test").show()
+ console.log()
+
+
+ })
+
+ testPopup.addEventListener("mouseleave", () => {
+
+ testPopup.style.display = "none"
+
+ })
+
+ playNow.addEventListener("click", () => {
+
+ send("ADD_SONG_NOW", data[add_to.id.replace("_ladd", "")])
+
+ })
+
+
+ }
+
+
+ } else {
+
+ searchcontent.innerHTML = 'Aucun morceau trouvé !
'
+
+ }
+
+ })
+
+ }
+
+})
+
volBox.classList.add("invisible")
@@ -61,6 +187,8 @@ list.addEventListener("click" , () => {
}
})
+// Apply the width of element1 to element2
+
vol.addEventListener("click", () => {
@@ -157,18 +285,26 @@ userInfo.then(user => {
userInfoDiv.innerHTML = "" + user.user.global_name + "
" + user.user.username + "
" + betastar + "
"
})
+
userInfoDiv.addEventListener("click", () => {
-
- userInfoPopup.classList.add("INDEX_userPopup_Visible")
- userInfoPopup.classList.remove("INDEX_userPopup")
+ if(userInfoPopup.classList.contains("invisible")) {
+
+ userInfoPopup.classList.remove("invisible")
+ userInfoPopup.style.left = (xMousePos - 110) + "px"
+ userInfoPopup.style.top = yMousePos + "px"
+
+ }
+
+})
+userInfoPopup.classList.add("invisible")
+
+userInfoPopup.addEventListener("mouseleave", () => {
+
+ userInfoPopup.classList.add("invisible")
})
-userInfoglobal.addEventListener("mouseleave", () => {
- userInfoPopup.classList.add("INDEX_userPopup")
- userInfoPopup.classList.remove("INDEX_userPopup_Visible")
-})
get("MUSIC_STATE").then(data => {
console.log(data)
@@ -230,6 +366,10 @@ socket.on("/ALWAYS/MUSIC_STATE", (data) => {
volRange.value = Math.trunc(data.volume / 10)
volTxt.innerHTML = Math.trunc(data.volume / 10) + "%"
+ var volNum = Math.trunc(data.volume / 10)
+
+
+
} else {
volRange.classList.add("disabled")
@@ -354,7 +494,7 @@ socket.on("/ALWAYS/MUSIC_STATE", (data) => {
} else {
- listBox.innerHTML = 'Lancez un titre et ajouter vos morceaux ici !
'
+ listBox.innerHTML = 'Lancez un titre et ajoutez vos morceaux ici !
'
listNumber.classList.add("invisible")
}
@@ -444,4 +584,6 @@ function setTime() {
durationTextAct.innerHTML = now
durationTextTotal.innerHTML = max
-}
\ No newline at end of file
+}
+
+
diff --git a/src/web/public/stylesheets/style.css b/src/web/public/stylesheets/style.css
index 8ce9b1f..b264ac9 100644
--- a/src/web/public/stylesheets/style.css
+++ b/src/web/public/stylesheets/style.css
@@ -16,7 +16,7 @@ body {
background-color: black;
color: white;
font-family: 'Roboto', sans-serif;
- background: linear-gradient(90deg, rgba(76,72,140,1) 0%, rgba(0,0,0,1) 100%),
+ background: linear-gradient(90deg, rgba(76,72,140,1) 0%, rgba(0,0,0,1) 100%),
linear-gradient(90deg, rgb(101, 95, 185) 0%, rgb(48, 48, 48) 100%);
}
@@ -139,13 +139,10 @@ body {
+
+
.INDEX_userPopup {
- display: none;
-}
-
-.INDEX_userPopup_Visible {
-
display: flex;
flex-direction: column;
background-color: #2e2e2e;
@@ -153,7 +150,9 @@ body {
font-size: 12px;
text-align: center;
color: white;
-
+ position: absolute;
+ width: 130px;
+ z-index: 2;
}
#userInfoglobal {
@@ -208,6 +207,7 @@ body {
align-items: center;
position: absolute;
width: 100%;
+ height: 15vh;
bottom: 0;
color: white;
@@ -764,3 +764,141 @@ p {
}
+
+/*INDEX Search & Play*/
+
+.INDEX_playlist {
+
+ background-color: #2e2e2e86;
+ width: 0%;
+ height: 68vh;
+ border-radius: 12px;
+}
+
+.INDEX_search {
+
+ background-color: #2e2e2e86;
+ width: 100%;
+ height: 68vh;
+ margin-left: 1%;
+ border-radius: 12px;
+ overflow-y: auto;
+ padding: 1%;
+
+}
+
+.INDEX_subcontent {
+
+ display: flex;
+ margin-top: 2%;
+ height: 70vh;
+ width: 100%;
+}
+
+#searchBar {
+ border: none;
+ border-radius: 20px ;
+ background-color: #ffffff;
+ color: rgb(0, 0, 0);
+ width: 30%;
+ padding: 0.3%;
+ padding-left: 1%;
+ outline: none;
+ user-select: none;
+ font-size: 14px;
+
+
+}
+
+.findbar {
+
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ color: white;
+ margin-bottom: 1%;
+ position: fixed;
+ width: 100%;
+
+}
+
+.search_song {
+
+ display: grid;
+ align-items: start;
+ color: white;
+ font-size: 12px;
+ margin-bottom: 5px;
+ grid-template-columns: 0.5fr 3fr 1fr 1fr 0.1fr;
+ align-items: center;
+
+}
+
+.search_thumbnail {
+ width: 100px;
+ height: 75px;
+
+}
+
+.search_middle {
+
+ margin-bottom: 4%;
+}
+
+
+.search_add {
+
+ background-color: transparent;
+
+ color: #ffffff;
+ border: none;
+ font-size: 20px;
+ transition: 0.1s;
+}
+
+.search_add:hover {
+
+ color: #00bfff;
+}
+
+.search_lmore {
+
+ color: rgb(255, 255, 255);
+ background-color: transparent;
+ border: none;
+ font-size: 20px;
+ transition: 0.1s;
+ text-align: center;
+ z-index: 0;
+}
+
+.search_lmore:hover {
+
+ color: #51ff00;
+}
+
+
+.search_buttons {
+
+ display: flex;
+ flex-direction: row;
+ gap: 10px;
+ text-align: right;
+}
+
+.searchMoreDiv {
+
+ display: flex;
+ position: relative;
+}
+
+.searchPopup {
+ background-color: #2d2d2d;
+ position: absolute;
+ flex-direction: column;
+ width: 200px;
+ right: 3%;
+ text-align: center;
+ z-index: 2;
+}
+
diff --git a/src/web/routes/index.js b/src/web/routes/index.js
index fdd869e..7f262a4 100644
--- a/src/web/routes/index.js
+++ b/src/web/routes/index.js
@@ -3,7 +3,36 @@ var router = express.Router();
var path = require("path")
var auth = require("../../modules/sub-auth")
var log = require("../../modules/sub-log")
+var { __glob } = require("../../modules/global-variables")
var uuid = require("uuid")
+var fs = require("fs")
+
+var md = require('markdown-it')({
+ html: true, // Enable HTML tags in source
+ xhtmlOut: true, // Use '/' to close single tags ( ).
+ // This is only for full CommonMark compatibility.
+ breaks: true, // Convert '\n' in paragraphs into
+ langPrefix: 'language-', // CSS language prefix for fenced blocks. Can be
+ // useful for external highlighters.
+ linkify: true, // Autoconvert URL-like text to links
+
+ // Enable some language-neutral replacement + quotes beautification
+ // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js
+ typographer: true,
+
+ // Double + single quotes replacement pairs, when typographer enabled,
+ // and smartquotes on. Could be either a String or an Array.
+ //
+ // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
+ // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
+ quotes: '“”‘’',
+
+ // Highlighter function. Should return escaped HTML,
+ // or '' if the source string is not changed and should be escaped externally.
+ // If result starts with
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%- welcome %>
+
+
+
+
+
+
+
+
+
+
+
+
- LAUNCH MJ MUSIC
+
-
+