mirror of
https://github.com/outline/outline.git
synced 2026-11-27 16:08:58 +03:00
* 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
26 lines
657 B
TypeScript
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>
|
|
);
|
|
}
|