mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-16 05:13:36 +00:00
feat: improve all connection types
This commit is contained in:
@@ -68,8 +68,8 @@ export function TabBar({
|
||||
|
||||
const barRect = tabBarRef.current.getBoundingClientRect();
|
||||
const x = Math.max(
|
||||
barRect.left,
|
||||
Math.min(barRect.right - d.width - 4, e.clientX - d.offsetX),
|
||||
barRect.left + 2,
|
||||
Math.min(barRect.right - d.width - 6, e.clientX - d.offsetX),
|
||||
);
|
||||
const y = d.barTop;
|
||||
setDragPos({ x, y });
|
||||
|
||||
@@ -113,6 +113,7 @@ export function renderTabContent(
|
||||
tab: Tab,
|
||||
onOpenSingletonTab?: (type: TabType) => void,
|
||||
onOpenTab?: (host: Host, type: TabType) => void,
|
||||
onCloseTab?: (id: string) => void,
|
||||
) {
|
||||
const { host, label } = tab;
|
||||
|
||||
@@ -136,6 +137,7 @@ export function renderTabContent(
|
||||
return (
|
||||
<CommandHistoryProvider>
|
||||
<TerminalFeature
|
||||
ref={tab.terminalRef as any}
|
||||
hostConfig={
|
||||
{
|
||||
...hostToSSHHost(host),
|
||||
@@ -146,7 +148,7 @@ export function renderTabContent(
|
||||
title={label}
|
||||
showTitle={false}
|
||||
splitScreen={false}
|
||||
onClose={() => {}}
|
||||
onClose={() => onCloseTab?.(tab.id)}
|
||||
/>
|
||||
</CommandHistoryProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user