mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-13 13:39:48 +01:00
hover linesettings
This commit is contained in:
parent
f7e81b14ae
commit
fc5900122d
@ -108,7 +108,7 @@ class LineAvatar extends React.Component<{line : LineType, cmd : Cmd}, {}> {
|
||||
let {line} = this.props;
|
||||
if (line != null) {
|
||||
mobx.action(() => {
|
||||
GlobalModel.lineSettingsModal.set(this.props.line);
|
||||
GlobalModel.lineSettingsModal.set(line);
|
||||
})();
|
||||
}
|
||||
}
|
||||
@ -440,6 +440,18 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT
|
||||
);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
handleLineSettings(e : any) : void {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
let {line} = this.props;
|
||||
if (line != null) {
|
||||
mobx.action(() => {
|
||||
GlobalModel.lineSettingsModal.set(line);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
renderMetaWrap(cmd : Cmd) {
|
||||
let {line} = this.props;
|
||||
let model = GlobalModel;
|
||||
@ -458,6 +470,9 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT
|
||||
<div className="termopts">
|
||||
({termOpts.rows}x{termOpts.cols})
|
||||
</div>
|
||||
<div className="settings" onClick={this.handleLineSettings}>
|
||||
<i className="fa-sharp fa-solid fa-gear"/>
|
||||
</div>
|
||||
</div>
|
||||
{this.renderCmdText(cmd, remote)}
|
||||
</div>
|
||||
|
14
src/sh2.less
14
src/sh2.less
@ -1451,6 +1451,10 @@ body::-webkit-scrollbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:hover .meta .settings {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
max-height: 38px;
|
||||
width: 38px;
|
||||
@ -1581,8 +1585,16 @@ body::-webkit-scrollbar {
|
||||
}
|
||||
}
|
||||
|
||||
.settings {
|
||||
display: none;
|
||||
color: #aaa;
|
||||
font-size: 11px;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.termopts {
|
||||
display: flex;
|
||||
color: #aaa;
|
||||
margin-top: 5px;
|
||||
.mono-font(11px);
|
||||
|
Loading…
Reference in New Issue
Block a user