Merge branch 'markdownify' of https://github.com/getmaxun/maxun into markdownify

This commit is contained in:
amhsirak
2025-11-20 19:30:43 +05:30
2 changed files with 50 additions and 31 deletions

View File

@@ -128,6 +128,8 @@ export const RobotIntegrationPage = ({
"googleSheets" | "airtable" | "webhook" | null
>(integrationType);
const isScrapeRobot = recording?.recording_meta?.type === "scrape";
const authenticateWithGoogle = () => {
if (!recordingId) {
console.error("Cannot authenticate: recordingId is null");
@@ -729,26 +731,55 @@ export const RobotIntegrationPage = ({
width: "100%",
}}
>
<Button variant="outlined" onClick={() => {
if (!recordingId) return;
setSelectedIntegrationType("googleSheets");
setSettings({ ...settings, integrationType: "googleSheets" });
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
navigate(`${basePath}/${recordingId}/integrate/googleSheets`);
}} style={{ display: "flex", flexDirection: "column", alignItems: "center", background: 'white', color: '#ff00c3' }}>
<Button
variant="outlined"
disabled={isScrapeRobot}
onClick={() => {
if (isScrapeRobot) return;
if (!recordingId) return;
setSelectedIntegrationType("googleSheets");
setSettings({ ...settings, integrationType: "googleSheets" });
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
navigate(`${basePath}/${recordingId}/integrate/googleSheets`);
}}
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
background: 'white',
color: isScrapeRobot ? "#aaa" : "#ff00c3",
opacity: isScrapeRobot ? 0.5 : 1,
cursor: isScrapeRobot ? "not-allowed" : "pointer",
}}
>
<img src="https://ik.imagekit.io/ys1blv5kv/gsheet.svg" alt="Google Sheets" style={{ margin: "6px" }} />
Google Sheets
</Button>
<Button variant="outlined" onClick={() => {
if (!recordingId) return;
setSelectedIntegrationType("airtable");
setSettings({ ...settings, integrationType: "airtable" });
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
navigate(`${basePath}/${recordingId}/integrate/airtable`);
}} style={{ display: "flex", flexDirection: "column", alignItems: "center", background: 'white', color: '#ff00c3' }}>
<Button
variant="outlined"
disabled={isScrapeRobot}
onClick={() => {
if (isScrapeRobot) return;
if (!recordingId) return;
setSelectedIntegrationType("airtable");
setSettings({ ...settings, integrationType: "airtable" });
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
navigate(`${basePath}/${recordingId}/integrate/airtable`);
}}
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
background: 'white',
color: isScrapeRobot ? "#aaa" : "#ff00c3",
opacity: isScrapeRobot ? 0.5 : 1,
cursor: isScrapeRobot ? "not-allowed" : "pointer",
}}
>
<img src="https://ik.imagekit.io/ys1blv5kv/airtable.svg" alt="Airtable" style={{ margin: "6px" }} />
Airtable
</Button>
<Button variant="outlined" onClick={() => {
if (!recordingId) return;
setSelectedIntegrationType("webhook");