DOMPurify.sanitize(html || '', cnHtmlPurifyOptions); -const stripHtml = (html: string) => { - const div = document.createElement('div'); - div.innerHTML = sanitizeInlineHtml(html); - return div.textContent || div.innerText || ''; -}; - const rowTitle = (row: { document_title?: string; file_label?: string; file: string }) => row.document_title || row.file_label || row.file; @@ -467,12 +461,9 @@ const ReviewPanel: React.FC = () => { const { safeAreaInsets, systemUIVisible, statusBarHeight } = useThemeStore(); const activeBookKey = useReviewModeStore((state) => state.activeBookKey); const isPanelVisible = useReviewModeStore((state) => state.isPanelVisible); - const isPanelPinned = useReviewModeStore((state) => state.isPanelPinned); const panelWidth = useReviewModeStore((state) => state.panelWidth); const setPanelVisible = useReviewModeStore((state) => state.setPanelVisible); - const togglePanelPin = useReviewModeStore((state) => state.togglePanelPin); const setPanelWidth = useReviewModeStore((state) => state.setPanelWidth); - const selectRow = useReviewModeStore((state) => state.selectRow); const updateRow = useReviewModeStore((state) => state.updateRow); const setBookData = useReviewModeStore((state) => state.setBookData); const bookState = useReviewModeStore((state) => @@ -492,6 +483,7 @@ const ReviewPanel: React.FC = () => { const [saving, setSaving] = useState(false); const [retranslating, setRetranslating] = useState(false); const isMobile = window.innerWidth < 640; + const isDocked = !isMobile; const selectedRow = useMemo( () => bookState?.rows.find((row) => row.id === bookState.selectedRowId) || null, @@ -630,7 +622,7 @@ const ReviewPanel: React.FC = () => { return ( <> - {!isPanelPinned && isMobile && ( + {isMobile && ( setPanelVisible(false)} @@ -639,11 +631,13 @@ const ReviewPanel: React.FC = () => {