mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning
This commit is contained in:
1 parent
c21bca8cf0
commit
fbe736bc20
70 files changed
+1117
-1139
No files matched your search
@@ -42,6 +42,8 @@ export interface PluginHostSettingsContribution {
|
||||
enableKey?: string;
|
||||
enableLabelKey?: string;
|
||||
enableDefault?: boolean;
|
||||
editorGroup?: "top" | "ssh";
|
||||
editorOrder?: number;
|
||||
fields: PluginSettingsField[];
|
||||
}
|
||||
|
||||
@@ -246,30 +248,3 @@ export async function getPlugins(): Promise<PluginSummary[]> {
|
||||
const response = await rbacApi.get("/plugins");
|
||||
return Array.isArray(response.data) ? response.data : [];
|
||||
}
|
||||
|
||||
export async function setPluginEnabled(
|
||||
pluginId: string,
|
||||
enabled: boolean,
|
||||
): Promise<void> {
|
||||
await rbacApi.patch(`/plugins/${encodeURIComponent(pluginId)}/state`, {
|
||||
enabled,
|
||||
});
|
||||
}
|
||||
|
||||
export async function grantPluginCapability(
|
||||
pluginId: string,
|
||||
capability: string,
|
||||
): Promise<void> {
|
||||
await rbacApi.post(`/plugins/${encodeURIComponent(pluginId)}/grants`, {
|
||||
capability,
|
||||
});
|
||||
}
|
||||
|
||||
export async function revokePluginCapability(
|
||||
pluginId: string,
|
||||
capability: string,
|
||||
): Promise<void> {
|
||||
await rbacApi.delete(
|
||||
`/plugins/${encodeURIComponent(pluginId)}/grants/${encodeURIComponent(capability)}`,
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user