diff --git a/res/app/control-panes/advanced/advanced.jade b/res/app/control-panes/advanced/advanced.jade index 0c34e9c3..3b369fd8 100644 --- a/res/app/control-panes/advanced/advanced.jade +++ b/res/app/control-panes/advanced/advanced.jade @@ -7,5 +7,3 @@ div(ng-include='"control-panes/advanced/port-forwarding/port-forwarding.jade"') .col-md-6 div(ng-include='"control-panes/advanced/maintenance/maintenance.jade"') - .col-md-6 - div(ng-include='"control-panes/advanced/remote-debug/remote-debug.jade"') diff --git a/res/app/control-panes/advanced/index.js b/res/app/control-panes/advanced/index.js index a96adab9..1c535435 100644 --- a/res/app/control-panes/advanced/index.js +++ b/res/app/control-panes/advanced/index.js @@ -5,8 +5,7 @@ module.exports = angular.module('stf.advanced', [ // require('./run-js').name, // require('./usb').name, require('./port-forwarding').name, - require('./maintenance').name, - require('./remote-debug').name + require('./maintenance').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put('control-panes/advanced/advanced.jade', diff --git a/res/app/control-panes/advanced/remote-debug/remote-debug-controller.js b/res/app/control-panes/advanced/remote-debug/remote-debug-controller.js deleted file mode 100644 index be4829ee..00000000 --- a/res/app/control-panes/advanced/remote-debug/remote-debug-controller.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function RemoteDebugCtrl($scope) { - - $scope.control.startRemoteConnect().then(function (result) { - var url = result.lastData - $scope.$apply(function () { - $scope.debugCommand = 'adb connect ' + url - }) - }) -} diff --git a/res/app/control-panes/dashboard/dashboard.jade b/res/app/control-panes/dashboard/dashboard.jade index 59a505f6..4b23b3bd 100644 --- a/res/app/control-panes/dashboard/dashboard.jade +++ b/res/app/control-panes/dashboard/dashboard.jade @@ -9,12 +9,12 @@ div(ng-include='"control-panes/dashboard/clipboard/clipboard.jade"') .row - .col-md-6(ng-if='$root.platform == "native"') + .col-md-6 div(ng-include='"control-panes/dashboard/upload/upload.jade"') .col-md-6(ng-if='$root.platform == "native"') div(ng-include='"control-panes/dashboard/shell/shell.jade"') .row - .col-md-6(ng-if='$root.platform == "native"') + .col-md-6 div(ng-include='"control-panes/dashboard/apps/apps.jade"') - - + .col-md-6 + div(ng-include='"control-panes/advanced/remote-debug/remote-debug.jade"') diff --git a/res/app/control-panes/dashboard/index.js b/res/app/control-panes/dashboard/index.js index 1c791f55..07803c39 100644 --- a/res/app/control-panes/dashboard/index.js +++ b/res/app/control-panes/dashboard/index.js @@ -3,7 +3,8 @@ module.exports = angular.module('stf.dashboard', [ require('./shell/index').name, require('./upload/index').name, require('./apps/index').name, - require('./clipboard/index').name + require('./clipboard/index').name, + require('./remote-debug/index').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put( diff --git a/res/app/control-panes/advanced/remote-debug/index.js b/res/app/control-panes/dashboard/remote-debug/index.js similarity index 100% rename from res/app/control-panes/advanced/remote-debug/index.js rename to res/app/control-panes/dashboard/remote-debug/index.js diff --git a/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js b/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js new file mode 100644 index 00000000..2c1aa81c --- /dev/null +++ b/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js @@ -0,0 +1,17 @@ +module.exports = function RemoteDebugCtrl($scope, $timeout) { + function startRemoteConnect() { + $scope.control.startRemoteConnect().then(function (result) { + var url = result.lastData + $scope.$apply(function () { + $scope.debugCommand = 'adb connect ' + url + }) + }) + } + + // TODO: Remove timeout and fix control initialization + if ($scope.control) { + startRemoteConnect() + } else { + $timeout(startRemoteConnect, 200) + } +} diff --git a/res/app/control-panes/advanced/remote-debug/remote-debug-spec.js b/res/app/control-panes/dashboard/remote-debug/remote-debug-spec.js similarity index 100% rename from res/app/control-panes/advanced/remote-debug/remote-debug-spec.js rename to res/app/control-panes/dashboard/remote-debug/remote-debug-spec.js diff --git a/res/app/control-panes/advanced/remote-debug/remote-debug.css b/res/app/control-panes/dashboard/remote-debug/remote-debug.css similarity index 100% rename from res/app/control-panes/advanced/remote-debug/remote-debug.css rename to res/app/control-panes/dashboard/remote-debug/remote-debug.css diff --git a/res/app/control-panes/advanced/remote-debug/remote-debug.jade b/res/app/control-panes/dashboard/remote-debug/remote-debug.jade similarity index 100% rename from res/app/control-panes/advanced/remote-debug/remote-debug.jade rename to res/app/control-panes/dashboard/remote-debug/remote-debug.jade