mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 23:55:23 +00:00
feat: wire remote-desktop plugin into core and rename i18n keys
Repoints core consumers (dispatcher, collab, session-sharing, tab utils) at the plugin, adds isTabTypeAvailable gating for rdp/vnc/ telnet, widens hostCapability to accept an array, and renames the guacamole i18n namespace to remoteDesktop.
This commit is contained in:
1 parent
c6bcfdb80d
commit
76b2e5739a
41 files changed
+361
-686
No files matched your search
@@ -539,11 +539,12 @@ export function CommandPalette({
|
||||
handleAction(() => {
|
||||
const type = host.enableSsh
|
||||
? "terminal"
|
||||
: host.enableRdp
|
||||
: host.enableRdp && isTabTypeAvailable("rdp")
|
||||
? "rdp"
|
||||
: host.enableVnc
|
||||
: host.enableVnc && isTabTypeAvailable("vnc")
|
||||
? "vnc"
|
||||
: host.enableTelnet
|
||||
: host.enableTelnet &&
|
||||
isTabTypeAvailable("telnet")
|
||||
? "telnet"
|
||||
: "terminal";
|
||||
onOpenTab(type, host.name);
|
||||
@@ -599,12 +600,13 @@ export function CommandPalette({
|
||||
),
|
||||
)}
|
||||
{host.enableSsh &&
|
||||
(host.enableRdp ||
|
||||
host.enableVnc ||
|
||||
host.enableTelnet) && (
|
||||
((host.enableRdp && isTabTypeAvailable("rdp")) ||
|
||||
(host.enableVnc && isTabTypeAvailable("vnc")) ||
|
||||
(host.enableTelnet &&
|
||||
isTabTypeAvailable("telnet"))) && (
|
||||
<div className="w-px h-3.5 bg-border/60 mx-0.5 shrink-0" />
|
||||
)}
|
||||
{host.enableRdp && (
|
||||
{host.enableRdp && isTabTypeAvailable("rdp") && (
|
||||
<button
|
||||
title="RDP"
|
||||
onClick={(e) => {
|
||||
@@ -619,7 +621,7 @@ export function CommandPalette({
|
||||
RDP
|
||||
</button>
|
||||
)}
|
||||
{host.enableVnc && (
|
||||
{host.enableVnc && isTabTypeAvailable("vnc") && (
|
||||
<button
|
||||
title="VNC"
|
||||
onClick={(e) => {
|
||||
@@ -634,21 +636,22 @@ export function CommandPalette({
|
||||
VNC
|
||||
</button>
|
||||
)}
|
||||
{host.enableTelnet && (
|
||||
<button
|
||||
title="Telnet"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleAction(() =>
|
||||
onOpenTab("telnet", host.name),
|
||||
);
|
||||
}}
|
||||
className="flex items-center gap-1 px-2 h-6 rounded text-xs font-medium text-muted-foreground/70 hover:text-foreground hover:bg-muted-foreground/10 transition-colors border border-border/40"
|
||||
>
|
||||
<Terminal className="size-3" />
|
||||
Telnet
|
||||
</button>
|
||||
)}
|
||||
{host.enableTelnet &&
|
||||
isTabTypeAvailable("telnet") && (
|
||||
<button
|
||||
title="Telnet"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleAction(() =>
|
||||
onOpenTab("telnet", host.name),
|
||||
);
|
||||
}}
|
||||
className="flex items-center gap-1 px-2 h-6 rounded text-xs font-medium text-muted-foreground/70 hover:text-foreground hover:bg-muted-foreground/10 transition-colors border border-border/40"
|
||||
>
|
||||
<Terminal className="size-3" />
|
||||
Telnet
|
||||
</button>
|
||||
)}
|
||||
{canEditHost(host) && (
|
||||
<>
|
||||
<div className="w-px h-3.5 bg-border/60 mx-0.5 shrink-0" />
|
||||
|
||||
Reference in new issue
Block a user