mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
chore: lock the plugin boundary and remove 2.9.0 leftovers
This commit is contained in:
1 parent
6489b62ece
commit
2961297989
399 files changed
+3964
-5627
No files matched your search
@@ -26,11 +26,8 @@ import {
|
||||
Play,
|
||||
Clipboard,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
getRecentActivity,
|
||||
getSnippets,
|
||||
type RecentActivityItem,
|
||||
} from "@/main-axios";
|
||||
import { getRecentActivity, type RecentActivityItem } from "@/main-axios";
|
||||
import { listSnippets } from "@/lib/snippet-provider";
|
||||
import type { Host, TabType, Tab, Snippet } from "@/types/ui-types";
|
||||
import { canEditHost } from "@/sidebar/host-permissions";
|
||||
import { RAIL_UTILITY_ITEMS, useRailItems } from "@/sidebar/rail-items";
|
||||
@@ -85,8 +82,8 @@ export function CommandPalette({
|
||||
getRecentActivity(5)
|
||||
.then(setRecentActivity)
|
||||
.catch(() => {});
|
||||
getSnippets()
|
||||
.then((data) => setSnippets((data ?? []) as unknown as Snippet[]))
|
||||
listSnippets()
|
||||
.then((data) => setSnippets(data as unknown as Snippet[]))
|
||||
.catch(() => {});
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
@@ -104,10 +104,6 @@ export function registerAction(
|
||||
};
|
||||
}
|
||||
|
||||
export function unregisterAction(id: string): void {
|
||||
if (actions.delete(id)) emit();
|
||||
}
|
||||
|
||||
/** Every registered action. */
|
||||
export function listActions(): RegisteredAction[] {
|
||||
return [...actions.values()];
|
||||
@@ -151,15 +147,6 @@ export function declareActionSlot(slot: ActionSlotDefinition): () => void {
|
||||
};
|
||||
}
|
||||
|
||||
/** Whether a slot is declared, i.e. its owner is running. */
|
||||
export function isActionSlotDeclared(slotId: string): boolean {
|
||||
return slots.has(slotId);
|
||||
}
|
||||
|
||||
export function undeclareActionSlot(slotId: string): void {
|
||||
if (slots.delete(slotId)) emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a contribution to a slot.
|
||||
*
|
||||
|
||||
@@ -24,7 +24,6 @@ export interface PanelDef {
|
||||
const registry = createRegistry<PanelDef>();
|
||||
|
||||
export const registerPanel = registry.register;
|
||||
export const unregisterPanel = registry.unregister;
|
||||
export const getPanel = registry.get;
|
||||
export const listPanels = registry.list;
|
||||
export const usePanels = registry.useList;
|
||||
|
||||
@@ -37,7 +37,7 @@ const CORE_UNSAVED = new Set([
|
||||
* failed, still loading or not installed. The shell shows a placeholder for
|
||||
* it, and a layout keeps it so nothing is lost when the plugin comes back.
|
||||
*/
|
||||
export function isUnregisteredPluginTabType(type: string): boolean {
|
||||
function isUnregisteredPluginTabType(type: string): boolean {
|
||||
return (
|
||||
!CORE_UNSAVED.has(type) && !CORE_CAPTURABLE.has(type) && !getTabType(type)
|
||||
);
|
||||
|
||||
@@ -81,10 +81,8 @@ export interface TabTypeDef {
|
||||
const registry = createRegistry<TabTypeDef>();
|
||||
|
||||
export const registerTabType = registry.register;
|
||||
export const unregisterTabType = registry.unregister;
|
||||
export const getTabType = registry.get;
|
||||
export const listTabTypes = registry.list;
|
||||
export const subscribeToTabTypes = registry.subscribe;
|
||||
export const useTabTypes = registry.useList;
|
||||
export const resetTabTypes = registry.reset;
|
||||
|
||||
@@ -115,7 +113,7 @@ export function isSessionTabType(type: string): boolean {
|
||||
return CORE_SESSION.has(type) || !!registry.get(type)?.session;
|
||||
}
|
||||
|
||||
export function isHostlessTabType(type: string): boolean {
|
||||
function isHostlessTabType(type: string): boolean {
|
||||
return CORE_HOSTLESS.has(type) || !!registry.get(type)?.hostless;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user