Allow streamer to set vote point values
This commit is contained in:
parent
fcd8f2b197
commit
60defb7ea6
6 changed files with 133 additions and 38 deletions
|
@ -318,12 +318,27 @@ function updateColors(colors) {
|
|||
});
|
||||
}
|
||||
|
||||
function updateVotePoints(user,follower,subscriber) {
|
||||
streamerSettingsErrReset();
|
||||
fetch("/api/updateVotePoints", { method: 'POST', body: new URLSearchParams({
|
||||
user: user,
|
||||
follower: follower,
|
||||
subscriber: subscriber
|
||||
})})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
location.reload();
|
||||
} else {
|
||||
response.text().then(streamerSettingsErr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateTable();
|
||||
|
||||
document.addEventListener("keydown", function onEvent(event) {
|
||||
if (event.key === "Escape") {
|
||||
closeMessageModal();
|
||||
closeAddRequestModal();
|
||||
closeAllModals();
|
||||
}
|
||||
});
|
||||
document.getElementById("modalBackground").addEventListener("click", (e) => { if (e.target === e.currentTarget) closeAllModals();});
|
||||
|
|
|
@ -185,3 +185,14 @@ div#nav-userpic {
|
|||
#deleteRequestLink {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
#streamerSettingsMain {
|
||||
max-height: 65vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#votepoints {
|
||||
padding: 0 1.5em;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue