feat: add fly-sprites-workers Paseo plugin
This commit is contained in:
commit
0c4027ebe5
15 files changed
+7446
No files matched your search
@@ -0,0 +1,63 @@
|
||||
import type {
|
||||
PluginClientContext,
|
||||
PluginSidebarItemProps,
|
||||
PluginWorkspacePanelProps,
|
||||
} from "@getpaseo/plugin/client";
|
||||
import { SidebarRow } from "@getpaseo/plugin/client/ui";
|
||||
import { FlySpritesSettingsScreen } from "./client/settings-screen";
|
||||
import { FlySpritesWorkersScreen } from "./client/workers-screen";
|
||||
|
||||
function WorkersSidebarItem({ currentScreen, openScreen }: PluginSidebarItemProps) {
|
||||
return (
|
||||
<SidebarRow
|
||||
icon="Cpu"
|
||||
active={currentScreen?.screenId === "workers"}
|
||||
onPress={() => openScreen({ screenId: "workers" })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function WorkspaceWorkersPanel({ workspaceId, ...hostProps }: PluginWorkspacePanelProps) {
|
||||
return <FlySpritesWorkersScreen {...hostProps} workspaceId={workspaceId} />;
|
||||
}
|
||||
|
||||
export default function contribute(client: PluginClientContext) {
|
||||
client.addScreen({
|
||||
id: "workers",
|
||||
title: "Fly Sprites Workers",
|
||||
Component: FlySpritesWorkersScreen,
|
||||
});
|
||||
|
||||
client.addWorkspacePanel({
|
||||
id: "fly-sprites-workers",
|
||||
title: "Fly Sprites",
|
||||
icon: "Cpu",
|
||||
Component: WorkspaceWorkersPanel,
|
||||
});
|
||||
|
||||
client.addSidebarHeaderItem({
|
||||
id: "fly-sprites-workers",
|
||||
title: "Fly Sprites",
|
||||
Component: WorkersSidebarItem,
|
||||
});
|
||||
|
||||
client.addCommandCenterItem({
|
||||
id: "open-fly-sprites-workers",
|
||||
title: "Open Fly Sprites Workers",
|
||||
icon: "Cpu",
|
||||
keywords: ["fly", "sprites", "workers", "vm", "sandbox", "remote"],
|
||||
context: "global",
|
||||
onSelect({ openScreen }) {
|
||||
openScreen({ screenId: "workers" });
|
||||
},
|
||||
});
|
||||
|
||||
client.addSettingsScreen({
|
||||
id: "fly-sprites",
|
||||
title: "Fly Sprites Workers",
|
||||
icon: "Cpu",
|
||||
Component: FlySpritesSettingsScreen,
|
||||
});
|
||||
|
||||
return () => {};
|
||||
}
|
||||
Reference in new issue
Block a user