mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-09 19:48:45 +01:00
manual minmax control for infomsg box
This commit is contained in:
parent
1d3d19b7c3
commit
fb51263ed3
15
src/main.tsx
15
src/main.tsx
@ -944,6 +944,12 @@ class HistoryInfo extends React.Component<{}, {}> {
|
|||||||
|
|
||||||
@mobxReact.observer
|
@mobxReact.observer
|
||||||
class CmdInput extends React.Component<{}, {}> {
|
class CmdInput extends React.Component<{}, {}> {
|
||||||
|
@boundMethod
|
||||||
|
onInfoToggle() : void {
|
||||||
|
GlobalModel.inputModel.toggleInfoMsg();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let model = GlobalModel;
|
let model = GlobalModel;
|
||||||
let inputModel = model.inputModel;
|
let inputModel = model.inputModel;
|
||||||
@ -964,8 +970,17 @@ class CmdInput extends React.Component<{}, {}> {
|
|||||||
let cwdStr = getCwdStr(remote, remoteState);
|
let cwdStr = getCwdStr(remote, remoteState);
|
||||||
let infoShow = inputModel.infoShow.get();
|
let infoShow = inputModel.infoShow.get();
|
||||||
let historyShow = !infoShow && inputModel.historyShow.get();
|
let historyShow = !infoShow && inputModel.historyShow.get();
|
||||||
|
let hasInfo = (inputModel.infoMsg.get() != null);
|
||||||
return (
|
return (
|
||||||
<div className={cn("box cmd-input has-background-black", {"has-info": infoShow}, {"has-history": historyShow})}>
|
<div className={cn("box cmd-input has-background-black", {"has-info": infoShow}, {"has-history": historyShow})}>
|
||||||
|
<div onClick={this.onInfoToggle} className="input-minmax-control">
|
||||||
|
<If condition={infoShow || historyShow}>
|
||||||
|
<i className="fa fa-chevron-down"/>
|
||||||
|
</If>
|
||||||
|
<If condition={!(infoShow || historyShow) && hasInfo}>
|
||||||
|
<i className="fa fa-chevron-up"/>
|
||||||
|
</If>
|
||||||
|
</div>
|
||||||
<If condition={historyShow}>
|
<If condition={historyShow}>
|
||||||
<div className="cmd-input-grow-spacer"></div>
|
<div className="cmd-input-grow-spacer"></div>
|
||||||
<HistoryInfo/>
|
<HistoryInfo/>
|
||||||
|
10
src/sh2.less
10
src/sh2.less
@ -637,6 +637,16 @@ body .xterm .xterm-viewport {
|
|||||||
height: max(300px, 40%);
|
height: max(300px, 40%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-minmax-control {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
color: @term-white;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.cmd-input-grow-spacer {
|
.cmd-input-grow-spacer {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user