fix PE-152 and PE-146, font size for new state, and force connection terminal to scroll if too big (when font size doesnt match)

This commit is contained in:
sawka 2023-09-16 14:27:17 -07:00
parent 8b8f7cda7b
commit 6e8dcad1f1
3 changed files with 11 additions and 7 deletions

View File

@ -797,6 +797,7 @@ class LineCmd extends React.Component<
className="cmd-rtnstate"
style={{
visibility: cmd.getStatus() == "done" ? "visible" : "hidden",
fontSize: GlobalModel.termFontSize.get(),
}}
>
<If condition={rsdiff == null || rsdiff == ""}>

View File

@ -179,7 +179,7 @@
.cmd-rtnstate-diff {
color: @term-white;
.mono-font(12px);
.mono-font();
white-space: pre;
margin-left: 15px;
}

View File

@ -271,7 +271,7 @@ class CreateRemote extends React.Component<{ model: RemotesModalModel; remoteEdi
let { model, remoteEdit } = this.props;
let authMode = this.tempAuthMode.get();
return (
<div className="remote-detail create-remote">
<div className="remote-detail create-remote" style={{ overflow: "hidden" }}>
<div className="title is-5">Create New Connection</div>
<div className="settings-field mt-3">
<div className="settings-label">
@ -621,7 +621,7 @@ class EditRemoteSettings extends React.Component<
let { model, remote, remoteEdit } = this.props;
let authMode = this.tempAuthMode.get();
return (
<div className="remote-detail auth-editing">
<div className="remote-detail auth-editing" style={{ overflow: "hidden" }}>
<div className="title is-5">{getRemoteTitle(remote)}</div>
<div className="detail-subtitle">Editing Connection Settings</div>
<div className="settings-field">
@ -998,7 +998,7 @@ class RemoteDetailView extends React.Component<{ model: RemotesModalModel; remot
let termWidth = textmeasure.termWidthFromCols(RemotePtyCols, termFontSize);
let remoteAliasText = util.isBlank(remote.remotealias) ? "(none)" : remote.remotealias;
return (
<div className="remote-detail">
<div className="remote-detail" style={{ overflow: "hidden" }}>
<div className="title is-5">{getRemoteTitle(remote)}</div>
<div className="settings-field">
<div className="settings-label">Conn Id</div>
@ -1045,7 +1045,7 @@ class RemoteDetailView extends React.Component<{ model: RemotesModalModel; remot
</div>
</div>
<div className="flex-spacer" style={{ minHeight: 20 }} />
<div style={{ width: termWidth }}>{remoteMessage}</div>
<div style={{ width: "100%" }}>{remoteMessage}</div>
<div
key="term"
className={cn(
@ -1054,7 +1054,7 @@ class RemoteDetailView extends React.Component<{ model: RemotesModalModel; remot
remote != null ? "status-" + remote.status : null,
{ "has-message": remoteMessage != null }
)}
style={{ width: termWidth }}
style={{ width: "100%", overflowX: "auto" }}
>
<If condition={!isTermFocused}>
<div key="termblock" className="term-block" onClick={this.clickTermBlock}></div>
@ -1069,7 +1069,10 @@ class RemoteDetailView extends React.Component<{ model: RemotesModalModel; remot
className="terminal-connectelem"
ref={this.termRef}
data-remoteid={remote.remoteid}
style={{ height: textmeasure.termHeightFromRows(RemotePtyRows, termFontSize) }}
style={{
height: textmeasure.termHeightFromRows(RemotePtyRows, termFontSize),
width: termWidth,
}}
></div>
</div>
</div>