Compare commits

..

51 Commits

Author SHA1 Message Date
Red Adaya 1d0b7bd770 split models/model 2024-02-08 16:40:15 +08:00
Red Adaya a9b9ff3362 fix conflicts 2024-02-08 14:48:29 +08:00
Red Adaya d2829c466d fix ptyDataSource errors 2024-02-08 14:26:49 +08:00
Red Adaya f65e632c35 move model_old to models 2024-02-08 13:37:42 +08:00
Red Adaya acb3bd303b rename model to models 2024-02-08 13:37:02 +08:00
Red Adaya 3ad7feedad replace /model_old imports with /model 2024-02-08 13:34:46 +08:00
Red Adaya 24690ff931 add index.ts inside model dir 2024-02-08 09:35:52 +08:00
Red Adaya f510e1c904 cleanup connectionsview model 2024-02-08 09:23:44 +08:00
Red Adaya 35fa59aadd cleanup screenlinecontainer model 2024-02-08 09:20:30 +08:00
Red Adaya d414657252 cleanup session model 2024-02-08 09:16:02 +08:00
Red Adaya b59dd6960f cleanup screenlines model 2024-02-08 09:14:30 +08:00
Red Adaya 1ae74b767d cleanup screen model 2024-02-08 09:13:04 +08:00
Red Adaya 7fa862b402 cleanup remote model 2024-02-08 09:09:16 +08:00
Red Adaya 970c5c30fd cleanup plugins model 2024-02-08 09:07:26 +08:00
Red Adaya 2bcc8756e7 cleanup main model 2024-02-08 09:06:09 +08:00
Red Adaya 5ad26b10cd cleanup mainsidebar model 2024-02-08 09:02:31 +08:00
Red Adaya ef7acda1bb cleanup linecontainer model 2024-02-08 09:01:08 +08:00
Red Adaya 29cd754358 cleanup input model 2024-02-08 08:59:40 +08:00
Red Adaya 648d98f065 cleanup historyview model 2024-02-08 08:55:56 +08:00
Red Adaya 5770e482a1 cleanup commandrunner model 2024-02-08 08:44:01 +08:00
Red Adaya 23b3250f18 remove dayjs import from bookmarks model 2024-02-08 08:41:22 +08:00
Red Adaya b62977470b cleanup cmd model 2024-02-08 08:40:33 +08:00
Red Adaya 07f2794b1b cleanup clientsettingsview model 2024-02-08 08:37:56 +08:00
Red Adaya cf27a8baff cleanup bookmarks model 2024-02-08 08:37:17 +08:00
Red Adaya aace48d42a init 2024-02-08 08:35:30 +08:00
Red Adaya 15d02f3357 remove styles not related to Tooltip 2024-02-06 13:42:09 +08:00
Red Adaya 39d371681c remove styles not related to Toggle 2024-02-06 13:41:23 +08:00
Red Adaya 412c3ac5a2 remove styles not related to TextField 2024-02-06 13:37:15 +08:00
Red Adaya 36484621ec remove styles not related to Status 2024-02-06 13:35:15 +08:00
Red Adaya 72231ead1d SettingsError doesn't need styles cos it uses classnames in app.less 2024-02-06 13:33:42 +08:00
Red Adaya 81c1fd43f7 remove styles not related to ResizableSidebar 2024-02-06 13:31:20 +08:00
Red Adaya c9a73c2204 RemoteStatusLight no longer used. It's replaced by Status component. 2024-02-06 13:27:58 +08:00
Red Adaya 434f980b49 remove styles not related to PasswordField 2024-02-06 13:26:22 +08:00
Red Adaya 75d462764d NumberField doesn't need styles cos it extends TextField 2024-02-06 13:24:50 +08:00
Red Adaya c58c88af4e remove styles not related to modal 2024-02-06 13:23:32 +08:00
Red Adaya 05be301ea2 remove styles not related to markdown 2024-02-06 13:22:04 +08:00
Red Adaya 27e5a9154d LinkButton doesn't need styles cos it's extends Button component 2024-02-06 13:19:31 +08:00
Red Adaya a7d2148bc0 remove styles not related to InputDecoration 2024-02-06 10:28:39 +08:00
Red Adaya ead75880e1 remove styles not related to InlineSettingsTextEdit 2024-02-06 10:17:18 +08:00
Red Adaya 0bdb50cf91 fix import error 2024-02-06 10:12:32 +08:00
Red Adaya abf3448f07 InfoMessage conmponent no longer needed 2024-02-06 10:09:01 +08:00
Red Adaya 8988d26867 remove old connections 2024-02-06 09:50:57 +08:00
Red Adaya a084ca4801 IconButton doesn't need styles because it extends Button 2024-02-06 09:30:10 +08:00
Red Adaya 36e2578a03 remove styles not related to dropdown 2024-02-06 09:26:46 +08:00
Red Adaya a49487c035 renderCmdText doesn't need styles 2024-02-06 09:15:51 +08:00
Red Adaya 03296043fb remove styles not related to CmdStrCode 2024-02-06 09:10:35 +08:00
Red Adaya ec797f55ff remove styles not related to checkbox 2024-02-06 09:05:18 +08:00
Red Adaya 550461167b init 2024-02-05 23:08:59 +08:00
Red Adaya cf5d2ecddf Merge branch 'main' of github.com:wavetermdev/waveterm into split-components-in-common 2024-02-05 23:07:48 +08:00
Red Adaya c4128cd266 init 2024-02-02 23:26:33 +08:00
Red Adaya 17bb07a47d split settings modals 2024-02-02 16:50:44 +08:00
43 changed files with 1112 additions and 2718 deletions
-1
View File
@@ -8,7 +8,6 @@ export const SESSION_SETTINGS = "sessionSettings";
export const LINE_SETTINGS = "lineSettings";
export const CLIENT_SETTINGS = "clientSettings";
export const TAB_SWITCHER = "tabSwitcher";
export const USER_INPUT = "userInput";
export const LineContainer_Main = "main";
export const LineContainer_History = "history";
-1
View File
@@ -5,7 +5,6 @@
margin-bottom: 10px;
font-family: @markdown-font;
font-size: 14px;
overflow-wrap: break-word;
code {
background-color: @markdown-highlight;
+1 -7
View File
@@ -60,13 +60,7 @@ class PasswordField extends TextField {
};
return (
<div
className={cn(`wave-textfield wave-password ${className || ""}`, {
focused: focused,
error: error,
"no-label": !label,
})}
>
<div className={cn(`wave-textfield wave-password ${className || ""}`, { focused: focused, error: error })}>
{decoration?.startDecoration && <>{decoration.startDecoration}</>}
<div className="wave-textfield-inner">
<label
-1
View File
@@ -9,4 +9,3 @@ export { TabSwitcherModal } from "./tabswitcher";
export { SessionSettingsModal } from "./sessionsettings";
export { ScreenSettingsModal } from "./screensettings";
export { LineSettingsModal } from "./linesettings";
export { UserInputModal } from "./userinput";
+1 -1
View File
@@ -17,7 +17,7 @@ class ModalsProvider extends React.Component {
for (let i = 0; i < store.length; i++) {
let entry = store[i];
let Comp = entry.component;
rtn.push(<Comp key={entry.uniqueKey} {...entry.props} />);
rtn.push(<Comp key={entry.uniqueKey} />);
}
return <>{rtn}</>;
}
+10 -12
View File
@@ -12,21 +12,19 @@ import {
SessionSettingsModal,
ScreenSettingsModal,
LineSettingsModal,
UserInputModal,
} from "../modals";
import * as constants from "../../appconst";
const modalsRegistry: { [key: string]: React.ComponentType } = {
[constants.ABOUT]: AboutModal,
[constants.CREATE_REMOTE]: CreateRemoteConnModal,
[constants.VIEW_REMOTE]: ViewRemoteConnDetailModal,
[constants.EDIT_REMOTE]: EditRemoteConnModal,
[constants.ALERT]: AlertModal,
[constants.SCREEN_SETTINGS]: ScreenSettingsModal,
[constants.SESSION_SETTINGS]: SessionSettingsModal,
[constants.LINE_SETTINGS]: LineSettingsModal,
[constants.TAB_SWITCHER]: TabSwitcherModal,
[constants.USER_INPUT]: UserInputModal,
const modalsRegistry: { [key: string]: () => React.ReactElement } = {
[constants.ABOUT]: () => <AboutModal />,
[constants.CREATE_REMOTE]: () => <CreateRemoteConnModal />,
[constants.VIEW_REMOTE]: () => <ViewRemoteConnDetailModal />,
[constants.EDIT_REMOTE]: () => <EditRemoteConnModal />,
[constants.ALERT]: () => <AlertModal />,
[constants.SCREEN_SETTINGS]: () => <ScreenSettingsModal />,
[constants.SESSION_SETTINGS]: () => <SessionSettingsModal />,
[constants.LINE_SETTINGS]: () => <LineSettingsModal />,
[constants.TAB_SWITCHER]: () => <TabSwitcherModal />,
};
export { modalsRegistry };
-15
View File
@@ -1,15 +0,0 @@
@import "../../../app/common/themes/themes.less";
.userinput-modal {
width: 500px;
.wave-modal-content {
.wave-modal-body {
padding: 20px 20px;
.userinput-query {
margin-bottom: 10px;
}
}
}
}
-88
View File
@@ -1,88 +0,0 @@
import * as React from "react";
import { GlobalModel } from "../../../models";
import { Choose, When, If } from "tsx-control-statements/components";
import { Modal, PasswordField, Markdown } from "../elements";
import { UserInputRequest } from "../../../types/types";
import "./userinput.less";
export const UserInputModal = (userInputRequest: UserInputRequest) => {
const [responseText, setResponseText] = React.useState("");
const [countdown, setCountdown] = React.useState(Math.floor(userInputRequest.timeoutms / 1000));
const closeModal = React.useCallback(() => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
errormsg: "Canceled by the user",
});
GlobalModel.remotesModel.closeModal();
}, [responseText, userInputRequest]);
const handleSendText = React.useCallback(() => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
text: responseText,
});
GlobalModel.remotesModel.closeModal();
}, [responseText, userInputRequest]);
const handleSendConfirm = React.useCallback(
(response: boolean) => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
confirm: response,
});
GlobalModel.remotesModel.closeModal();
},
[userInputRequest]
);
React.useEffect(() => {
let timeout: ReturnType<typeof setTimeout>;
if (countdown == 0) {
timeout = setTimeout(() => {
GlobalModel.remotesModel.closeModal();
}, 300);
} else {
timeout = setTimeout(() => {
setCountdown(countdown - 1);
}, 1000);
}
return () => clearTimeout(timeout);
}, [countdown]);
return (
<Modal className="userinput-modal">
<Modal.Header onClose={closeModal} title={userInputRequest.title + ` (${countdown})`} />
<div className="wave-modal-body">
<div className="userinput-query">
<If condition={userInputRequest.markdown}>
<Markdown text={userInputRequest.querytext} />
</If>
<If condition={!userInputRequest.markdown}>{userInputRequest.querytext}</If>
</div>
<Choose>
<When condition={userInputRequest.responsetype == "text"}>
<PasswordField onChange={setResponseText} value={responseText} maxLength={400} />
</When>
</Choose>
</div>
<Choose>
<When condition={userInputRequest.responsetype == "text"}>
<Modal.Footer onCancel={closeModal} onOk={handleSendText} okLabel="Continue" />
</When>
<When condition={userInputRequest.responsetype == "confirm"}>
<Modal.Footer
onCancel={() => handleSendConfirm(false)}
onOk={() => handleSendConfirm(true)}
okLabel="Yes"
cancelLabel="No"
/>
</When>
</Choose>
</Modal>
);
};
@@ -54,8 +54,6 @@
}
.remote-detail {
width: 100%;
.settings-field {
display: flex;
flex-direction: row;
@@ -93,9 +91,8 @@
}
.terminal-wrapper {
width: 100%;
margin-top: 5px;
overflow-x: auto;
overflow-y: hidden;
.terminal-connectelem {
height: 163px !important; // Needed to override plugin height
@@ -114,6 +111,7 @@
.xterm-screen {
padding: 10px;
width: 541px !important; // Needed to override plugin width
}
}
}
@@ -12,10 +12,12 @@ import * as T from "../../../types/types";
import { Modal, Tooltip, Button, Status } from "../elements";
import * as util from "../../../util/util";
import * as textmeasure from "../../../util/textmeasure";
import * as appconst from "../../appconst";
import "./viewremoteconndetail.less";
const RemotePtyRows = 9;
const RemotePtyCols = 80;
@mobxReact.observer
class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
termRef: React.RefObject<any> = React.createRef();
@@ -291,7 +293,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
let model = this.model;
let isTermFocused = this.model.remoteTermWrapFocus.get();
let termFontSize = GlobalModel.termFontSize.get();
let termWidth = textmeasure.termWidthFromCols(appconst.RemotePtyCols, termFontSize);
let termWidth = textmeasure.termWidthFromCols(RemotePtyCols, termFontSize);
let remoteAliasText = util.isBlank(remote.remotealias) ? "(none)" : remote.remotealias;
let selectedRemoteStatus = this.getSelectedRemote().status;
@@ -369,7 +371,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
ref={this.termRef}
data-remoteid={remote.remoteid}
style={{
height: textmeasure.termHeightFromRows(appconst.RemotePtyRows, termFontSize),
height: textmeasure.termHeightFromRows(RemotePtyRows, termFontSize),
width: termWidth,
}}
></div>
+5 -5
View File
@@ -14,10 +14,10 @@
width: 16px;
height: 16px;
border-radius: 4px;
border: 1px solid #3b3f3a;
border: 1px solid #3B3F3A;
background: rgba(213, 254, 175, 0.03);
}
&.checkbox-icon {
width: 16px;
height: 16px;
@@ -30,7 +30,7 @@
height: 16px;
fill: rgba(213, 254, 175, 0.03);
stroke-width: 1px;
stroke: #3b3f3a;
stroke: #3B3F3A;
}
}
@@ -264,7 +264,6 @@
margin: 0px 10px 10px 10px;
table-layout: fixed;
border-top: 2px solid #ccc;
width: calc(100% - 20px);
tr.active-history-item {
td {
@@ -310,8 +309,9 @@
tr.history-item {
padding: 0 10px 0 10px;
display: flex;
border-bottom: 1px solid rgba(250, 250, 250, 0.1);
border-bottom: 1px solid rgba(250, 250, 250, 0.10);
align-items: center;
height: 40px;
color: @text-secondary;
&.is-selected {
+17 -23
View File
@@ -14,7 +14,6 @@ import { sprintf } from "sprintf-js";
import { v4 as uuidv4 } from "uuid";
import { checkKeyPressed, adaptFromElectronKeyEvent, setKeyUtilPlatform } from "../util/keyutil";
import { platform } from "os";
import type * as T from "../types/types";
const WaveAppPathVarName = "WAVETERM_APP_PATH";
const WaveDevVarName = "WAVETERM_DEV";
@@ -41,21 +40,19 @@ let unameArch: string = process.arch;
if (unameArch == "x64") {
unameArch = "amd64";
}
let loggerTransports: winston.transport[] = [
new winston.transports.File({ filename: path.join(waveHome, "waveterm-app.log"), level: "info" }),
];
if (isDev) {
loggerTransports.push(new winston.transports.Console());
}
let logger;
let loggerConfig = {
level: "info",
format: winston.format.combine(
winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
winston.format.printf((info) => `${info.timestamp} ${info.message}`)
),
transports: loggerTransports,
transports: [new winston.transports.File({ filename: path.join(waveHome, "waveterm-app.log"), level: "info" })],
};
let logger = winston.createLogger(loggerConfig);
if (isDev) {
loggerConfig.transports.push(new winston.transports.Console());
}
logger = winston.createLogger(loggerConfig);
function log(...msg) {
try {
logger.info(util.format(...msg));
@@ -78,7 +75,7 @@ if (isDev) {
}
let app = electron.app;
app.setName(isDev ? "Wave (Dev)" : "Wave");
let waveSrvProc: child_process.ChildProcessWithoutNullStreams | null = null;
let waveSrvProc = null;
let waveSrvShouldRestart = false;
electron.dialog.showErrorBox = (title, content) => {
@@ -104,11 +101,8 @@ function checkPromptMigrate() {
// don't migrate if we're running dev version or if wave home directory already exists
return;
}
if (process.env.HOME == null) {
return;
}
let homeDir: string = process.env.HOME;
let promptHome: string = path.join(homeDir, "prompt");
let homeDir = process.env.HOME;
let promptHome = path.join(homeDir, "prompt");
if (!fs.existsSync(promptHome) || !fs.existsSync(path.join(promptHome, "prompt.db"))) {
// make sure we have a valid prompt home directory (prompt.db must exist inside)
return;
@@ -176,7 +170,7 @@ function readAuthKey() {
return authKeyStr.trim();
}
let menuTemplate: Electron.MenuItemConstructorOptions[] = [
let menuTemplate = [
{
role: "appMenu",
submenu: [
@@ -228,7 +222,7 @@ function getMods(input: any) {
return { meta: input.meta, shift: input.shift, ctrl: input.control, alt: input.alt };
}
function shNavHandler(event: Electron.Event<Electron.WebContentsWillNavigateEventParams>, url: string) {
function shNavHandler(event: any, url: any) {
event.preventDefault();
if (url.startsWith("https://") || url.startsWith("http://") || url.startsWith("file://")) {
console.log("open external, shNav", url);
@@ -238,13 +232,12 @@ function shNavHandler(event: Electron.Event<Electron.WebContentsWillNavigateEven
}
}
function shFrameNavHandler(event: Electron.Event<Electron.WebContentsWillFrameNavigateEventParams>) {
function shFrameNavHandler(event: any, url: any) {
if (!event.frame || event.frame.parent == null) {
// only use this handler to process iframe events (non-iframe events go to shNavHandler)
return;
}
event.preventDefault();
let url = event.url;
console.log(`frame-navigation url=${url} frame=${event.frame.name}`);
if (event.frame.name == "webview") {
// "webview" links always open in new window
@@ -257,7 +250,7 @@ function shFrameNavHandler(event: Electron.Event<Electron.WebContentsWillFrameNa
return;
}
function createMainWindow(clientData: T.ClientDataType | null) {
function createMainWindow(clientData) {
let bounds = calcBounds(clientData);
setKeyUtilPlatform(platform());
let win = new electron.BrowserWindow({
@@ -651,11 +644,12 @@ electron.ipcMain.on("context-editmenu", (event, { x, y }, opts) => {
}
console.log("context-editmenu");
let menu = new electron.Menu();
let menuItem = null;
if (opts.showCut) {
let menuItem = new electron.MenuItem({ label: "Cut", role: "cut" });
menuItem = new electron.MenuItem({ label: "Cut", role: "cut" });
menu.append(menuItem);
}
let menuItem = new electron.MenuItem({ label: "Copy", role: "copy" });
menuItem = new electron.MenuItem({ label: "Copy", role: "copy" });
menu.append(menuItem);
menuItem = new electron.MenuItem({ label: "Paste", role: "paste" });
menu.append(menuItem);
@@ -663,7 +657,7 @@ electron.ipcMain.on("context-editmenu", (event, { x, y }, opts) => {
});
async function createMainWindowWrap() {
let clientData: T.ClientDataType | null = null;
let clientData = null;
try {
clientData = await getClientDataPoll(1);
} catch (e) {
+1 -1
View File
@@ -8,7 +8,7 @@ import { GlobalModel } from "./global";
class CommandRunner {
private constructor() {}
static getInstance(): CommandRunner {
static getInstance() {
if (!(window as any).GlobalCommandRunner) {
(window as any).GlobalCommandRunner = new CommandRunner();
}
+2 -2
View File
@@ -1,6 +1,6 @@
import { Model } from "./model";
import { CommandRunner } from "./commandrunner";
const GlobalModel: Model = Model.getInstance();
const GlobalCommandRunner: CommandRunner = CommandRunner.getInstance();
const GlobalModel = Model.getInstance();
const GlobalCommandRunner = CommandRunner.getInstance();
export { GlobalModel, GlobalCommandRunner };
+15 -10
View File
@@ -13,10 +13,10 @@ import {
HistoryQueryOpts,
HistoryTypeStrs,
OpenAICmdInfoChatMessageType,
OV,
StrWithPos,
} from "../types/types";
import { StrWithPos } from "../types/types";
import * as appconst from "../app/appconst";
import { OV } from "../types/types";
import { Model } from "./model";
import { GlobalCommandRunner } from "./global";
@@ -207,6 +207,7 @@ class InputModel {
this.historyQueryOpts.set(opts);
let bestIndex = this.findBestNewIndex(oldItem);
setTimeout(() => this.setHistoryIndex(bestIndex, true), 10);
return;
})();
}
@@ -623,17 +624,13 @@ class InputModel {
}
openAIAssistantChat(): void {
mobx.action(() => {
this.aIChatShow.set(true);
this.setAIChatFocus();
})();
this.aIChatShow.set(true);
this.setAIChatFocus();
}
closeAIAssistantChat(): void {
mobx.action(() => {
this.aIChatShow.set(false);
this.giveFocus();
})();
this.aIChatShow.set(false);
this.giveFocus();
}
clearAIAssistantChat(): void {
@@ -724,6 +721,14 @@ class InputModel {
setCurLine(val: string): void {
let hidx = this.historyIndex.get();
mobx.action(() => {
// if (val == "\" ") {
// this.setInputMode("comment");
// val = "";
// }
// if (val == "//") {
// this.setInputMode("global");
// val = "";
// }
if (this.modHistory.length <= hidx) {
this.modHistory.length = hidx + 1;
}
+3 -3
View File
@@ -8,14 +8,14 @@ import { modalsRegistry } from "../app/common/modals/registry";
import { OArr } from "../types/types";
class ModalsModel {
store: OArr<ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store", deep: false });
store: OArr<ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store" });
pushModal(modalId: string, props?: any) {
pushModal(modalId: string) {
const modalFactory = modalsRegistry[modalId];
if (modalFactory && !this.store.some((modal) => modal.id === modalId)) {
mobx.action(() => {
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4(), props });
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4() });
})();
}
}
+244 -301
View File
File diff suppressed because it is too large Load Diff
@@ -51,8 +51,6 @@ import {
HistoryViewDataType,
AlertMessageType,
HistorySearchParams,
UserInputRequest,
UserInputResponsePacket,
FocusTypeStrs,
ScreenLinesType,
HistoryTypeStrs,
@@ -3378,14 +3376,14 @@ class RemotesModel {
}
class ModalsModel {
store: OArr<T.ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store", deep: false });
store: OArr<T.ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store" });
pushModal(modalId: string, props?: any) {
pushModal(modalId: string) {
const modalFactory = modalsRegistry[modalId];
if (modalFactory && !this.store.some((modal) => modal.id === modalId)) {
mobx.action(() => {
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4(), props: props });
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4() });
})();
}
}
@@ -4186,10 +4184,6 @@ class Model {
this.getScreenById_single(snc.screenid)?.setNumRunningCmds(snc.num);
}
}
if ("userinputrequest" in update) {
let userInputRequest: UserInputRequest = update.userinputrequest;
this.modalsModel.pushModal(appconst.USER_INPUT, userInputRequest);
}
}
updateRemotes(remotes: RemoteType[]): void {
@@ -4597,10 +4591,6 @@ class Model {
this.ws.pushMessage(inputPacket);
}
sendUserInput(userInputResponsePacket: UserInputResponsePacket) {
this.ws.pushMessage(userInputResponsePacket);
}
sendCmdInputText(screenId: string, sp: T.StrWithPos) {
let pk: T.CmdInputTextPacketType = {
type: "cmdinputtext",
+6 -3
View File
@@ -12,6 +12,9 @@ import { GlobalCommandRunner } from "./global";
import { Model } from "./model";
import { getTermPtyData } from "../util/modelutil";
const RemotePtyRows = 8; // also in main.tsx
const RemotePtyCols = 80;
class RemotesModel {
globalModel: Model;
selectedRemoteId: OV<string> = mobx.observable.box(null, {
@@ -177,14 +180,14 @@ class RemotesModel {
return;
}
let termOpts = {
rows: appconst.RemotePtyRows,
cols: appconst.RemotePtyCols,
rows: RemotePtyRows,
cols: RemotePtyCols,
flexrows: false,
maxptysize: 64 * 1024,
};
let termWrap = new TermWrap(elem, {
termContext: { remoteId: remoteId },
usedRows: appconst.RemotePtyRows,
usedRows: RemotePtyRows,
termOpts: termOpts,
winSize: null,
keyHandler: (e, termWrap) => {
+1 -1
View File
@@ -139,7 +139,7 @@ class ScreenLines {
return;
}
let lineIdx = 0;
for (lineIdx; lineIdx < lines.length; lineIdx++) {
for (lineIdx = 0; lineIdx < lines.length; lineIdx++) {
let lineId = lines[lineIdx].lineid;
let curTs = lines[lineIdx].ts;
if (lineId == line.lineid) {

Some files were not shown because too many files have changed in this diff Show More