mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
update waveshell install message, link to docs (#243)
This commit is contained in:
@@ -12,6 +12,7 @@ import { If } from "tsx-control-statements/components";
|
||||
import { RemoteType, StatusIndicatorLevel } from "../../types/types";
|
||||
import ReactDOM from "react-dom";
|
||||
import { GlobalModel } from "../../model/model";
|
||||
import * as appconst from "../appconst";
|
||||
|
||||
import { ReactComponent as CheckIcon } from "../assets/icons/line/check.svg";
|
||||
import { ReactComponent as CopyIcon } from "../assets/icons/history/copy.svg";
|
||||
@@ -1247,8 +1248,8 @@ class Modal extends React.Component<ModalProps> {
|
||||
}
|
||||
|
||||
interface StatusIndicatorProps {
|
||||
level: StatusIndicatorLevel
|
||||
className?: string
|
||||
level: StatusIndicatorLevel;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
class StatusIndicator extends React.Component<StatusIndicatorProps> {
|
||||
@@ -1268,12 +1269,37 @@ class StatusIndicator extends React.Component<StatusIndicatorProps> {
|
||||
statusIndicatorClass = "error";
|
||||
break;
|
||||
}
|
||||
statusIndicator = <div className={`${this.props.className} fa-sharp fa-solid fa-circle-small status-indicator ${statusIndicatorClass}`}></div>;
|
||||
statusIndicator = (
|
||||
<div
|
||||
className={`${this.props.className} fa-sharp fa-solid fa-circle-small status-indicator ${statusIndicatorClass}`}
|
||||
></div>
|
||||
);
|
||||
}
|
||||
return statusIndicator;
|
||||
}
|
||||
}
|
||||
|
||||
function ShowWaveShellInstallPrompt(callbackFn: () => void) {
|
||||
let message: string = `
|
||||
In order to use Wave's advanced features like unified history and persistent sessions, Wave installs a small, open-source helper program called WaveShell on your remote machine. WaveShell does not open any external ports and only communicates with your *local* Wave terminal instance over ssh. For more information please see [the docs](https://docs.waveterm.dev/reference/waveshell).
|
||||
`;
|
||||
message = message.trim();
|
||||
let prtn = GlobalModel.showAlert({
|
||||
message: message,
|
||||
confirm: true,
|
||||
markdown: true,
|
||||
confirmflag: appconst.ConfirmKey_HideShellPrompt,
|
||||
});
|
||||
prtn.then((confirm) => {
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
if (callbackFn) {
|
||||
callbackFn();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
CmdStrCode,
|
||||
Toggle,
|
||||
@@ -1296,4 +1322,5 @@ export {
|
||||
Status,
|
||||
Modal,
|
||||
StatusIndicator,
|
||||
ShowWaveShellInstallPrompt,
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import { GlobalModel, GlobalCommandRunner, RemotesModel } from "../../../model/model";
|
||||
import * as T from "../../../types/types";
|
||||
import { Modal, TextField, NumberField, InputDecoration, Dropdown, PasswordField, Tooltip } from "../common";
|
||||
import { Modal, TextField, NumberField, InputDecoration, Dropdown, PasswordField, Tooltip, ShowWaveShellInstallPrompt } from "../common";
|
||||
import * as util from "../../../util/util";
|
||||
import * as appconst from "../../appconst";
|
||||
|
||||
@@ -69,23 +69,7 @@ class CreateRemoteConnModal extends React.Component<{}, {}> {
|
||||
|
||||
@boundMethod
|
||||
handleOk(): void {
|
||||
this.showShellPrompt(this.submitRemote);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
showShellPrompt(cb: () => void): void {
|
||||
let prtn = GlobalModel.showAlert({
|
||||
message:
|
||||
"You are about to install WaveShell on a remote machine. Please be aware that WaveShell will be executed on the remote system.",
|
||||
confirm: true,
|
||||
confirmflag: appconst.ConfirmKey_HideShellPrompt,
|
||||
});
|
||||
prtn.then((confirm) => {
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
ShowWaveShellInstallPrompt(this.submitRemote);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
Button,
|
||||
Status,
|
||||
Checkbox,
|
||||
ShowWaveShellInstallPrompt,
|
||||
} from "../common";
|
||||
import * as util from "../../../util/util";
|
||||
import * as textmeasure from "../../../util/textmeasure";
|
||||
@@ -549,23 +550,7 @@ class CreateRemoteConnModal extends React.Component<{}, {}> {
|
||||
|
||||
@boundMethod
|
||||
handleOk(): void {
|
||||
this.showShellPrompt(this.submitRemote);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
showShellPrompt(cb: () => void): void {
|
||||
let prtn = GlobalModel.showAlert({
|
||||
message:
|
||||
"You are about to install WaveShell on a remote machine. Please be aware that WaveShell will be executed on the remote system.",
|
||||
confirm: true,
|
||||
confirmflag: appconst.ConfirmKey_HideShellPrompt,
|
||||
});
|
||||
prtn.then((confirm) => {
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
ShowWaveShellInstallPrompt(this.submitRemote);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
|
||||
@@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, RemotesModel, GlobalCommandRunner } from "../../model/model";
|
||||
import { Button, IconButton, Status } from "../common/common";
|
||||
import { Button, IconButton, Status, ShowWaveShellInstallPrompt } from "../common/common";
|
||||
import * as T from "../../types/types";
|
||||
import * as util from "../../util/util";
|
||||
import * as appconst from "../appconst";
|
||||
@@ -81,23 +81,7 @@ class ConnectionsView extends React.Component<{ model: RemotesModel }, { hovered
|
||||
|
||||
@boundMethod
|
||||
handleImportSshConfig(): void {
|
||||
this.showShellPrompt(this.importSshConfig);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
showShellPrompt(cb: () => void): void {
|
||||
let prtn = GlobalModel.showAlert({
|
||||
message:
|
||||
"You are about to install WaveShell on a remote machine. Please be aware that WaveShell will be executed on the remote system.",
|
||||
confirm: true,
|
||||
confirmflag: appconst.ConfirmKey_HideShellPrompt,
|
||||
});
|
||||
prtn.then((confirm) => {
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
ShowWaveShellInstallPrompt(this.importSshConfig);
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
|
||||
Reference in New Issue
Block a user