Commit bb4eebae authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[feature] Implementing the side bar

parent 1193ecef1588
#root {
width: 400pt;
margin: 10pt;
font-size: 12pt;
}
......
......@@ -148,6 +148,10 @@ class Popup extends React.Component<{}, State> {
}
render() {
return <div style={{ width: "500px" }}>{this.renderInner()}</div>;
}
renderInner(): React.ReactNode {
let self = this;
if (this.state.pane == "loading") {
return <ConfigLoading />;
......
......@@ -24,6 +24,7 @@ import { definition } from "@logilab/libview";
import { getViewRegistry, getCurrentResource } from "../common/messages";
import { ResourceData } from "../common/data";
import { ConfigLoading } from "../common/config/ConfigLoading";
import { CurrentTabDataSources } from "../common/config/CurrentTabDataSources";
/**
* Gets the identifier of the currently active tab
......@@ -67,7 +68,7 @@ class Sidebar extends React.Component<{}, State> {
(values: [ResourceData, definition.ViewRegistry]) => {
self.state.data = values[0];
self.state.registry = values[1];
self.state.pane = "menu";
self.state.pane = "main";
self.setState(self.state);
}
);
......@@ -87,8 +88,12 @@ class Sidebar extends React.Component<{}, State> {
render() {
if (this.state.pane == "loading") {
return <ConfigLoading />;
} else if (this.state.data == null || this.state.data == undefined) {
return <span>This tab is not using an active Linked Data browser.</span>;
} else {
return <span>{this.state.tabId}</span>;
return (
<CurrentTabDataSources data={this.state.data} onClickBack={() => {}} />
);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment