mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: move terminal settings, look and ssh tools into ssh-terminal plugin
This commit is contained in:
1 parent
ffa872ebd3
commit
d9bba10612
242 files changed
+25071
-7207
No files matched your search
@@ -1,15 +0,0 @@
|
||||
import { authApi, handleApiError } from "@/main-axios";
|
||||
|
||||
/** Flips Auto-Tmux for one host without round-tripping the whole editor form. */
|
||||
export async function setHostAutoTmux(
|
||||
hostId: number,
|
||||
autoTmux: boolean,
|
||||
): Promise<void> {
|
||||
try {
|
||||
await authApi.patch(`/host/db/host/${hostId}/terminal-config`, {
|
||||
autoTmux,
|
||||
});
|
||||
} catch (error) {
|
||||
throw handleApiError(error, "update host auto-tmux");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { authApi } from "@/main-axios";
|
||||
import { createTtlRequestCache } from "@/lib/ttl-request-cache";
|
||||
import type { TerminalTheme } from "@/lib/terminal-themes";
|
||||
import type { CustomKeybinding } from "@/types/keybindings";
|
||||
import { invokeAction, isActionRegistered } from "@/shell/action-registry";
|
||||
|
||||
@@ -115,12 +114,6 @@ export async function getSessionTimeoutMinutes(): Promise<number> {
|
||||
// USER PREFERENCES API
|
||||
// ============================================================================
|
||||
|
||||
export interface SavedCustomTheme {
|
||||
id: string;
|
||||
name: string;
|
||||
colors: TerminalTheme["colors"];
|
||||
}
|
||||
|
||||
export interface UserPreferences {
|
||||
reopenTabsOnLogin: boolean;
|
||||
theme?: string | null;
|
||||
@@ -128,7 +121,6 @@ export interface UserPreferences {
|
||||
accentColor?: string | null;
|
||||
language?: string | null;
|
||||
storageMode?: string | null;
|
||||
commandAutocomplete?: boolean | null;
|
||||
commandPaletteEnabled?: boolean | null;
|
||||
showHostTags?: boolean | null;
|
||||
hostTrayOnClick?: boolean | null;
|
||||
@@ -141,22 +133,10 @@ export interface UserPreferences {
|
||||
hiddenRailTabs?: string | null;
|
||||
compactHostView?: boolean | null;
|
||||
statusColorScheme?: string | null;
|
||||
customThemes?: string | null;
|
||||
customKeybindings?: string | null;
|
||||
terminalDefaults?: string | null;
|
||||
terminalMacros?: string | null;
|
||||
}
|
||||
|
||||
export function parseCustomThemes(raw?: string | null): SavedCustomTheme[] {
|
||||
if (!raw) return [];
|
||||
try {
|
||||
const parsed = JSON.parse(raw);
|
||||
return Array.isArray(parsed) ? parsed : [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export function parseCustomKeybindings(
|
||||
raw?: string | null,
|
||||
): CustomKeybinding[] {
|
||||
|
||||
@@ -125,12 +125,6 @@ export type HostDefaults = {
|
||||
socks5Password?: string;
|
||||
credentialId?: number | null;
|
||||
statusCheckEnabled?: boolean;
|
||||
fontSize?: number;
|
||||
fontFamily?: string;
|
||||
theme?: string;
|
||||
cursorStyle?: string;
|
||||
cursorBlink?: boolean;
|
||||
autoTmux?: boolean;
|
||||
};
|
||||
|
||||
export async function getHostDefaults(): Promise<HostDefaults> {
|
||||
|
||||
Reference in new issue
Block a user