Skip to content

add an header for client / server labels in the packets list #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions chrome/content/inspector-window.xul
Original file line number Diff line number Diff line change
@@ -44,5 +44,29 @@
<script type="application/x-javascript">
window.gFindBar = document.getElementById("FindToolbar");
</script>

<script type="application/x-javascript">
<![CDATA[
const MIN_WIDTH=700, MIN_HEIGHT=600;
let resizeTaskID;

window.addEventListener("resize", (event) => {
let { outerWidth, outerHeight } = window;

let newWidth = outerWidth >= MIN_WIDTH ? outerWidth : MIN_WIDTH;
let newHeight = outerHeight >= MIN_HEIGHT ? outerHeight : MIN_HEIGHT;

if (outerWidth < MIN_WIDTH || outerHeight < MIN_HEIGHT) {
event.preventDefault();
if (resizeTaskID) {
clearTimeout(resizeTaskID);
}
resizeTaskID = setTimeout(() => window.resizeTo(newWidth, newHeight), 200);
return false;
}
}, false)
]]>
</script>

</vbox>
</window>
5 changes: 5 additions & 0 deletions chrome/locale/en-US/inspector.properties
Original file line number Diff line number Diff line change
@@ -84,3 +84,8 @@ rdpInspector.menu.File=File
rdpInspector.menu.Options=Options
rdpInspector.cmd.load=Load
rdpInspector.cmd.save=Save

# LOCALIZATION NOTE (rdpInspector.label.serverParticipant, rdpInspector.label.clientParticipant):
# Labels for the participant header bar in the packets panel main area.
rdpInspector.label.serverParticipant=Actors
rdpInspector.label.clientParticipant=Toolbox
36 changes: 35 additions & 1 deletion data/inspector/components/packets-panel.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,40 @@ const { PacketsToolbar } = require("./packets-toolbar");
const { Splitter } = require("./splitter");

// Shortcuts
const { DIV } = Reps.DOM;
const { DIV, SPAN } = Reps.DOM;

var PacketsParticipantsBar = React.createClass({
/** @lends PacketsParticipantsBar */

displayName: "PacketsParticipantsBar",

render: function() {
return DIV({
id: "packetsParticipantsBar",
style: {
position: "relative",
height: "24px",
borderBottom: "1px solid #aaaaaa",
boxShadow: "0px 2px 2px 0px #aaaaaa",
zIndex: "900"
}
}, SPAN({ style: {
position: "absolute",
top: "0px",
left: "10px",
fontWeight: "bold",
fontSize: "1.2em"
}, key: "serverParticipant"}, Locale.$STR("rdpInspector.label.serverParticipant")),
SPAN({ style: {
position: "absolute",
top: "0px",
right: "10px",
fontWeight: "bold",
fontSize: "1.2em"
}, key: "clientParticipant"}, Locale.$STR("rdpInspector.label.clientParticipant"))
);
}
});

/**
* @template This template renders 'Packets' tab body.
@@ -42,6 +75,7 @@ var PacketsPanel = React.createClass({
packetCacheEnabled: this.props.packetCacheEnabled,
paused: this.props.paused
}),
React.createElement(PacketsParticipantsBar, {}),
PacketList({
data: this.props.packets,
actions: this.props.actions,
2 changes: 1 addition & 1 deletion data/inspector/css/packets-panel.css
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@

.packetsPanelBox .list {
/* xxxHonza: minus the toolbar height*/
height: calc(100% - 30px);
height: calc(100% - 54px);
overflow: auto;
padding: 10px;
}
5 changes: 5 additions & 0 deletions data/inspector/css/tree-editor-view.css
Original file line number Diff line number Diff line change
@@ -66,3 +66,8 @@
background: yellow;
color: black;
}

/* FIX: missing close button on hover */
.closeButton:hover {
filter: url("resource://rdpinspector-at-getfirebug-dot-com/node_modules/firebug.sdk/skin/classic/shared/filters.svg#darken") !important;
}