Skip to content

Commit

Permalink
fix: de/in-crease channel buttons modify the html input
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 committed Feb 12, 2024
1 parent d79f222 commit 72c6a8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ RegisterNUICallback('increaseradiochannel', function(_, cb)
radioChannel += 1
exports['pma-voice']:setRadioChannel(radioChannel)
exports.qbx_core:Notify(locale('new_channel')..radioChannel, 'success')
cb('ok')
cb(radioChannel)
end)

RegisterNUICallback('decreaseradiochannel', function(_, cb)
Expand All @@ -173,7 +173,7 @@ RegisterNUICallback('decreaseradiochannel', function(_, cb)

exports['pma-voice']:setRadioChannel(radioChannel)
exports.qbx_core:Notify(locale('new_channel')..radioChannel, 'success')
cb('ok')
cb(radioChannel)
end)

RegisterNUICallback('toggleClicks', function(_, cb)
Expand Down
4 changes: 4 additions & 0 deletions html/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ window.addEventListener('DOMContentLoaded', function () {
body: JSON.stringify({
channel: document.getElementById("channel").value
})
}).then(response => response.json()).then(newChannel => {
document.getElementById("channel").value = newChannel;
});
});

Expand All @@ -94,6 +96,8 @@ window.addEventListener('DOMContentLoaded', function () {
body: JSON.stringify({
channel: document.getElementById("channel").value
})
}).then(response => response.json()).then(newChannel => {
document.getElementById("channel").value = newChannel;
});
});

Expand Down

0 comments on commit 72c6a8b

Please sign in to comment.