Merge remote-tracking branch 'origin/dev-1.10.1' into dev-1.10.1

This commit is contained in:
LukeGus
2026-01-02 00:32:33 -06:00
15 changed files with 72 additions and 45 deletions

View File

@@ -18,6 +18,7 @@ import {
keepaliveDockerSession,
verifyDockerTOTP,
logActivity,
getSSHHosts,
} from "@/ui/main-axios.ts";
import { SimpleLoader } from "@/ui/desktop/navigation/animations/SimpleLoader.tsx";
import { AlertCircle } from "lucide-react";
@@ -121,7 +122,6 @@ export function DockerManager({
const fetchLatestHostConfig = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {
@@ -138,7 +138,6 @@ export function DockerManager({
const handleHostsChanged = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {

View File

@@ -11,6 +11,8 @@ import {
submitMetricsTOTP,
executeSnippet,
logActivity,
sendMetricsHeartbeat,
getSSHHosts,
type ServerMetrics,
} from "@/ui/main-axios.ts";
import { TOTPDialog } from "@/ui/desktop/navigation/TOTPDialog.tsx";
@@ -145,7 +147,6 @@ export function ServerStats({
const heartbeatInterval = setInterval(async () => {
try {
const { sendMetricsHeartbeat } = await import("@/ui/main-axios.ts");
await sendMetricsHeartbeat(viewerSessionId);
} catch (error) {
console.error("Failed to send heartbeat:", error);
@@ -273,7 +274,6 @@ export function ServerStats({
const fetchLatestHostConfig = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {
@@ -290,7 +290,6 @@ export function ServerStats({
const handleHostsChanged = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {

View File

@@ -18,6 +18,8 @@ import {
isElectron,
logActivity,
getSnippets,
deleteCommandFromHistory,
getCommandHistory,
} from "@/ui/main-axios.ts";
import { TOTPDialog } from "@/ui/desktop/navigation/TOTPDialog.tsx";
import { SSHAuthDialog } from "@/ui/desktop/navigation/SSHAuthDialog.tsx";
@@ -212,8 +214,7 @@ export const Terminal = forwardRef<TerminalHandle, SSHTerminalProps>(
if (showHistoryDialog && hostConfig.id) {
setIsLoadingHistory(true);
setIsLoadingRef.current(true);
import("@/ui/main-axios.ts")
.then((module) => module.getCommandHistory(hostConfig.id!))
getCommandHistory(hostConfig.id!)
.then((history) => {
setCommandHistory(history);
setCommandHistoryContextRef.current(history);
@@ -235,8 +236,7 @@ export const Terminal = forwardRef<TerminalHandle, SSHTerminalProps>(
localStorage.getItem("commandAutocomplete") === "true";
if (hostConfig.id && autocompleteEnabled) {
import("@/ui/main-axios.ts")
.then((module) => module.getCommandHistory(hostConfig.id!))
getCommandHistory(hostConfig.id!)
.then((history) => {
autocompleteHistory.current = history;
})
@@ -1107,8 +1107,6 @@ export const Terminal = forwardRef<TerminalHandle, SSHTerminalProps>(
if (!hostConfig.id) return;
try {
const { deleteCommandFromHistory } =
await import("@/ui/main-axios.ts");
await deleteCommandFromHistory(hostConfig.id, command);
setCommandHistory((prev) => {

View File

@@ -3,6 +3,7 @@ import { useSidebar } from "@/components/ui/sidebar.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { Tunnel } from "@/ui/desktop/apps/features/tunnel/Tunnel.tsx";
import { useTranslation } from "react-i18next";
import { getSSHHosts } from "@/ui/main-axios.ts";
interface HostConfig {
id: number;
@@ -44,7 +45,6 @@ export function TunnelManager({
const fetchLatestHostConfig = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {
@@ -61,7 +61,6 @@ export function TunnelManager({
const handleHostsChanged = async () => {
if (hostConfig?.id) {
try {
const { getSSHHosts } = await import("@/ui/main-axios.ts");
const hosts = await getSSHHosts();
const updatedHost = hosts.find((h) => h.id === hostConfig.id);
if (updatedHost) {