fix: cloud -> oss sync
This commit is contained in:
@@ -21,17 +21,14 @@ import { useThemeMode } from '../../context/theme-provider';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useBrowserSteps } from '../../context/browserSteps';
|
import { useBrowserSteps } from '../../context/browserSteps';
|
||||||
import { useActionContext } from '../../context/browserActions';
|
import { useActionContext } from '../../context/browserActions';
|
||||||
import { useTutorial } from '../../context/tutorial';
|
|
||||||
|
|
||||||
interface InterpretationLogProps {
|
interface InterpretationLogProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
setIsOpen: (isOpen: boolean) => void;
|
setIsOpen: (isOpen: boolean) => void;
|
||||||
tutorialMode?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, setIsOpen, tutorialMode = false }) => {
|
export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, setIsOpen }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const tutorial = tutorialMode ? useTutorial() : null;
|
|
||||||
|
|
||||||
const [captureListData, setCaptureListData] = useState<any[]>([]);
|
const [captureListData, setCaptureListData] = useState<any[]>([]);
|
||||||
const [captureTextData, setCaptureTextData] = useState<any[]>([]);
|
const [captureTextData, setCaptureTextData] = useState<any[]>([]);
|
||||||
@@ -108,11 +105,6 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
|
|
||||||
setEditingField(null);
|
setEditingField(null);
|
||||||
setEditingValue('');
|
setEditingValue('');
|
||||||
|
|
||||||
// Advance tutorial if in tutorial mode
|
|
||||||
if (tutorialMode && tutorial) {
|
|
||||||
tutorial.handleFieldLabelsEdited();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -154,11 +146,6 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
|
|
||||||
setEditingListName(null);
|
setEditingListName(null);
|
||||||
setEditingListNameValue('');
|
setEditingListNameValue('');
|
||||||
|
|
||||||
// Advance tutorial if in tutorial mode
|
|
||||||
if (tutorialMode && tutorial) {
|
|
||||||
tutorial.handleListNameEdited();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -794,14 +781,12 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{(captureListData[activeListTab]?.data || [])
|
{(captureListData[activeListTab]?.data || [])
|
||||||
.slice(0, tutorialMode ? (captureListData[activeListTab]?.data?.length || 0) : Math.min(captureListData[activeListTab]?.limit || 10, 5))
|
.slice(0, Math.min(captureListData[activeListTab]?.limit || 10, 5))
|
||||||
.map((row: any, rowIndex: any) => (
|
.map((row: any, rowIndex: any) => (
|
||||||
<TableRow
|
<TableRow
|
||||||
key={rowIndex}
|
key={rowIndex}
|
||||||
sx={{
|
sx={{
|
||||||
borderBottom: rowIndex < (tutorialMode
|
borderBottom: rowIndex < (Math.min((captureListData[activeListTab]?.data?.length || 0), Math.min(captureListData[activeListTab]?.limit || 10, 5))
|
||||||
? (captureListData[activeListTab]?.data?.length || 0)
|
|
||||||
: Math.min((captureListData[activeListTab]?.data?.length || 0), Math.min(captureListData[activeListTab]?.limit || 10, 5))
|
|
||||||
) - 1 ? '1px solid' : 'none',
|
) - 1 ? '1px solid' : 'none',
|
||||||
borderColor: darkMode ? '#080808ff' : '#dee2e6'
|
borderColor: darkMode ? '#080808ff' : '#dee2e6'
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user