mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-10 19:58:00 +01:00
can click on linetext to select them
This commit is contained in:
parent
0620ff5d85
commit
ff2ddd90a2
@ -159,13 +159,19 @@ class LineAvatar extends React.Component<{line : LineType, cmd : Cmd}, {}> {
|
||||
|
||||
@mobxReact.observer
|
||||
class LineText extends React.Component<{sw : ScreenWindow, line : LineType}, {}> {
|
||||
@boundMethod
|
||||
clickHandler() {
|
||||
let {line} = this.props;
|
||||
GlobalCommandRunner.swSelectLine(String(line.linenum));
|
||||
}
|
||||
|
||||
render() {
|
||||
let {sw, line} = this.props;
|
||||
let formattedTime = getLineDateStr(line.ts);
|
||||
let isSelected = (sw.selectedLine.get() == line.linenum);
|
||||
let isFocused = (sw.focusType.get() == "cmd");
|
||||
return (
|
||||
<div className="line line-text" data-lineid={line.lineid} data-linenum={line.linenum} data-windowid={line.windowid}>
|
||||
<div className="line line-text" data-lineid={line.lineid} data-linenum={line.linenum} data-windowid={line.windowid} onClick={this.clickHandler}>
|
||||
<div className={cn("focus-indicator", {"selected": isSelected}, {"active": isSelected && isFocused})}/>
|
||||
<div className="avatar">
|
||||
S
|
||||
|
@ -390,7 +390,7 @@ html, body, #main {
|
||||
flex-direction: column;
|
||||
scroll-margin-bottom: 20px;
|
||||
position: relative;
|
||||
|
||||
|
||||
.avatar {
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -526,6 +526,11 @@ html, body, #main {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
&:hover .focus-indicator {
|
||||
display: block;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.focus-indicator {
|
||||
position: absolute;
|
||||
display: none;
|
||||
|
Loading…
Reference in New Issue
Block a user