feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning

This commit is contained in:
LukeGus committed 2026-09-25 13:06:33 -05:00
1 parent c21bca8cf0
commit fbe736bc20
70 files changed
+1117 -1139

No files matched your search

+1
View File
@@ -81,6 +81,7 @@
"nativeRdpFailed": "Failed to open Windows Remote Desktop",
"openNativeRdp": "Open in Windows Remote Desktop",
"guac": {
"toolbar": "Toolbar",
"connection": "Connection",
"authentication": "Authentication",
"storedCredential": "Stored Credential",
+2 -1
View File
@@ -427,7 +427,8 @@
"type": "boolean",
"labelKey": "settings.host.enableToolbar.label",
"descriptionKey": "settings.host.enableToolbar.description",
"default": true
"default": true,
"hidden": true
}
]
}
+32 -1
View File
@@ -14,7 +14,12 @@ import {
type TabProps,
type TermixApp,
} from "@termix/plugin-sdk/frontend";
import { SectionCard, isElectron } from "@termix/plugin-sdk/ui";
import {
FakeSwitch,
SectionCard,
SettingRow,
isElectron,
} from "@termix/plugin-sdk/ui";
import { toast } from "sonner";
import GuacamoleApp, { type GuacamoleAppHandle } from "./GuacamoleApp";
import { GuacamoleDisplay } from "./GuacamoleDisplay";
@@ -146,6 +151,29 @@ function SectionNotes({ protocol }: { protocol: Protocol }) {
);
}
function ToolbarCard({
form,
setField,
}: Pick<ReturnType<typeof remoteDesktopForm>, "form" | "setField">) {
const { t } = useTranslation();
return (
<SectionCard
title={t("hosts.guac.toolbar")}
icon={<MonitorUp className="size-3.5" />}
>
<SettingRow
label={t("settings.host.enableToolbar.label")}
description={t("settings.host.enableToolbar.description")}
>
<FakeSwitch
checked={form.enableToolbar}
onChange={(value) => setField("enableToolbar", value)}
/>
</SettingRow>
</SectionCard>
);
}
function RdpSection(props: HostEditorSectionProps) {
const { form, setField, setGuacField } = remoteDesktopForm(props);
return (
@@ -157,6 +185,7 @@ function RdpSection(props: HostEditorSectionProps) {
host={props.host as { macAddress?: string | null } | undefined}
credentials={props.credentials as never}
/>
<ToolbarCard form={form} setField={setField} />
<SectionNotes protocol="rdp" />
</>
);
@@ -173,6 +202,7 @@ function VncSection(props: HostEditorSectionProps) {
host={props.host as { macAddress?: string | null } | undefined}
credentials={props.credentials as never}
/>
<ToolbarCard form={form} setField={setField} />
<SectionNotes protocol="vnc" />
</>
);
@@ -188,6 +218,7 @@ function TelnetSection(props: HostEditorSectionProps) {
setGuacField={setGuacField}
credentials={props.credentials as never}
/>
<ToolbarCard form={form} setField={setField} />
<SectionNotes protocol="telnet" />
</>
);
@@ -16,6 +16,7 @@ export interface RemoteDesktopForm {
vncPort: number;
telnetPort: number;
guacamoleConfig: Record<string, any>;
enableToolbar: boolean;
rdpAuthType: "direct" | "credential" | "none";
rdpCredentialId: string;
rdpUser: string;
@@ -42,6 +43,7 @@ const SETTING_FOR_FIELD: Partial<Record<keyof RemoteDesktopForm, string>> = {
telnetPort: "telnetPort",
security: "rdpSecurity",
ignoreCert: "rdpIgnoreCert",
enableToolbar: "enableToolbar",
};
type PluginSettingsBag = Record<string, Record<string, unknown>>;
@@ -72,6 +74,7 @@ export function remoteDesktopForm(props: HostEditorSectionProps): {
security: options.rdpSecurity,
ignoreCert: options.rdpIgnoreCert,
guacamoleConfig: options.guacamoleConfig as Record<string, any>,
enableToolbar: options.enableToolbar,
};
const setField: RemoteFormSetField = (key, value) => {