Merge branch 'develop' of https://github.com/getmaxun/maxun into develop
This commit is contained in:
@@ -26,7 +26,6 @@ interface RobotAttributes {
|
|||||||
google_access_token?: string | null;
|
google_access_token?: string | null;
|
||||||
google_refresh_token?: string | null;
|
google_refresh_token?: string | null;
|
||||||
schedule?: ScheduleConfig | null;
|
schedule?: ScheduleConfig | null;
|
||||||
isLogin?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ScheduleConfig {
|
interface ScheduleConfig {
|
||||||
@@ -55,7 +54,6 @@ class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements R
|
|||||||
public google_access_token!: string | null;
|
public google_access_token!: string | null;
|
||||||
public google_refresh_token!: string | null;
|
public google_refresh_token!: string | null;
|
||||||
public schedule!: ScheduleConfig | null;
|
public schedule!: ScheduleConfig | null;
|
||||||
public isLogin!: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Robot.init(
|
Robot.init(
|
||||||
@@ -101,11 +99,6 @@ Robot.init(
|
|||||||
type: DataTypes.JSONB,
|
type: DataTypes.JSONB,
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
},
|
},
|
||||||
isLogin: {
|
|
||||||
type: DataTypes.BOOLEAN,
|
|
||||||
allowNull: false,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sequelize,
|
sequelize,
|
||||||
|
|||||||
@@ -350,7 +350,6 @@ router.post('/recordings/:id/duplicate', requireSignIn, async (req: Authenticate
|
|||||||
updatedAt: currentTimestamp,
|
updatedAt: currentTimestamp,
|
||||||
},
|
},
|
||||||
recording: { ...originalRobot.recording, workflow },
|
recording: { ...originalRobot.recording, workflow },
|
||||||
isLogin: originalRobot.isLogin,
|
|
||||||
google_sheet_email: null,
|
google_sheet_email: null,
|
||||||
google_sheet_name: null,
|
google_sheet_name: null,
|
||||||
google_sheet_id: null,
|
google_sheet_id: null,
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ interface MetaData {
|
|||||||
pairs: number;
|
pairs: number;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
params: string[],
|
params: string[],
|
||||||
|
isLogin?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,6 +98,7 @@ export class WorkflowGenerator {
|
|||||||
pairs: 0,
|
pairs: 0,
|
||||||
updatedAt: '',
|
updatedAt: '',
|
||||||
params: [],
|
params: [],
|
||||||
|
isLogin: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -708,12 +710,12 @@ export class WorkflowGenerator {
|
|||||||
pairs: recording.workflow.length,
|
pairs: recording.workflow.length,
|
||||||
updatedAt: new Date().toLocaleString(),
|
updatedAt: new Date().toLocaleString(),
|
||||||
params: this.getParams() || [],
|
params: this.getParams() || [],
|
||||||
|
isLogin: isLogin,
|
||||||
}
|
}
|
||||||
const robot = await Robot.create({
|
const robot = await Robot.create({
|
||||||
userId,
|
userId,
|
||||||
recording_meta: this.recordingMeta,
|
recording_meta: this.recordingMeta,
|
||||||
recording: recording,
|
recording: recording,
|
||||||
isLogin: isLogin,
|
|
||||||
});
|
});
|
||||||
capture(
|
capture(
|
||||||
'maxun-oss-robot-created',
|
'maxun-oss-robot-created',
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ export interface RobotSettings {
|
|||||||
google_access_token?: string | null;
|
google_access_token?: string | null;
|
||||||
google_refresh_token?: string | null;
|
google_refresh_token?: string | null;
|
||||||
schedule?: ScheduleConfig | null;
|
schedule?: ScheduleConfig | null;
|
||||||
isLogin?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RobotSettingsProps {
|
interface RobotSettingsProps {
|
||||||
@@ -421,7 +420,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(robot.isLogin || Object.keys(credentials).length > 0) && (
|
{(Object.keys(credentials).length > 0) && (
|
||||||
<>
|
<>
|
||||||
<Typography variant="body1" style={{ marginBottom: '20px' }}>
|
<Typography variant="body1" style={{ marginBottom: '20px' }}>
|
||||||
{t('Input Texts')}
|
{t('Input Texts')}
|
||||||
|
|||||||
Reference in New Issue
Block a user