External bus and configuration opening for Web UI
This commit is contained in:
@ -13,4 +13,23 @@ window.externalApp.getExternalAuth = function(options) {
|
||||
window[options.callback](true, responseData);
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
window.externalApp.externalBus = function(message) {
|
||||
console.log("External bus message: " + message);
|
||||
var messageObj = JSON.parse(message);
|
||||
if (messageObj.type == "config/get") {
|
||||
var responseData = {
|
||||
id: messageObj.id,
|
||||
type: "result",
|
||||
success: true,
|
||||
result: {
|
||||
hasSettingsScreen: true
|
||||
}
|
||||
};
|
||||
setTimeout(function(){
|
||||
window.externalBus(responseData);
|
||||
}, 500);
|
||||
} else if (messageObj.type == "config_screen/show") {
|
||||
window.location.href = "htcmd://show-settings";
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user