mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
re-added host saving. Looks like it was lost in nacl-pairing
This commit is contained in:
parent
255ab97677
commit
265c711da5
@ -73,9 +73,20 @@ function pairPushed() {
|
||||
pairingDialog.close();
|
||||
});
|
||||
sendMessage('pair', [target, randomNumber]).then(function (ret2) {
|
||||
if (ret2 === 0) {
|
||||
if (ret2 === 0) { // pairing was successful. save this host.
|
||||
$('#pairButton')[0].innerHTML = 'Paired';
|
||||
pairingDialog.close();
|
||||
var hostSelect = $('#selectHost')[0];
|
||||
for(var i = 0; i < hostSelect.length; i++) {
|
||||
if (hostSelect.options[i].value == target) return;
|
||||
}
|
||||
|
||||
var opt = document.createElement('option');
|
||||
opt.appendChild(document.createTextNode(target));
|
||||
opt.value = target;
|
||||
$('#selectHost')[0].appendChild(opt);
|
||||
hosts.push(target);
|
||||
saveHosts();
|
||||
} else {
|
||||
$('#pairButton')[0].innerHTML = 'Pairing Failed';
|
||||
document.getElementById('pairingDialogText').innerHTML = 'Error: Pairing failed with code: ' + ret2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user