mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix: finish 2.9.0 plugin moves and get every check green
This commit is contained in:
1 parent
8c1e02af89
commit
6489b62ece
335 files changed
+29878
-17749
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/** One of this plugin's host settings, from the host payload. */
|
||||
export function fileManagerHostSetting<T>(
|
||||
host: object | null | undefined,
|
||||
key: "enableFileManager" | "defaultPath" | "scpLegacy",
|
||||
fallback: T,
|
||||
): T {
|
||||
const settings = (
|
||||
host as { pluginSettings?: Record<string, Record<string, unknown>> } | null
|
||||
)?.pluginSettings;
|
||||
const value = settings?.["file-manager"]?.[key];
|
||||
return value === undefined || value === null || value === ""
|
||||
? fallback
|
||||
: (value as T);
|
||||
}
|
||||
Reference in new issue
Block a user