diff --git a/res/app/control-panes/advanced/advanced-controller.js b/res/app/control-panes/advanced/advanced-controller.js new file mode 100644 index 00000000..b33cdfc2 --- /dev/null +++ b/res/app/control-panes/advanced/advanced-controller.js @@ -0,0 +1,3 @@ +module.exports = function AdvancedCtrl($scope) { + +} diff --git a/res/app/control-panes/advanced/advanced-spec.js b/res/app/control-panes/advanced/advanced-spec.js new file mode 100644 index 00000000..b0081bdb --- /dev/null +++ b/res/app/control-panes/advanced/advanced-spec.js @@ -0,0 +1,17 @@ +describe('AdvancedCtrl', function () { + + beforeEach(module('stf.advanced')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('AdvancedCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/advanced/advanced.css b/res/app/control-panes/advanced/advanced.css new file mode 100644 index 00000000..73e29f15 --- /dev/null +++ b/res/app/control-panes/advanced/advanced.css @@ -0,0 +1,3 @@ +.stf-advanced { + +} \ No newline at end of file diff --git a/res/app/control-panes/advanced/advanced.jade b/res/app/control-panes/advanced/advanced.jade new file mode 100644 index 00000000..824f8775 --- /dev/null +++ b/res/app/control-panes/advanced/advanced.jade @@ -0,0 +1,5 @@ +.row + .col-md-12 + div(ng-include='"control-panes/advanced/run-js/run-js.jade"') + .col-md-6 + div(ng-include='"control-panes/advanced/input/input.jade"') diff --git a/res/app/control-panes/advanced/index.js b/res/app/control-panes/advanced/index.js new file mode 100644 index 00000000..462096a9 --- /dev/null +++ b/res/app/control-panes/advanced/index.js @@ -0,0 +1,13 @@ +require('./advanced.css') + +module.exports = angular.module('stf.advanced', [ + require('./input').name, + require('./run-js').name, + require('./usb').name +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/advanced/advanced.jade', + require('./advanced.jade') + ) + }]) + .controller('AdvancedCtrl', require('./advanced-controller')) diff --git a/res/app/control-panes/advanced/input/index.js b/res/app/control-panes/advanced/input/index.js new file mode 100644 index 00000000..7c254ea6 --- /dev/null +++ b/res/app/control-panes/advanced/input/index.js @@ -0,0 +1,11 @@ +require('./input.css') + +module.exports = angular.module('stf.advanced.input', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/advanced/input/input.jade', + require('./input.jade') + ) + }]) + .controller('InputAdvancedCtrl', require('./input-controller')) diff --git a/res/app/control-panes/advanced/input/input-controller.js b/res/app/control-panes/advanced/input/input-controller.js new file mode 100644 index 00000000..606e83de --- /dev/null +++ b/res/app/control-panes/advanced/input/input-controller.js @@ -0,0 +1,3 @@ +module.exports = function InputCtrl($scope) { + +} diff --git a/res/app/control-panes/advanced/input/input-spec.js b/res/app/control-panes/advanced/input/input-spec.js new file mode 100644 index 00000000..c134c22e --- /dev/null +++ b/res/app/control-panes/advanced/input/input-spec.js @@ -0,0 +1,17 @@ +describe('InputCtrl', function () { + + beforeEach(module('stf.input')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('InputCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/advanced/input/input.css b/res/app/control-panes/advanced/input/input.css new file mode 100644 index 00000000..9d95a16d --- /dev/null +++ b/res/app/control-panes/advanced/input/input.css @@ -0,0 +1,3 @@ +.stf-input { + +} \ No newline at end of file diff --git a/res/app/control-panes/advanced/input/input.jade b/res/app/control-panes/advanced/input/input.jade new file mode 100644 index 00000000..cb0df9dc --- /dev/null +++ b/res/app/control-panes/advanced/input/input.jade @@ -0,0 +1,114 @@ +.widget-container.fluid-height(ng-controller='InputAdvancedCtrl') + .heading + i.fa.fa-gear + span(translate) Advanced Input + .widget-content.padded + div + h6(translate) Special Keys + div.special-keys-buttons + button(title='Power', ng-click='press("KEYCODE_POWER")').btn.btn-danger + i.fa.fa-power-off + button(title='Camera', ng-click='press("KEYCODE_CAMERA")').btn.btn-primary + i.fa.fa-camera + button(title='Switch Charset', ng-click='press("KEYCODE_SWITCH_CHARSET")').btn.btn-primary.btn-info + i.fa Aa + button(title='Search', ng-click='press("KEYCODE_SEARCH")').btn.btn-primary + i.fa.fa-search + + h6(translate) Volume + .btn-group + button(title='Mute', ng-click='press("KEYCODE_MUTE")').btn.btn-primary.btn-xs + i.fa.fa-volume-off + button(title='Volume Down', ng-click='press("KEYCODE_VOLUME_DOWN")').btn.btn-primary.btn-xs + i.fa.fa-volume-down + button(title='Volume Up', ng-click='press("KEYCODE_VOLUME_UP")').btn.btn-primary.btn-xs + i.fa.fa-volume-up + + h6(translate) Media + .btn-group + button(title='Rewind', ng-click='press("KEYCODE_MEDIA_REWIND")').btn.btn-primary.btn-xs + i.fa.fa-fast-backward + button(title='Previous', ng-click='press("KEYCODE_MEDIA_PREVIOUS")').btn.btn-primary.btn-xs + i.fa.fa-step-backward + button(title='Play/Pause', ng-click='press("KEYCODE_MEDIA_PLAY_PAUSE")').btn.btn-primary.btn-xs + i.fa.fa-youtube-play + button(title='Stop', ng-click='press("KEYCODE_MEDIA_STOP")').btn.btn-primary.btn-xs + i.fa.fa-stop + button(title='Next', ng-click='press("KEYCODE_MEDIA_NEXT")').btn.btn-primary.btn-xs + i.fa.fa-step-forward + button(title='Fast Forward', ng-click='press("KEYCODE_MEDIA_FAST_FORWARD")').btn.btn-primary.btn-xs + i.fa.fa-fast-forward + //h6 Physical Media + //.btn-group + button(title='Play', ng-click='press("KEYCODE_MEDIA_PLAY")').btn.btn-primary.btn-xs + i.fa.fa-play + button(title='Pause', ng-click='press("KEYCODE_MEDIA_PAUSE")').btn.btn-primary.btn-xs + i.fa.fa-pause + button(title='Close', ng-click='press("KEYCODE_MEDIA_CLOSE")').btn.btn-primary.btn-xs + i.fa.fa-sign-out + button(title='Eject', ng-click='press("KEYCODE_MEDIA_EJECT")').btn.btn-primary.btn-xs + i.fa.fa-eject + button(title='Record', ng-click='press("KEYCODE_MEDIA_RECORD")').btn.btn-primary.btn-xs + i.fa.fa-circle + h6(translate) Other Keys + div.special-other-keys-buttons + button(ng-click='press("KEYCODE_APP_SWITCH")').btn.btn-default.btn-xs + i.fa App Switch + button(ng-click='press("KEYCODE_MANNER_MODE")').btn.btn-default.btn-xs + i.fa Manner Mode + button(ng-click='press("KEYCODE_3D_MODE")').btn.btn-default.btn-xs + i.fa 3D Mode + button(ng-click='press("KEYCODE_CONTACTS")').btn.btn-default.btn-xs + i.fa Contacts + button(ng-click='press("KEYCODE_CALENDAR")').btn.btn-default.btn-xs + i.fa Calendar + button(ng-click='press("KEYCODE_MUSIC")').btn.btn-default.btn-xs + i.fa Music + button(ng-click='press("KEYCODE_CALCULATOR")').btn.btn-default.btn-xs + i.fa Calculator + button(ng-click='press("KEYCODE_ZENKAKU_HANKAKU")').btn.btn-default.btn-xs + i.fa 全角/半角 + button(ng-click='press("KEYCODE_EISU")').btn.btn-default.btn-xs + i.fa 英数 + button(ng-click='press("KEYCODE_MUHENKAN")').btn.btn-default.btn-xs + i.fa 無変換 + button(ng-click='press("KEYCODE_HENKAN")').btn.btn-default.btn-xs + i.fa 変換 + button(ng-click='press("KEYCODE_KATAKANA_HIRAGANA")').btn.btn-default.btn-xs + i.fa カタかナ/ひらがな + button(ng-click='press("KEYCODE_YEN")').btn.btn-default.btn-xs + i.fa ¥ + button(ng-click='press("KEYCODE_RO")').btn.btn-default.btn-xs + i.fa RO + button(ng-click='press("KEYCODE_KANA")').btn.btn-default.btn-xs + i.fa かな + button(ng-click='press("KEYCODE_ASSIST")').btn.btn-default.btn-xs + i.fa Assist + //button(title='Switch Charset', ng-click='press(80)').btn.btn-primary + i.fa TST + //button(ng-click='press("KEYCODE_CLEAR")').btn.btn-primary.btn-sm + i.fa Clear + h6 D-pad + table.special-keys-dpad-buttons + tr + td + td + button(title='D-pad Up', ng-click='press("KEYCODE_DPAD_UP")').btn.btn-info.btn-xs + i.fa.fa-chevron-up + td + tr + td + button(title='D-pad Left', ng-click='press("KEYCODE_DPAD_LEFT")').btn.btn-info.btn-xs + i.fa.fa-chevron-left + td + button(title='D-pad Center', ng-click='press("KEYCODE_DPAD_CENTER")').btn.btn-info.btn-xs + i.fa.fa-circle-o + td + button(title='D-pad Right', ng-click='press("KEYCODE_DPAD_RIGHT")').btn.btn-info.btn-xs + i.fa.fa-chevron-right + tr + td + td + button(title='D-pad Down', ng-click='press("KEYCODE_DPAD_DOWN")').btn.btn-info.btn-xs + i.fa.fa-chevron-down + td \ No newline at end of file diff --git a/res/app/control-panes/advanced/run-js/index.js b/res/app/control-panes/advanced/run-js/index.js new file mode 100644 index 00000000..8f03a4cf --- /dev/null +++ b/res/app/control-panes/advanced/run-js/index.js @@ -0,0 +1,11 @@ +require('./run-js.css') + +module.exports = angular.module('stf.run-js', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/advanced/run-js/run-js.jade', + require('./run-js.jade') + ) + }]) + .controller('RunJsCtrl', require('./run-js-controller')) diff --git a/res/app/control-panes/advanced/run-js/run-js-controller.js b/res/app/control-panes/advanced/run-js/run-js-controller.js new file mode 100644 index 00000000..7c940582 --- /dev/null +++ b/res/app/control-panes/advanced/run-js/run-js-controller.js @@ -0,0 +1,3 @@ +module.exports = function RunJsCtrl($scope) { + +} diff --git a/res/app/control-panes/advanced/run-js/run-js-spec.js b/res/app/control-panes/advanced/run-js/run-js-spec.js new file mode 100644 index 00000000..3ce17fb3 --- /dev/null +++ b/res/app/control-panes/advanced/run-js/run-js-spec.js @@ -0,0 +1,17 @@ +describe('RunJsCtrl', function () { + + beforeEach(module('stf.run-js')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('RunJsCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/advanced/run-js/run-js.css b/res/app/control-panes/advanced/run-js/run-js.css new file mode 100644 index 00000000..e6bd1c93 --- /dev/null +++ b/res/app/control-panes/advanced/run-js/run-js.css @@ -0,0 +1,3 @@ +.stf-run-js { + +} \ No newline at end of file diff --git a/res/app/control-panes/advanced/run-js/run-js.jade b/res/app/control-panes/advanced/run-js/run-js.jade new file mode 100644 index 00000000..4b1b272a --- /dev/null +++ b/res/app/control-panes/advanced/run-js/run-js.jade @@ -0,0 +1,90 @@ +.stf-run.js(ng-if='$root.platform == "web" && $root.browser == "webview"') + .widget-container.fluid-height(ng-controller='InjectJavaScriptCtrl') + .heading + i.fa.fa-code + span(translate) Run JavaScript + //form.form-inline + .btn-group + //button(ng-disabled='true').btn.btn-sm.btn-default-outline + i.fa.fa-upload + | Load File... + script(type='text/ng-template', id='saveSnippetModal.html') + .modal-header + h2 Save snippet + .modal-body + p Save as: + input(type='text', ng-model='result', required, autofocus, ng-autoselect='true') + .modal-footer + button(ng-click='$dismiss("cancel")').btn.btn-default Cancel + button(ng-click='$close(result)', ng-disabled='!result').btn.btn-primary Save + button(ng-click='saveDialog()', ng-disabled='!snippet.editorText').btn.btn-sm.btn-default-outline + i.fa.fa-save + span(translate) Save... + button(type='button', + ng-disabled='!hasSnippets()').btn.btn-sm.btn-default-outline.dropdown-toggle + span.caret + ul.dropdown-menu.pull-right + li(ng-repeat='snip in snippets') + a(ng-click='openSnippet(snip)').btn-link {{snip.name}} + li.divider + li + a(ng-click='clearSnippets()', type='button', translate).btn-link Clear + //span.form-inline.form-group.unselectable + .checkbox + label + input(type='checkbox', ng-model='snippet.safe') + span(tooltip='Execute code in a safe way') Safe + span + .checkbox + label + input(type='checkbox', nxg-model='snippet.evaluate') + span(tooltip='Evaluate code') Evaluate + .checkbox + label + input(type='checkbox', ng-model='snippet.async') + span(tooltip='Execute code in an async way') Async + .checkbox + label + input(type='checkbox', ng-model='snippet.scriptTag', ng-disabled='true') + span(tooltip='{{scriptTagPopover}}') Script tag + .btn-group.pull-right + button.btn.btn-sm.btn-primary-outline(ng-click='injectJS()', ng-disabled='!snippet.editorText') + i.fa.fa-play + span(translate) Run + .widget-content.padded + p + div(ui-ace="aceOptions", scope-instance='editorInstance', ng-model='snippet.editorText').stf-ace-editor + div(ng-controller='ReturnJavaScriptCtrl') + tabset.unselectable(ng-show='results.length') + tab(heading='Results') + table.table.table-hover(ng-table='tableParams').selectable + tr(ng-repeat='result in $data') + td(width='30%', title="'Device'", sortable='deviceName') + img(ng-src='{{ result.deviceImage }}').device-icon-smallest + span {{ result.deviceName }} + td(width='30%', title="'Returns'", sortable='prettyValue') + div(ng-show='result.isObject') + //ace-json-viewer(ng-model='result.prettyValue') + //div(ui-ace="miniAceOptions", ng-model='result.prettyValue').stf-mini-ace-viewer + code.value-next-to-progress {{ result.prettyValue }} + div(ng-hide='result.isObject') + .value-next-to-progress {{ result.value }} + td(width='40%', ng-show='result.isSpecialValue') + div(ng-show='result.isNumber') + //progressbar.table-progress(value='result.percentage', max='100') + div(ng-show='result.isObject') + div.label.label-info Object + div(ng-show='result.isFunction') + div.label.label-info Function + div(ng-show='result.isArray') + div.label.label-info Array + div(ng-show='result.isNull') + div.label Null + div(ng-show='result.isBoolean') + div.label(style='width=100%', ng-class="{'label-success': result.value, 'label-important': !result.value}") + i.fa(ng-class="{'fa-check': result.value, 'fa-times-circle': !result.value }") + span {{ result.value.toString() }} + //span {{ result.value.toString() | capitalize }} + tab(heading='Raw') + pre.selectable {{results | json}} + clear-button(ng-click='clear()', ng-disabled='!results.length') diff --git a/res/app/control-panes/advanced/usb/index.js b/res/app/control-panes/advanced/usb/index.js new file mode 100644 index 00000000..8fdd0918 --- /dev/null +++ b/res/app/control-panes/advanced/usb/index.js @@ -0,0 +1,11 @@ +require('./usb.css') + +module.exports = angular.module('stf.usb', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/advanced/usb/usb.jade', + require('./usb.jade') + ) + }]) + .controller('UsbCtrl', require('./usb-controller')) diff --git a/res/app/control-panes/advanced/usb/usb-controller.js b/res/app/control-panes/advanced/usb/usb-controller.js new file mode 100644 index 00000000..09ee2aed --- /dev/null +++ b/res/app/control-panes/advanced/usb/usb-controller.js @@ -0,0 +1,3 @@ +module.exports = function UsbCtrl($scope) { + +} diff --git a/res/app/control-panes/advanced/usb/usb-spec.js b/res/app/control-panes/advanced/usb/usb-spec.js new file mode 100644 index 00000000..98dfe375 --- /dev/null +++ b/res/app/control-panes/advanced/usb/usb-spec.js @@ -0,0 +1,17 @@ +describe('UsbCtrl', function () { + + beforeEach(module('stf.usb')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('UsbCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/advanced/usb/usb.css b/res/app/control-panes/advanced/usb/usb.css new file mode 100644 index 00000000..05f22f46 --- /dev/null +++ b/res/app/control-panes/advanced/usb/usb.css @@ -0,0 +1,3 @@ +.stf-usb { + +} \ No newline at end of file diff --git a/res/app/control-panes/advanced/usb/usb.jade b/res/app/control-panes/advanced/usb/usb.jade new file mode 100644 index 00000000..a565fd5e --- /dev/null +++ b/res/app/control-panes/advanced/usb/usb.jade @@ -0,0 +1,6 @@ +.widget-container.fluid-height.stf-usb + .heading + i.fa + span(translate) Usb speed + .widget-content.padded + div \ No newline at end of file diff --git a/res/app/control-panes/control-panes-controller.js b/res/app/control-panes/control-panes-controller.js index 5dfdb4cb..9cb0146e 100644 --- a/res/app/control-panes/control-panes-controller.js +++ b/res/app/control-panes/control-panes-controller.js @@ -4,31 +4,31 @@ module.exports = function ControlPanesCtrl($scope, gettext) { { title: gettext('Screenshots'), icon: 'fa-camera', - templateUrl: 'settings/notifications/notifications.jade', + templateUrl: 'control-panes/screenshots/screenshots.jade', filters: ['native', 'web'] }, { title: gettext('Inspect'), icon: 'fa-pencil', - templateUrl: 'settings/notifications/notifications.jade', + templateUrl: 'control-panes/inspect/inspect.jade', filters: ['web'] }, { title: gettext('Resources'), icon: 'fa-globe', - templateUrl: 'settings/notifications/notifications.jade', + templateUrl: 'control-panes/resources/resources.jade', filters: ['web'] }, { title: gettext('CPU'), icon: 'fa-bar-chart-o', - templateUrl: 'settings/notifications/notifications.jade', + templateUrl: 'control-panes/cpu/cpu.jade', filters: ['native', 'web'] }, { title: gettext('Advanced'), icon: 'fa-bolt', - templateUrl: 'settings/notifications/notifications.jade', + templateUrl: 'control-panes/advanced/advanced.jade', filters: ['native', 'web'] } ] @@ -46,7 +46,7 @@ module.exports = function ControlPanesCtrl($scope, gettext) { { title: gettext('Logs'), icon: 'fa-list-alt', - templateUrl: 'settings/local/local-settings.jade', + templateUrl: 'control-panes/logs/logs.jade', filters: ['native', 'web'] } ].concat(angular.copy(sharedTabs)) diff --git a/res/app/control-panes/cpu/cpu-controller.js b/res/app/control-panes/cpu/cpu-controller.js new file mode 100644 index 00000000..c93988bb --- /dev/null +++ b/res/app/control-panes/cpu/cpu-controller.js @@ -0,0 +1,3 @@ +module.exports = function CpuCtrl($scope) { + +} diff --git a/res/app/control-panes/cpu/cpu-spec.js b/res/app/control-panes/cpu/cpu-spec.js new file mode 100644 index 00000000..1245417a --- /dev/null +++ b/res/app/control-panes/cpu/cpu-spec.js @@ -0,0 +1,17 @@ +describe('CpuCtrl', function () { + + beforeEach(module('stf.cpu')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('CpuCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/cpu/cpu.css b/res/app/control-panes/cpu/cpu.css new file mode 100644 index 00000000..1ea75630 --- /dev/null +++ b/res/app/control-panes/cpu/cpu.css @@ -0,0 +1,3 @@ +.stf-cpu { + +} \ No newline at end of file diff --git a/res/app/control-panes/cpu/cpu.jade b/res/app/control-panes/cpu/cpu.jade new file mode 100644 index 00000000..1bc5d4cc --- /dev/null +++ b/res/app/control-panes/cpu/cpu.jade @@ -0,0 +1,10 @@ +.widget-container.fluid-height.stf-cpu(ng-controller='CpuCtrl') + .widget-content.padded + //nothing-to-show(show='!data', message='No CPU info', icon='fa-bar-chart-o') + div.overflow-x + ul + li(ng-repeat="(id, stats) in data") + span {{ stats.deviceName }} + ul + li(ng-repeat="(cpu, load) in stats.loads") + span {{cpu}}: {{load.user + load.nice + load.system}}% \ No newline at end of file diff --git a/res/app/control-panes/cpu/index.js b/res/app/control-panes/cpu/index.js new file mode 100644 index 00000000..b88f08ab --- /dev/null +++ b/res/app/control-panes/cpu/index.js @@ -0,0 +1,11 @@ +require('./cpu.css') + +module.exports = angular.module('stf.cpu', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/cpu/cpu.jade', + require('./cpu.jade') + ) + }]) + .controller('CpuCtrl', require('./cpu-controller')) diff --git a/res/app/control-panes/index.js b/res/app/control-panes/index.js index 44251b54..57ff2463 100644 --- a/res/app/control-panes/index.js +++ b/res/app/control-panes/index.js @@ -2,10 +2,15 @@ require('fa-borderlayout') require('fa-borderlayout/build-0.3.1/borderLayout.css') require('fa-borderlayout/build-0.3.1/stf-style.css') - module.exports = angular.module('control-panes', [ require('stf/common-ui/nice-tabs').name, - require('./dashboard').name + require('./advanced').name, + require('./cpu').name, + require('./dashboard').name, + require('./inspect').name, + require('./logs').name, + require('./resources').name, + require('./screenshots').name ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/control-panes', { diff --git a/res/app/control-panes/inspect/index.js b/res/app/control-panes/inspect/index.js new file mode 100644 index 00000000..d73c5403 --- /dev/null +++ b/res/app/control-panes/inspect/index.js @@ -0,0 +1,11 @@ +require('./inspect.css') + +module.exports = angular.module('stf.inspect', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/inspect/inspect.jade', + require('./inspect.jade') + ) + }]) + .controller('InspectCtrl', require('./inspect-controller')) diff --git a/res/app/control-panes/inspect/inspect-controller.js b/res/app/control-panes/inspect/inspect-controller.js new file mode 100644 index 00000000..891b5de8 --- /dev/null +++ b/res/app/control-panes/inspect/inspect-controller.js @@ -0,0 +1,3 @@ +module.exports = function InspectCtrl($scope) { + +} diff --git a/res/app/control-panes/inspect/inspect-spec.js b/res/app/control-panes/inspect/inspect-spec.js new file mode 100644 index 00000000..9c6e2018 --- /dev/null +++ b/res/app/control-panes/inspect/inspect-spec.js @@ -0,0 +1,17 @@ +describe('InspectCtrl', function () { + + beforeEach(module('stf.inspect')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('InspectCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/inspect/inspect.css b/res/app/control-panes/inspect/inspect.css new file mode 100644 index 00000000..56cf7af9 --- /dev/null +++ b/res/app/control-panes/inspect/inspect.css @@ -0,0 +1,3 @@ +.stf-inspect { + +} \ No newline at end of file diff --git a/res/app/control-panes/inspect/inspect.jade b/res/app/control-panes/inspect/inspect.jade new file mode 100644 index 00000000..73f58a2f --- /dev/null +++ b/res/app/control-panes/inspect/inspect.jade @@ -0,0 +1,22 @@ +.stf-inspect(ng-controller='InspectCtrl') + nothing-to-show(ng-if='$root.browser != "webview"', message='{{"Inspecting is currently only supported in WebView"|translate}}', icon='fa-search-plus') + .something-white(ng-if='$root.browser == "webview"') + //.btn-group.padded + button.btn.btn-sm.btn-primary(ng-click='inspect()') + i.fa.fa-bug + span(translate) Inspect Current Page + nothing-to-show(ng-if='!results.length', message='{{"Nothing to inspect"|translate}}', icon='fa-search-plus') + + table.table.table-striped(ng-table='tableParams', ng-show='results.length').selectable + tr(ng-repeat='result in $data') + td(title='"Device"|translate', sortable='deviceName') + img(ng-src='{{ result.deviceImage }}').device-icon-smallest + span {{ result.deviceName }} + td(title='"Inspector"|translate') + button(ng-click='setUrl(result.value.clientUrl)').btn.btn-primary + i.fa.fa-search-plus + span(translate) Inspect Device + //a.btn.btn-primary(href='{{ result.value.clientUrl}}', target='_blank') + i.fa.fa-share-alt Launch + .weinre-window(ng-show='urlToShow') + iframe.weinre-content(type='text/html', width='100%', height='100%', ng-src='{{trustSrc(urlToShow)}}', frameborder='0') \ No newline at end of file diff --git a/res/app/control-panes/logs/index.js b/res/app/control-panes/logs/index.js new file mode 100644 index 00000000..1010dc5c --- /dev/null +++ b/res/app/control-panes/logs/index.js @@ -0,0 +1,11 @@ +require('./logs.less') + +module.exports = angular.module('stf.logs', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/logs/logs.jade', + require('./logs.jade') + ) + }]) + .controller('LogsCtrl', require('./logs-controller')) diff --git a/res/app/control-panes/logs/logs-controller.js b/res/app/control-panes/logs/logs-controller.js new file mode 100644 index 00000000..26be58b5 --- /dev/null +++ b/res/app/control-panes/logs/logs-controller.js @@ -0,0 +1,3 @@ +module.exports = function LogsCtrl($scope) { + +} diff --git a/res/app/control-panes/logs/logs-spec.js b/res/app/control-panes/logs/logs-spec.js new file mode 100644 index 00000000..a638d72a --- /dev/null +++ b/res/app/control-panes/logs/logs-spec.js @@ -0,0 +1,17 @@ +describe('LogsCtrl', function () { + + beforeEach(module('stf.logs')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('LogsCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/logs/logs.jade b/res/app/control-panes/logs/logs.jade new file mode 100644 index 00000000..effacae4 --- /dev/null +++ b/res/app/control-panes/logs/logs.jade @@ -0,0 +1,75 @@ +.stf-logs(ng-controller='LogsCtrl') + .widget-container.fluid-height + //.heading + .form-inline + button(ng-click='toggle()', ng-class="{active: started}", title='Start/Stop Logging').btn.btn-sm.btn-primary-outline + i.fa.fa-list-alt + span {{ started ? 'Stop Logging' : 'Start Logging' }} + + clear-button(ng-click='clear()', ng-disabled='!hasLines') + + label.checkbox.pull-right + input(type='checkbox', ng-model='autoScroll') + span Auto Scroll + + .widget-content + //nothing-to-show(ng-show='!hasLines', message='No logs captured', icon='fa-list-alt') + + //table.table.table-condensed(ng-show='filtering.show') + + table.table.table-condensed.logcat-filters-table(ng-show='true') + //tr + th(width='4%')//Line + th(width='10%') Device + th(width='8%') Level + th(width='8%') Time + th(width='4%') PID + th(width='4%') TID + th(width='10%') App + th(width='16%') Tag + th(width='46%') Text + tr + td(width='0') + button(ng-model='started', btn-checkbox, title='{{"Start/Stop Logging"|translate}}').btn.btn-xs.btn-primary-outline + i.fa.fa-list-alt + span(ng-if='started') {{"Stop"|translate}} + span(ng-if='!started') {{"Get"|translate}} + td(width='10%') + select(ng-model='filtering.deviceName', ng-options='d for d in filtering.devicesList') + option(value='') {{"Device"|translate}} + td(width='6%') + select(ng-model='filtering.levelNumber', ng-options='l.name for l in filtering.levelNumbers') + option(value='') {{"Level"|translate}} + td(width='10%') + input(ng-model='filtering.date', type='text', placeholder='{{"Time"|translate}}') + td(width='8%', ng-if='$root.platform == "native"') + input(ng-model='filtering.pid', type='text', placeholder='{{"PID"|translate}}') + td(width='8%', ng-if='$root.platform == "native"') + input(ng-model='filtering.tid', type='text', placeholder='{{"TID"|translate}}') + td(width='14%', ng-if='$root.platform == "native"') + input(ng-model='filtering.app', type='text', placeholder='{{"App"|translate}}') + td(width='14%', ng-if='$root.platform == "native"') + input(ng-model='filtering.tag', type='text', placeholder='{{"Tag"|translate}}') + td(width='40%') + input(ng-model='filtering.message', type='text', placeholder='{{"Text"|translate}}') + td(width='0') + button(ng-click='clear()', ng-disabled='false', title='{{"Clear"|translate}}').btn.btn-xs.btn-danger-outline + i.fa.fa-trash-o + span(translate) Clear + + #logcatParent.force-gpu + table#logcatTable.console-message-text.tableX.table-condensedX.selectableX + //thead + tr + th(width='4%') + th(width='10%') + th(width='8%') + th(width='8%') + th(width='4%') + th(width='4%') + th(width='10%') + th(width='16%') + th(width='46%') + tbody#logcatBody + + br \ No newline at end of file diff --git a/res/app/control-panes/logging/logging.css b/res/app/control-panes/logs/logs.less similarity index 57% rename from res/app/control-panes/logging/logging.css rename to res/app/control-panes/logs/logs.less index c5b7a2f1..57a21b4e 100644 --- a/res/app/control-panes/logging/logging.css +++ b/res/app/control-panes/logs/logs.less @@ -1,9 +1,11 @@ -#logcatSingle { +.stf-logs { + + #logcatSingle { height: 600px; overflow-y: auto; -} + } -#logcatParent { + #logcatParent { background: #fff; position: absolute; top: 69px; @@ -13,83 +15,85 @@ overflow-y: auto; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /*z-index: -10;*/ -} + } -#logcatTable { + #logcatTable { table-layout: fixed !important; -} + } -.logcat-filters-table { + .logcat-filters-table { margin-bottom: 0; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); -} + } -.logcat-filters-table .btn { + .logcat-filters-table .btn { margin: 0; -} + } -.logcat-filters-table thead>tr>th, -.logcat-filters-table tbody>tr>th, -.logcat-filters-table tfoot>tr>th, -.logcat-filters-table thead>tr>td, -.logcat-filters-table tbody>tr>td, -.logcat-filters-table tfoot>tr>td { + .logcat-filters-table thead > tr > th, + .logcat-filters-table tbody > tr > th, + .logcat-filters-table tfoot > tr > th, + .logcat-filters-table thead > tr > td, + .logcat-filters-table tbody > tr > td, + .logcat-filters-table tfoot > tr > td { border-top: none; -} + } -#logcatBody tr { + #logcatBody tr { border-bottom: 1px solid rgb(240, 240, 240); -} + } -#logcatBody td { + #logcatBody td { padding-left: 5px; padding-right: 5px; -} + } -.console-message-text { + .console-message-text { font-size: 11px !important; font-family: Menlo, monospace; white-space: pre-wrap; -} + } -.console-message-text td { + .console-message-text td { /*color: rgb(48, 57, 66);*/ -} + } -/** - Logging colors -*/ + /** + Logging colors + */ -.log-unknown { + .log-unknown { color: bisque; -} + } -.log-default, .log-silent { + .log-default, .log-silent { color: darkolivegreen; -} + } -.log-verbose { + .log-verbose { color: blueviolet; -} + } -.log-debug { + .log-debug { color: rgb(48, 57, 66); -} + } -.log-info { + .log-info { color: blue; -} + } -.log-warn { + .log-warn { color: coral; -} + } -.log-error { + .log-error { color: red; -} + } -.log-fatal { + .log-fatal { color: darkcyan; + } + } /*#logcatMax {*/ diff --git a/res/app/control-panes/resources/index.js b/res/app/control-panes/resources/index.js new file mode 100644 index 00000000..012adcfc --- /dev/null +++ b/res/app/control-panes/resources/index.js @@ -0,0 +1,11 @@ +require('./resources.css') + +module.exports = angular.module('stf.resources', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/resources/resources.jade', + require('./resources.jade') + ) + }]) + .controller('ResourcesCtrl', require('./resources-controller')) diff --git a/res/app/control-panes/resources/resources-controller.js b/res/app/control-panes/resources/resources-controller.js new file mode 100644 index 00000000..fce649e4 --- /dev/null +++ b/res/app/control-panes/resources/resources-controller.js @@ -0,0 +1,3 @@ +module.exports = function ResourcesCtrl($scope) { + +} diff --git a/res/app/control-panes/resources/resources-spec.js b/res/app/control-panes/resources/resources-spec.js new file mode 100644 index 00000000..328278e3 --- /dev/null +++ b/res/app/control-panes/resources/resources-spec.js @@ -0,0 +1,17 @@ +describe('ResourcesCtrl', function () { + + beforeEach(module('stf.resources')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('ResourcesCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/resources/resources.css b/res/app/control-panes/resources/resources.css new file mode 100644 index 00000000..293bbd8c --- /dev/null +++ b/res/app/control-panes/resources/resources.css @@ -0,0 +1,3 @@ +.stf-resources { + +} \ No newline at end of file diff --git a/res/app/control-panes/resources/resources.jade b/res/app/control-panes/resources/resources.jade new file mode 100644 index 00000000..1b6811ac --- /dev/null +++ b/res/app/control-panes/resources/resources.jade @@ -0,0 +1,65 @@ +.widget-container.fluid-height(ng-controller='ResourcesCtrl') + .heading + i.fa.fa-certificate + span(translate) Cookies + button.btn.btn-sm.btn-primary-outline(ng-click='getCookies()') + i.fa.fa-download + span(translate) Get + + button.btn.btn-sm.btn-danger-outline(ng-click='deleteAllCookies()', ng-disabled='true') + i.fa.fa-times(translate) + span(translate) Delete + + button.btn.btn-sm.btn-primary-outline(ng-click='enableAddCookie()', ng-disabled='true') + i.fa(ng-class="newCookieEnabled ? 'fa-chevron-circle-up' : 'fa-chevron-circle-down'") + span(translate) Set + + clear-button(ng-click='clearResults()', ng-disabled='!cookieContainer.results.length') + + .widget-content.padded.overflow-x + nothing-to-show(ng-show='!cookieContainer.results.length', message='{{"No cookies to show"|translate}}', icon='fa-certificate') + + div(ng-show='cookieContainer.results.length') + ul.cookies-list(ng-show='newCookieEnabled') + li + h4 + span(translate) Set Cookie + form + table.table.table-condensed(ng-table='cookieContainer.tableParams').selectable + tr + td(width='20%', data-title="'Name'|translate", required='true') + input(select-on-click, ng-model='newCookie.name') + td(width='50%', data-title="'Value'|translate", ng-required='true') + input(select-on-click, ng-model='newCookie.value') + td(width='15%', data-title="'Domain'|translate") + input(select-on-click, ng-model='newCookie.domain', placeholder='http') + td(width='10%', data-title="'Path'|translate") + input(select-on-click, ng-model='newCookie.path', placeholder='/') + //td(width='5%', data-title="'Expires'") + span(contenteditable="true") {{ newCookie.expiry }} + td(width='5%', data-title="'Secure'|translate") + input(type='checkbox', indeterminate='true', ng-model='newCookie.secure') + td(title="'Add'|translate") + button.btn.btn-default(ng-click='addCookie()') + i.fa.fa-plus-circle + //| Add + + //table.table.table-hover.table-condensed(ng-table='tableParams') + tbody(ng-repeat='group in $groups') + tr.ng-table-group + td(colspan='{{$columns.length}}').unselectable.pointer + a(ng-click='group.$hideRows = !group.$hideRows') + img(ng-src='{{ group.data[0].deviceImage }}').device-icon-smallest + //i.fa(ng-class='{"fa-chevron-right": group.$hideRows, "fa-chevron-down": !group.$hideRows}') + strong {{group.value}} + tr(ng-hide='group.$hideRows', ng-repeat='cookie in group.data') + td(sortable='name', data-title="'Name'|translate") + strong {{cookie.name}} + td(width='50%', sortable='value', data-title="'Value'|translate") + span {{cookie.value}} + td(width='15%', sortable='domain', data-title="'Domain'|translate") + span {{cookie.domain}} + td(idth='10%', sortable='path', data-title="'Path'|translate") + span {{cookie.path}} + td(idth='5%', sortable='secure', data-title="'Secure'|translate") + span {{cookie.secure ? 'Yes' : 'No'}} diff --git a/res/app/control-panes/screenshots/index.js b/res/app/control-panes/screenshots/index.js new file mode 100644 index 00000000..bd20919b --- /dev/null +++ b/res/app/control-panes/screenshots/index.js @@ -0,0 +1,11 @@ +require('./screenshots.css') + +module.exports = angular.module('stf.screenshots', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put('control-panes/screenshots/screenshots.jade', + require('./screenshots.jade') + ) + }]) + .controller('ScreenshotsCtrl', require('./screenshots-controller')) diff --git a/res/app/control-panes/screenshots/screenshots-controller.js b/res/app/control-panes/screenshots/screenshots-controller.js new file mode 100644 index 00000000..71b51eef --- /dev/null +++ b/res/app/control-panes/screenshots/screenshots-controller.js @@ -0,0 +1,3 @@ +module.exports = function ScreenshotsCtrl($scope) { + +} diff --git a/res/app/control-panes/screenshots/screenshots-spec.js b/res/app/control-panes/screenshots/screenshots-spec.js new file mode 100644 index 00000000..b7de3945 --- /dev/null +++ b/res/app/control-panes/screenshots/screenshots-spec.js @@ -0,0 +1,17 @@ +describe('ScreenshotsCtrl', function () { + + beforeEach(module('stf.screenshots')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('ScreenshotsCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/screenshots/screenshots.css b/res/app/control-panes/screenshots/screenshots.css new file mode 100644 index 00000000..3d7464eb --- /dev/null +++ b/res/app/control-panes/screenshots/screenshots.css @@ -0,0 +1,3 @@ +.stf-screenshots { + +} \ No newline at end of file diff --git a/res/app/control-panes/screenshots/screenshots.jade b/res/app/control-panes/screenshots/screenshots.jade new file mode 100644 index 00000000..aff7c630 --- /dev/null +++ b/res/app/control-panes/screenshots/screenshots.jade @@ -0,0 +1,32 @@ +.widget-container.fluid-height(ng-controller='ScreenshotsCtrl') + .heading + button.btn.btn-sm.btn-primary-outline(ng-click='takeScreenShot()', title='{{"Take Screenshot"|translate}}') + i.fa.fa-camera + span(translate) Screenshot + button.btn.btn-sm.btn-info-outline(ng-click='takePageShot()', title='{{"Take Pageshot (Needs WebView running)"|translate}}', + ng-if='$root.platform == "web" && $root.browser == "webview"') + i.fa.fa-camera-retro(translate) + span(translate) Pageshot + + clear-button(ng-click='clear()', ng-disabled='!screenshots.length') + + .btn-group.pull-right + button(type='button', ng-model='shotSize', btn-radio="'small'", title='{{"Low"|translate}}').btn.btn-sm.btn-primary-outline + span.fa.fa-fw(translate) L + button(type='button', ng-model='shotSize', btn-radio="'medium'", title='{{"Medium"|translate}}').btn.btn-sm.btn-primary-outline + span.fa.fa-fw(translate) M + button(type='button', ng-model='shotSize', btn-radio="'large'", title='{{"High"|translate}}').btn.btn-sm.btn-primary-outline + span.fa.fa-fw(translate) H + button(type='button', ng-model='shotSize', btn-radio="'original'", title='{{"Original"|translate}}').btn.btn-sm.btn-primary-outline + i.fa.fa-picture-o.fa-fw + + .widget-content.padded + nothing-to-show(message='{{"No screenshots taken"|translate}}', icon='fa-camera', ng-show='!screenshots.length') + ul.screenshots-icon-view.clear-fix + li(ng-repeat='shot in screenshots').cursor-select + h4 {{ shot.device.capabilities.info.name.id || shot.device.capabilities.model }} + h5 {{ shot.value.date | date:'yyyy/MM/dd HH:mm:ss' }} + a(ng-href='{{ shot.value.screenshotUrl }}', target='_blank') + img(ng-src='{{ shot.value.screenshotUrl + shotSizeUrlParameter() }}') + + .clearfix \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 782def44..1c63e094 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,6 +30,7 @@ module.exports = { , module: { loaders: [ { test: /\.css$/, loader: 'style!css' } + , { test: /\.less$/, loader: 'style-loader!css-loader!less-loader'} , { test: /\.json$/, loader: 'json' } , { test: /\.jpg$/, loader: "url-loader?limit=5000&mimetype=image/jpeg" } , { test: /\.png$/, loader: "url-loader?limit=5000&mimetype=image/png" }