Добавил сервисную страницу, небольшой рефакторинг
This commit is contained in:
@@ -37,8 +37,8 @@ QtObject {
|
||||
_get(root.serviceUrl + '/static/channels.js', root.modelLoad)
|
||||
}
|
||||
|
||||
function switchChannel(channelId) {
|
||||
_get(root.serviceUrl + '/noolite/switch/%1'.arg(channelId), function (data) {
|
||||
function sendCommand(command, channelId) {
|
||||
_get(root.serviceUrl + '/noolite/%1/%2'.arg(command).arg(channelId), function (data) {
|
||||
if (data.error) {
|
||||
root.error(qsTr("Server error: %1").arg(data.error))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user