2.1.2 Offical Version
This commit is contained in:
parent
5523e94cff
commit
e130e2c761
@ -1,3 +1,13 @@
|
|||||||
|
<h1><u>Subsonics 2.1.2</u></h1>
|
||||||
|
<p>Sortie le : 02/05/2022</p>
|
||||||
|
<h2 style="font-size: 18px;">Ajouts & Fixes :</h2>
|
||||||
|
<ul>
|
||||||
|
<li><strong>[AJOUT]</strong> : Favoris : Vous pouvez désormais sauvegarder plusieurs playlists de lecture.</li>
|
||||||
|
<li><strong>[FIX]</strong> : Profil : Augumentation de la taille de l'image</li>
|
||||||
|
<li><strong>[AJOUT]</strong> : Site : Création d'un site pour télécharger le logiciel. </li>
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
|
||||||
<h1><u>Subsonics 2.1.1</u></h1>
|
<h1><u>Subsonics 2.1.1</u></h1>
|
||||||
<p>Sortie le : 31/04/2022</p>
|
<p>Sortie le : 31/04/2022</p>
|
||||||
<h2 style="font-size: 18px;">Ajouts & Fixes :</h2>
|
<h2 style="font-size: 18px;">Ajouts & Fixes :</h2>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "subsonics-manager",
|
"name": "subsonics-manager",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "Manager for subsonics",
|
"description": "Manager for subsonics",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -66,6 +66,10 @@
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.searchTitle {
|
||||||
|
margin: 0;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.signout {
|
.signout {
|
||||||
|
|
||||||
@ -506,6 +510,7 @@ input[type=range] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<div class="bbar">
|
<div class="bbar">
|
||||||
<button id="search" class="third"><i class="fa fa-search"></i></button>
|
<button id="search" class="third"><i class="fa fa-search"></i></button>
|
||||||
<button id="loop" class="third"><i class="fa fa-retweet"></i></button>
|
<button id="loop" class="third"><i class="fa fa-retweet"></i></button>
|
||||||
|
<button id="fav" class="third"><i class="fa fa-star"></i></button>
|
||||||
<span id="exitSpan" class="exit"></span>
|
<span id="exitSpan" class="exit"></span>
|
||||||
<button id="list" class="list third"><i class="fa fa-list-ol"><p class="number" id="listNumber"></p></i></button>
|
<button id="list" class="list third"><i class="fa fa-list-ol"><p class="number" id="listNumber"></p></i></button>
|
||||||
</div>
|
</div>
|
||||||
@ -55,6 +56,19 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<dialog id="favDialog" class="menu">
|
||||||
|
<div class="menuheader">
|
||||||
|
<p class="listHeader"><i style="margin-right: 3px" class="fa fa-star"></i> Favoris</p>
|
||||||
|
<div>
|
||||||
|
<button class="buttonClose" id="favClear"><i class="fas fa-trash"></i></button>
|
||||||
|
<button class="buttonClose" id="favClose"><i class="fas fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="favContent">
|
||||||
|
</div>
|
||||||
|
</dialog>
|
||||||
<dialog id="listDialog" class="menu">
|
<dialog id="listDialog" class="menu">
|
||||||
<div class="menuheader">
|
<div class="menuheader">
|
||||||
<p class="listHeader"><i style="margin-right: 3px" class="fa fa-list-ol"></i> Liste de lecture</p>
|
<p class="listHeader"><i style="margin-right: 3px" class="fa fa-list-ol"></i> Liste de lecture</p>
|
||||||
|
@ -58,12 +58,85 @@ const updClose = document.getElementById("updClose")
|
|||||||
const updSpan = document.getElementById("updSpan")
|
const updSpan = document.getElementById("updSpan")
|
||||||
|
|
||||||
|
|
||||||
|
const favDialog = document.getElementById("favDialog")
|
||||||
|
const fav = document.getElementById("fav")
|
||||||
|
const favClose = document.getElementById("favClose")
|
||||||
|
const favClear = document.getElementById("favClear")
|
||||||
|
const favContent = document.getElementById("favContent")
|
||||||
|
|
||||||
|
|
||||||
|
fav.addEventListener("click", () => {
|
||||||
|
|
||||||
|
favDialog.showModal()
|
||||||
|
|
||||||
|
showFavoris()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
favClear.addEventListener("click", () => {
|
||||||
|
|
||||||
|
const settings = getSettings()
|
||||||
|
settings.favoris = []
|
||||||
|
|
||||||
|
saveSettings(settings)
|
||||||
|
showFavoris()
|
||||||
|
})
|
||||||
|
|
||||||
|
function showFavoris() {
|
||||||
|
|
||||||
|
const settings = getSettings()
|
||||||
|
|
||||||
|
var contentToPush = new Array()
|
||||||
|
|
||||||
|
for(var title of settings.favoris) {
|
||||||
|
|
||||||
|
contentToPush.push('<div class="song"> <img class="thumbnail" src="' + title.thumbnail + '"><div class="titleSong"> <p class="listTitle">' + title.title + '</p></div> <button style="margin : 0;" id="' + settings.favoris.indexOf(title) + '_fadd" class="buttonReduce"><i class="fa fa-plus"></i></button> <button id="' + settings.favoris.indexOf(title) + '_fdelete" class="buttonClose"><i class="fa fa-trash"></i></button> </div></div>')
|
||||||
|
}
|
||||||
|
|
||||||
|
if(contentToPush.join("") == "") {
|
||||||
|
|
||||||
|
|
||||||
|
favContent.innerHTML = '<p class="error">Aucun morceau dans les favoris !</p>'
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
favContent.innerHTML = contentToPush.join("")
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var title of settings.favoris) {
|
||||||
|
|
||||||
|
const titleBtn = document.getElementById(settings.favoris.indexOf(title) + "_fdelete")
|
||||||
|
const addBtn = document.getElementById(settings.favoris.indexOf(title) + "_fadd")
|
||||||
|
|
||||||
|
addBtn.addEventListener("click", () => {
|
||||||
|
|
||||||
|
ipc.send("addQueue", settings.favoris[addBtn.id.replace("_fadd", "")].uri)
|
||||||
|
favDialog.close()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
titleBtn.addEventListener("click", () => {
|
||||||
|
|
||||||
|
settings.favoris.splice(titleBtn.id.replace("_fdelete", ""), 1)
|
||||||
|
saveSettings(settings)
|
||||||
|
showFavoris()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
favClose.addEventListener("click", () => {
|
||||||
|
|
||||||
|
favDialog.close()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
upd.addEventListener("click", () => {
|
upd.addEventListener("click", () => {
|
||||||
|
|
||||||
updDialog.showModal()
|
updDialog.showModal()
|
||||||
updSpan.innerHTML = ""
|
updSpan.innerHTML = ""
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
updSpan.innerHTML = '<button style="margin-left: 25%;" id="updYes" class="bug"><i class="fas fa-power-off"></i> Mettre à jour</button>'
|
updSpan.innerHTML = '<button style="margin-left: 25%;" id="updYes" class="bug"><i class="fas fa-warning"></i> Mettre à jour</button>'
|
||||||
const updYes = document.getElementById("updYes")
|
const updYes = document.getElementById("updYes")
|
||||||
updYes.addEventListener("click", () => {
|
updYes.addEventListener("click", () => {
|
||||||
ipc.send("forceUpdate")
|
ipc.send("forceUpdate")
|
||||||
@ -93,10 +166,10 @@ if(packageJson.dev == true) {
|
|||||||
sendB.addEventListener("click", () => {
|
sendB.addEventListener("click", () => {
|
||||||
|
|
||||||
|
|
||||||
sendInfo.innerHTML = ""
|
sendInfo.innerHTML = ""
|
||||||
sendText.value = ""
|
sendText.value = ""
|
||||||
sendChos.value = "Bug"
|
sendChos.value = "Bug"
|
||||||
sendDialog.showModal()
|
sendDialog.showModal()
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -302,7 +375,7 @@ ipc.on("findResult", (ev, list) => {
|
|||||||
for(var title of data) {
|
for(var title of data) {
|
||||||
|
|
||||||
|
|
||||||
contentToPush.push(' <div class="ressong"> <img class="thumbnail" src="' + title.thumbnail + '"><div class="titleSong"> <p class="searchTitle">' + title.title + '</p></div> <button id="' + data.indexOf(title) + '_add" class="buttonReduce"><i class="fa fa-plus"></i></button></div>')
|
contentToPush.push(' <div class="ressong"> <img class="thumbnail" src="' + title.thumbnail + '"><div class="titleSong"> <p class="searchTitle">' + title.title + '</p></div><button id="' + data.indexOf(title) + '_sfav" class="buttonFav"><i class="fa fa-star"></i></button> <button id="' + data.indexOf(title) + '_sadd" class="buttonReduce"><i class="fa fa-plus"></i></button></div>')
|
||||||
}
|
}
|
||||||
|
|
||||||
if(contentToPush.join("") == "") {
|
if(contentToPush.join("") == "") {
|
||||||
@ -318,12 +391,51 @@ ipc.on("findResult", (ev, list) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const titleBtn = document.getElementById(data.indexOf(title)+ "_add")
|
const titleBtn = document.getElementById(data.indexOf(title)+ "_sadd")
|
||||||
|
|
||||||
|
const favBtn = document.getElementById(data.indexOf(title)+ "_sfav")
|
||||||
|
|
||||||
titleBtn.addEventListener("click", () => {
|
titleBtn.addEventListener("click", () => {
|
||||||
searchcontent.innerHTML = ""
|
searchcontent.innerHTML = ""
|
||||||
searchBar.value = ""
|
searchBar.value = ""
|
||||||
ipc.send("addQueue", data[titleBtn.id.replace("_add", "")].uri)
|
ipc.send("addQueue", data[titleBtn.id.replace("_sadd", "")].uri)
|
||||||
|
})
|
||||||
|
|
||||||
|
favBtn.addEventListener("click", () => {
|
||||||
|
|
||||||
|
const settings = getSettings()
|
||||||
|
|
||||||
|
if(settings.favoris == null) {
|
||||||
|
|
||||||
|
settings["favoris"] = []
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var check = false
|
||||||
|
|
||||||
|
for(var song of settings.favoris) {
|
||||||
|
|
||||||
|
|
||||||
|
if(song.uri == data[favBtn.id.replace("_sfav", "")].uri) {
|
||||||
|
|
||||||
|
check = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(check == false) {
|
||||||
|
|
||||||
|
settings.favoris.push(data[favBtn.id.replace("_sfav", "")])
|
||||||
|
} else {
|
||||||
|
|
||||||
|
console.log("ALREADY ADDED")
|
||||||
|
}
|
||||||
|
|
||||||
|
saveSettings(settings)
|
||||||
|
|
||||||
|
searchDialog.close()
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +448,20 @@ ipc.on("findResult", (ev, list) => {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const path = require("path")
|
||||||
|
|
||||||
|
function getSettings() {
|
||||||
|
|
||||||
|
return require("../../settings.json")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveSettings(doc) {
|
||||||
|
|
||||||
|
fs.writeFileSync(__dirname.replace("templates" + path.sep + "app", "settings.json"), JSON.stringify(doc, null, 2))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
list.addEventListener("click", () => {
|
list.addEventListener("click", () => {
|
||||||
|
|
||||||
listDialog.showModal()
|
listDialog.showModal()
|
||||||
@ -351,6 +477,8 @@ listClose.addEventListener("click", () => {
|
|||||||
search.addEventListener("click", () => {
|
search.addEventListener("click", () => {
|
||||||
|
|
||||||
searchDialog.showModal()
|
searchDialog.showModal()
|
||||||
|
searchcontent.innerHTML = ""
|
||||||
|
searchBar.value = ""
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -473,7 +601,7 @@ ipc.on("actualize", (ev, data) => {
|
|||||||
queueNum += 1
|
queueNum += 1
|
||||||
console.log(queueNum)
|
console.log(queueNum)
|
||||||
console.log(data.queue.indexOf(title) + " - " + title.title)
|
console.log(data.queue.indexOf(title) + " - " + title.title)
|
||||||
contentToPush.push(' <div class="song"> <img class="thumbnail" src="' + title.thumbnail + '"><div class="titleSong"> <p class="listTitle">' + title.title + '</p></div> <button id="' + data.queue.indexOf(title) + '_delete" class="buttonClose"><i class="fa fa-trash"></i></button> <button id="' + data.queue.indexOf(title) + '_move" class="buttonReduce"><i class="fa fa-arrow-up"></i></button> </div></div>')
|
contentToPush.push(' <div class="song"> <img class="thumbnail" src="' + title.thumbnail + '"><div class="titleSong"> <p class="listTitle">' + title.title + '</p></div> <button id="' + data.queue.indexOf(title) + '_lmove" class="buttonReduce"><i class="fa fa-arrow-up"></i></button> <button id="' + data.queue.indexOf(title) + '_ldelete" class="buttonClose"><i class="fa fa-trash"></i></button> </div></div>')
|
||||||
}
|
}
|
||||||
|
|
||||||
if(contentToPush.join("") == "") {
|
if(contentToPush.join("") == "") {
|
||||||
@ -491,17 +619,17 @@ ipc.on("actualize", (ev, data) => {
|
|||||||
|
|
||||||
console.log(data.queue.indexOf(title) + " - " + title.title)
|
console.log(data.queue.indexOf(title) + " - " + title.title)
|
||||||
|
|
||||||
const titleBtn = document.getElementById(data.queue.indexOf(title)+ "_delete")
|
const titleBtn = document.getElementById(data.queue.indexOf(title)+ "_ldelete")
|
||||||
const moveBtn = document.getElementById(data.queue.indexOf(title)+ "_move")
|
const moveBtn = document.getElementById(data.queue.indexOf(title)+ "_lmove")
|
||||||
|
|
||||||
titleBtn.addEventListener("click", () => {
|
titleBtn.addEventListener("click", () => {
|
||||||
|
|
||||||
ipc.send("deleteQueue", titleBtn.id.replace("_delete", ""))
|
ipc.send("deleteQueue", titleBtn.id.replace("_ldelete", ""))
|
||||||
})
|
})
|
||||||
|
|
||||||
moveBtn.addEventListener("click", () => {
|
moveBtn.addEventListener("click", () => {
|
||||||
|
|
||||||
ipc.send("moveQueue", moveBtn.id.replace("_move", ""))
|
ipc.send("moveQueue", moveBtn.id.replace("_lmove", ""))
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -99,4 +99,34 @@ header {
|
|||||||
padding: 5%;
|
padding: 5%;
|
||||||
padding-top: 0;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user