Files
outline/plugins/gitea/client/components/GiteaButton.tsx
T
Tom Moor 9aad5a4bb7 feat: Add Gitea / Forgejo integration (#14336)
* feat: Add Gitea integration for issue, pull request, and repository previews

* fix: Gitea repository previews and request deadlines

Refresh the token before repository discovery, keep repository previews when
the issue tracker is disabled, and keep the request timeout active while the
response body is read.

* chore: Use the shared fetch timeout for Gitea requests

* chore: Mention Forgejo in Gitea copy and reuse the callback URL helper

* Remove service specific getters in IntegrationsStore
2026-10-25 18:04:04 -04:00

26 lines
657 B
TypeScript

import { useTranslation } from "react-i18next";
import Button, { type Props } from "~/components/Button";
import useStores from "~/hooks/useStores";
import { GiteaConnectDialog } from "./GiteaConnectDialog";
/**
* Button that opens a dialog to connect to a Gitea instance.
*/
export function GiteaConnectButton(props: Props<"button">) {
const { t } = useTranslation();
const { dialogs } = useStores();
const handleClick = () => {
dialogs.openModal({
title: t("Connect Gitea"),
content: <GiteaConnectDialog />,
});
};
return (
<Button onClick={handleClick} neutral {...props}>
{t("Connect")}
</Button>
);
}