mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Fix History view not honoring sidebar width (#292)
* Fix History view not honoring sidebar width * update comment
This commit is contained in:
parent
532e65c8ab
commit
2839179ced
@ -419,8 +419,16 @@ class HistoryView extends React.Component<{}, {}> {
|
|||||||
let sessionId: string = null;
|
let sessionId: string = null;
|
||||||
let remoteIds = Object.keys(rnames);
|
let remoteIds = Object.keys(rnames);
|
||||||
let remoteId: string = null;
|
let remoteId: string = null;
|
||||||
|
|
||||||
|
// TODO: something is weird with how we calculate width for views. Before, history view was not honoring tab width. This fix is copied from workspaceview.tsx, which had a similar issue.
|
||||||
|
const width = window.innerWidth - 6 - GlobalModel.mainSidebarModel.getWidth();
|
||||||
return (
|
return (
|
||||||
<div className={cn("history-view", { "is-hidden": isHidden })}>
|
<div
|
||||||
|
className={cn("history-view", "view", { "is-hidden": isHidden })}
|
||||||
|
style={{
|
||||||
|
width: `${width}px`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div className="header">
|
<div className="header">
|
||||||
<div className="history-title">History</div>
|
<div className="history-title">History</div>
|
||||||
<div className="history-search">
|
<div className="history-search">
|
||||||
|
Loading…
Reference in New Issue
Block a user