1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-03 17:59:28 +02:00

- Hundreds of UI coming back.

This commit is contained in:
Gunther Brunner 2014-03-28 21:32:41 +09:00
parent 6638da01a6
commit 325eaaf199
48 changed files with 785 additions and 51 deletions

View file

@ -0,0 +1,3 @@
module.exports = function AdvancedCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-advanced {
}

View file

@ -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"')

View file

@ -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'))

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function InputCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-input {
}

View file

@ -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

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function RunJsCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-run-js {
}

View file

@ -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')

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function UsbCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-usb {
}

View file

@ -0,0 +1,6 @@
.widget-container.fluid-height.stf-usb
.heading
i.fa
span(translate) Usb speed
.widget-content.padded
div

View file

@ -4,31 +4,31 @@ module.exports = function ControlPanesCtrl($scope, gettext) {
{ {
title: gettext('Screenshots'), title: gettext('Screenshots'),
icon: 'fa-camera', icon: 'fa-camera',
templateUrl: 'settings/notifications/notifications.jade', templateUrl: 'control-panes/screenshots/screenshots.jade',
filters: ['native', 'web'] filters: ['native', 'web']
}, },
{ {
title: gettext('Inspect'), title: gettext('Inspect'),
icon: 'fa-pencil', icon: 'fa-pencil',
templateUrl: 'settings/notifications/notifications.jade', templateUrl: 'control-panes/inspect/inspect.jade',
filters: ['web'] filters: ['web']
}, },
{ {
title: gettext('Resources'), title: gettext('Resources'),
icon: 'fa-globe', icon: 'fa-globe',
templateUrl: 'settings/notifications/notifications.jade', templateUrl: 'control-panes/resources/resources.jade',
filters: ['web'] filters: ['web']
}, },
{ {
title: gettext('CPU'), title: gettext('CPU'),
icon: 'fa-bar-chart-o', icon: 'fa-bar-chart-o',
templateUrl: 'settings/notifications/notifications.jade', templateUrl: 'control-panes/cpu/cpu.jade',
filters: ['native', 'web'] filters: ['native', 'web']
}, },
{ {
title: gettext('Advanced'), title: gettext('Advanced'),
icon: 'fa-bolt', icon: 'fa-bolt',
templateUrl: 'settings/notifications/notifications.jade', templateUrl: 'control-panes/advanced/advanced.jade',
filters: ['native', 'web'] filters: ['native', 'web']
} }
] ]
@ -46,7 +46,7 @@ module.exports = function ControlPanesCtrl($scope, gettext) {
{ {
title: gettext('Logs'), title: gettext('Logs'),
icon: 'fa-list-alt', icon: 'fa-list-alt',
templateUrl: 'settings/local/local-settings.jade', templateUrl: 'control-panes/logs/logs.jade',
filters: ['native', 'web'] filters: ['native', 'web']
} }
].concat(angular.copy(sharedTabs)) ].concat(angular.copy(sharedTabs))

View file

@ -0,0 +1,3 @@
module.exports = function CpuCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-cpu {
}

View file

@ -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}}%

View file

@ -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'))

View file

@ -2,10 +2,15 @@ require('fa-borderlayout')
require('fa-borderlayout/build-0.3.1/borderLayout.css') require('fa-borderlayout/build-0.3.1/borderLayout.css')
require('fa-borderlayout/build-0.3.1/stf-style.css') require('fa-borderlayout/build-0.3.1/stf-style.css')
module.exports = angular.module('control-panes', [ module.exports = angular.module('control-panes', [
require('stf/common-ui/nice-tabs').name, 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) { .config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/control-panes', { $routeProvider.when('/control-panes', {

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function InspectCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-inspect {
}

View file

@ -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')

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function LogsCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -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

View file

@ -1,9 +1,11 @@
#logcatSingle { .stf-logs {
#logcatSingle {
height: 600px; height: 600px;
overflow-y: auto; overflow-y: auto;
} }
#logcatParent { #logcatParent {
background: #fff; background: #fff;
position: absolute; position: absolute;
top: 69px; top: 69px;
@ -13,83 +15,85 @@
overflow-y: auto; overflow-y: auto;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
/*z-index: -10;*/ /*z-index: -10;*/
} }
#logcatTable { #logcatTable {
table-layout: fixed !important; table-layout: fixed !important;
} }
.logcat-filters-table { .logcat-filters-table {
margin-bottom: 0; margin-bottom: 0;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
} }
.logcat-filters-table .btn { .logcat-filters-table .btn {
margin: 0; margin: 0;
} }
.logcat-filters-table thead>tr>th, .logcat-filters-table thead > tr > th,
.logcat-filters-table tbody>tr>th, .logcat-filters-table tbody > tr > th,
.logcat-filters-table tfoot>tr>th, .logcat-filters-table tfoot > tr > th,
.logcat-filters-table thead>tr>td, .logcat-filters-table thead > tr > td,
.logcat-filters-table tbody>tr>td, .logcat-filters-table tbody > tr > td,
.logcat-filters-table tfoot>tr>td { .logcat-filters-table tfoot > tr > td {
border-top: none; border-top: none;
} }
#logcatBody tr { #logcatBody tr {
border-bottom: 1px solid rgb(240, 240, 240); border-bottom: 1px solid rgb(240, 240, 240);
} }
#logcatBody td { #logcatBody td {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
.console-message-text { .console-message-text {
font-size: 11px !important; font-size: 11px !important;
font-family: Menlo, monospace; font-family: Menlo, monospace;
white-space: pre-wrap; white-space: pre-wrap;
} }
.console-message-text td { .console-message-text td {
/*color: rgb(48, 57, 66);*/ /*color: rgb(48, 57, 66);*/
} }
/** /**
Logging colors Logging colors
*/ */
.log-unknown { .log-unknown {
color: bisque; color: bisque;
} }
.log-default, .log-silent { .log-default, .log-silent {
color: darkolivegreen; color: darkolivegreen;
} }
.log-verbose { .log-verbose {
color: blueviolet; color: blueviolet;
} }
.log-debug { .log-debug {
color: rgb(48, 57, 66); color: rgb(48, 57, 66);
} }
.log-info { .log-info {
color: blue; color: blue;
} }
.log-warn { .log-warn {
color: coral; color: coral;
} }
.log-error { .log-error {
color: red; color: red;
} }
.log-fatal { .log-fatal {
color: darkcyan; color: darkcyan;
}
} }
/*#logcatMax {*/ /*#logcatMax {*/

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function ResourcesCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-resources {
}

View file

@ -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'}}

View file

@ -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'))

View file

@ -0,0 +1,3 @@
module.exports = function ScreenshotsCtrl($scope) {
}

View file

@ -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);
}));
});

View file

@ -0,0 +1,3 @@
.stf-screenshots {
}

View file

@ -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

View file

@ -30,6 +30,7 @@ module.exports = {
, module: { , module: {
loaders: [ loaders: [
{ test: /\.css$/, loader: 'style!css' } { test: /\.css$/, loader: 'style!css' }
, { test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}
, { test: /\.json$/, loader: 'json' } , { test: /\.json$/, loader: 'json' }
, { test: /\.jpg$/, loader: "url-loader?limit=5000&mimetype=image/jpeg" } , { test: /\.jpg$/, loader: "url-loader?limit=5000&mimetype=image/jpeg" }
, { test: /\.png$/, loader: "url-loader?limit=5000&mimetype=image/png" } , { test: /\.png$/, loader: "url-loader?limit=5000&mimetype=image/png" }