mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: merge host editor terminal tabs into one owned by ssh-terminal
This commit is contained in:
1 parent
fff373d5bd
commit
c7fd900732
10 files changed
+162
-986
No files matched your search
@@ -220,5 +220,8 @@
|
||||
"title": "Read command history",
|
||||
"description": "Lets other features, such as the AI assistant, read your command history."
|
||||
}
|
||||
},
|
||||
"hosts": {
|
||||
"tabTerminal": "Terminal"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { lazy, Suspense, type ComponentType } from "react";
|
||||
import { History, Laptop, Terminal } from "lucide-react";
|
||||
import { History, Laptop, SquareTerminal, Terminal } from "lucide-react";
|
||||
import type {
|
||||
PanelProps,
|
||||
StandaloneViewProps,
|
||||
@@ -21,6 +21,7 @@ import { TerminalView } from "./TerminalView";
|
||||
import { HistoryPanel } from "./history/HistoryPanel";
|
||||
import { TouchInputSettings } from "./settings/TouchInputSettings";
|
||||
import { ImageStorageTest } from "./settings/ImageStorageTest";
|
||||
import { HostTerminalSection } from "./settings/HostTerminalSection";
|
||||
import { resetTouchInputSettingsCache } from "./terminal/touch-input-settings-store";
|
||||
import { hostSetting } from "./terminal-api";
|
||||
|
||||
@@ -94,6 +95,15 @@ export function activate(app: TermixApp): void {
|
||||
!!host.enableSsh && hostSetting(host, "enableTerminal", true),
|
||||
});
|
||||
|
||||
app.registerHostEditorSection({
|
||||
id: "terminal",
|
||||
group: "ssh",
|
||||
titleKey: "hosts.tabTerminal",
|
||||
icon: SquareTerminal,
|
||||
order: 10,
|
||||
component: HostTerminalSection,
|
||||
});
|
||||
|
||||
if (isElectron()) {
|
||||
app.registerTab("local-terminal", LocalTerminalTab, {
|
||||
icon: Laptop,
|
||||
|
||||
@@ -63,6 +63,11 @@ describe(`${manifest.id} activate`, () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("owns the host editor's Terminal tab in the SSH group", async () => {
|
||||
rendered = await renderWithApp(plugin, { manifest, locales });
|
||||
expect(rendered.registered.hostEditorSections()).toEqual(["terminal"]);
|
||||
});
|
||||
|
||||
it("registers the command history panel and its rail item", async () => {
|
||||
rendered = await renderWithApp(plugin, { manifest, locales });
|
||||
expect(rendered.registered.panels()).toContain("history");
|
||||
|
||||
Reference in new issue
Block a user