Skip to content

Commit 9dd1b2e

Browse files
committed
hide inactive panels
1 parent 7658148 commit 9dd1b2e

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function getJsonResource(tabID) {
5757
notifyDevtools('status', 'running ' + xpbHeader);
5858
if (xhr.status !== 200) {
5959
notifyDevtools('error', 'Solidus JSON status: ' + xhr.status);
60-
notifyDevtools('action', 'shutdown');
60+
notifyDevtools('action', 'soft-shutdown');
6161
return;
6262
}
6363
if (xhr.status === 200) {

views/devpanel.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ pre.scroll-panel {
102102
background: #3879d9;
103103
}
104104

105+
.nav-tabs>li>a[data-toggle='none'] {
106+
display: none;
107+
}
108+
105109
.panel-column {
106110
height: 100%;
107111
position: static;

views/devpanel.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,18 @@ function processMainIncomingMessage(msg) {
3737
case 'shutdown':
3838
destroyInspector();
3939
$('#panelTabs a[href="#info"]').tab('show');
40-
var contextPane = document.querySelector('#pagecontext');
41-
var cStatus = createAlert('No context. See Info tab.', '', 'danger');
42-
contextPane.innerHTML = cStatus;
40+
$('#panelTabs a[href="#context"]').attr('data-toggle', 'none');
41+
$('#panelTabs a[href="#logs"]').attr('data-toggle', 'none');
42+
break;
43+
case 'soft-shutdown':
44+
destroyInspector();
45+
$('#panelTabs a[href="#info"]').tab('show');
46+
$('#panelTabs a[href="#context"]').attr('data-toggle', 'none');
4347
break;
4448
case 'reload':
4549
clearAlerts();
50+
$('#panelTabs a[href="#context"]').attr('data-toggle', 'tab');
51+
$('#panelTabs a[href="#logs"]').attr('data-toggle', 'tab');
4652
break;
4753
default:
4854
}

0 commit comments

Comments
 (0)