Initial git-clone Paseo plugin (refactored from gitea-clone)
This commit is contained in:
commit
2fa79ffc69
14 files changed
+5229
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import type { PluginClientContext, PluginSidebarItemProps } from "@getpaseo/plugin/client";
|
||||
import { SidebarRow } from "@getpaseo/plugin/client/ui";
|
||||
import { GitCloneScreen } from "./client/git-clone";
|
||||
|
||||
function GitCloneItem({ currentScreen, openScreen }: PluginSidebarItemProps) {
|
||||
return (
|
||||
<SidebarRow
|
||||
icon="FolderGit2"
|
||||
label="Clone from Git URL"
|
||||
active={currentScreen?.screenId === "clone"}
|
||||
onPress={() => openScreen({ screenId: "clone" })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default function contribute(client: PluginClientContext) {
|
||||
client.addScreen({ id: "clone", title: "Clone from Git URL", Component: GitCloneScreen });
|
||||
client.addSidebarFooterItem({
|
||||
id: "clone",
|
||||
title: "Clone from Git URL",
|
||||
Component: GitCloneItem,
|
||||
});
|
||||
client.addCommandCenterItem({
|
||||
id: "clone-from-git-url",
|
||||
title: "Clone from Git URL",
|
||||
icon: "FolderGit2",
|
||||
keywords: [
|
||||
"git",
|
||||
"clone",
|
||||
"url",
|
||||
"repository",
|
||||
"repo",
|
||||
"github",
|
||||
"gitlab",
|
||||
"gitea",
|
||||
"project",
|
||||
],
|
||||
context: "global",
|
||||
onSelect({ openScreen }) {
|
||||
openScreen({ screenId: "clone" });
|
||||
},
|
||||
});
|
||||
return () => {};
|
||||
}
|
||||
Reference in new issue
Block a user