feat: redesign user host defaults system

This commit is contained in:
LukeGus committed 2026-09-30 06:19:56 -05:00
1 parent 3028ab1176
commit a4a4d4f27b
144 files changed
+24609 -2555

No files matched your search

+14
View File
@@ -403,6 +403,13 @@ export interface HostEditorSectionProps {
adminTargetUserId?: string;
/** Which connection protocols are switched on for this host. */
protocols: Record<string, boolean>;
/**
* "defaults" while the editor sets a level of host defaults (server, user
* or folder) rather than one host. There is no `host` then, and the form
* holds the defaults. Only a section registered with `defaults: true` is
* shown in that mode.
*/
mode?: "host" | "defaults";
}
export interface HostEditorSectionContribution {
@@ -418,6 +425,13 @@ export interface HostEditorSectionContribution {
order?: number;
/** Whether to offer the tab, from the host's enabled protocols. */
visible?: (protocols: Record<string, boolean>) => boolean;
/**
* Also shown in the host defaults editor. Only for a section whose fields
* are this plugin's host settings kept on the form, and that makes no
* calls about one particular host. Off by default. "only" shows it in the
* defaults editor and never for a host.
*/
defaults?: boolean | "only";
component: ComponentType<HostEditorSectionProps>;
}