mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-02 04:02:13 +01:00
Make connections modal scrollable (#623)
This commit is contained in:
parent
8cea209823
commit
345356d8d4
@ -52,6 +52,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
padding-right: 4px !important;
|
||||||
i {
|
i {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ const ModalHeader: React.FC<ModalHeaderProps> = ({ onClose, keybindings, title }
|
|||||||
</If>
|
</If>
|
||||||
{<div className="wave-modal-title">{title}</div>}
|
{<div className="wave-modal-title">{title}</div>}
|
||||||
<If condition={onClose}>
|
<If condition={onClose}>
|
||||||
<Button className="secondary ghost" onClick={onClose}>
|
<Button className="secondary ghost" onClick={() => onClose()} title="Close (ESC)">
|
||||||
<i className="fa-sharp fa-solid fa-xmark"></i>
|
<i className="fa-sharp fa-solid fa-xmark"></i>
|
||||||
</Button>
|
</Button>
|
||||||
</If>
|
</If>
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
.rconndetail-modal {
|
.rconndetail-modal {
|
||||||
width: auto;
|
|
||||||
max-width: 80vw;
|
|
||||||
min-height: 565px;
|
|
||||||
|
|
||||||
.wave-modal-content {
|
.wave-modal-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 20px;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
width: auto;
|
||||||
|
max-width: 80vw;
|
||||||
|
max-height: 90vh;
|
||||||
|
|
||||||
.wave-modal-body {
|
.wave-modal-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0px 20px;
|
padding: 20px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
.name-header-actions-wrapper {
|
.name-header-actions-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -53,6 +52,7 @@
|
|||||||
|
|
||||||
.remote-detail {
|
.remote-detail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding-top: 16px;
|
||||||
|
|
||||||
.settings-field {
|
.settings-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -15,6 +15,7 @@ import * as appconst from "@/app/appconst";
|
|||||||
|
|
||||||
import "./viewremoteconndetail.less";
|
import "./viewremoteconndetail.less";
|
||||||
import { ModalKeybindings } from "../elements/modal";
|
import { ModalKeybindings } from "../elements/modal";
|
||||||
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
|
||||||
|
|
||||||
@mobxReact.observer
|
@mobxReact.observer
|
||||||
class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
|
class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
|
||||||
@ -299,15 +300,33 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal className="rconndetail-modal">
|
<Modal className="rconndetail-modal">
|
||||||
|
<ModalKeybindings
|
||||||
|
onOk={() => {
|
||||||
|
if (selectedRemoteStatus == "connecting") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.handleClose();
|
||||||
|
}}
|
||||||
|
onCancel={() => {
|
||||||
|
if (selectedRemoteStatus == "connecting") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.handleClose();
|
||||||
|
}}
|
||||||
|
></ModalKeybindings>
|
||||||
<Modal.Header title="Connection" onClose={this.handleClose} />
|
<Modal.Header title="Connection" onClose={this.handleClose} />
|
||||||
<div className="wave-modal-body">
|
<OverlayScrollbarsComponent
|
||||||
|
className="wave-modal-body"
|
||||||
|
options={{ scrollbars: { autoHide: "leave" } }}
|
||||||
|
defer={true}
|
||||||
|
>
|
||||||
<div className="name-header-actions-wrapper">
|
<div className="name-header-actions-wrapper">
|
||||||
<div className="name text-primary name-wrapper">
|
<div className="name text-primary name-wrapper">
|
||||||
{util.getRemoteName(remote)} {getImportTooltip(remote)}
|
{util.getRemoteName(remote)} {getImportTooltip(remote)}
|
||||||
</div>
|
</div>
|
||||||
<div className="header-actions">{this.renderHeaderBtns(remote)}</div>
|
<div className="header-actions">{this.renderHeaderBtns(remote)}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="remote-detail" style={{ overflow: "hidden" }}>
|
<div className="remote-detail">
|
||||||
<div className="settings-field">
|
<div className="settings-field">
|
||||||
<div className="settings-label">Conn Id</div>
|
<div className="settings-label">Conn Id</div>
|
||||||
<div className="settings-input">{remote.remoteid}</div>
|
<div className="settings-input">{remote.remoteid}</div>
|
||||||
@ -381,33 +400,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
|
|||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</OverlayScrollbarsComponent>
|
||||||
<div className="wave-modal-footer">
|
|
||||||
<ModalKeybindings
|
|
||||||
onOk={() => {
|
|
||||||
if (selectedRemoteStatus == "connecting") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.handleClose();
|
|
||||||
}}
|
|
||||||
onCancel={() => {
|
|
||||||
if (selectedRemoteStatus == "connecting") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.handleClose();
|
|
||||||
}}
|
|
||||||
></ModalKeybindings>
|
|
||||||
<Button
|
|
||||||
className="secondary"
|
|
||||||
disabled={selectedRemoteStatus == "connecting"}
|
|
||||||
onClick={this.handleClose}
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</Button>
|
|
||||||
<Button disabled={selectedRemoteStatus == "connecting"} onClick={this.handleClose}>
|
|
||||||
Done
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user