This commit is contained in:
MonkeyGG2
2023-10-07 16:41:10 -04:00
4 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -813,7 +813,7 @@
// coming soon
},
"config": {
"proxy": true, // proxy only works when self-hosted
"proxy": false, // proxy only works when self-hosted
"proxyPath": "http://localhost:8080" // absolute or relative path to proxy; proxy must be set to true for this setting to have any effect
}
}
+10
View File
@@ -191,6 +191,16 @@ body.noscript {
background-color: var(--hover-color);
}
.star {
cursor: pointer;
color: #ccc;
float: right;
}
.filled {
color: gold;
}
.searchbar {
display: flex;
width: 75%;
+6
View File
@@ -211,6 +211,12 @@ $("#sort").on("change", updateList);
dragElement(document.getElementById("gameButton"));
dragElement(document.getElementById("refresh"));
function toggleStar(event, star) {
event.preventDefault();
event.stopPropagation();
star.classList.toggle('filled');
}
/**
* Adds drag functionality to an HTML element.
*
+1 -1
View File
@@ -25,7 +25,7 @@ fetch("./config.jsonc").then((e) => e.text()).then((jsonc) => {
let gamesList = $("#gamesList");
for (game in games) {
gamesList.append(`<li url="games/${games[game]["path"]}" ${games[game]["aliases"] ? "aliases=\"" + games[game]["aliases"].join(',') + "\"" : ''}>${game}</li>`);
gamesList.append(`<li url="games/${games[game]["path"]}" ${games[game]["aliases"] ? "aliases=\"" + games[game]["aliases"].join(',') + "\"" : ''}>${game} <span class="star" onclick="toggleStar(event, this)">★</span> </li>`);
}
$("#gamesList li").on("click", function() {