ALwrity + Wix + Wordpress + GSC + Bug Fixes
This commit is contained in:
@@ -80,8 +80,6 @@ const CitationHoverHandler: React.FC<CitationHoverHandlerProps> = ({ researchSou
|
||||
modal.style.padding = '18px 20px';
|
||||
|
||||
const title = (src.title || 'Untitled').replace(/</g, '<');
|
||||
const url = (src.url || '').replace(/</g, '<');
|
||||
const sourceType = src.source_type ? String(src.source_type).replace('_', ' ') : '';
|
||||
|
||||
modal.innerHTML =
|
||||
'<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px">' +
|
||||
@@ -163,8 +161,6 @@ const CitationHoverHandler: React.FC<CitationHoverHandlerProps> = ({ researchSou
|
||||
tip.style.backdropFilter = 'blur(5px)';
|
||||
|
||||
const title = (src.title || 'Untitled').replace(/</g, '<');
|
||||
const url = (src.url || '').replace(/</g, '<');
|
||||
const sourceType = src.source_type ? String(src.source_type).replace('_', ' ') : '';
|
||||
|
||||
tip.innerHTML =
|
||||
'<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px">' +
|
||||
|
||||
@@ -85,7 +85,7 @@ const ContentDisplayArea: React.FC<ContentDisplayAreaProps> = ({
|
||||
if (draft !== localDraft) {
|
||||
setLocalDraft(draft);
|
||||
}
|
||||
}, [draft]);
|
||||
}, [draft, localDraft]);
|
||||
|
||||
// Cleanup debounced saver
|
||||
useEffect(() => {
|
||||
|
||||
@@ -356,6 +356,7 @@ const ContentPreviewHeaderWithModals: React.FC<ContentPreviewHeaderProps> = (pro
|
||||
window.removeEventListener('showCitationsModal', handleShowCitationsModal as EventListener);
|
||||
window.removeEventListener('showSearchQueriesModal', handleShowSearchQueriesModal as EventListener);
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -36,7 +36,6 @@ const MainContentPreviewHeader: React.FC<MainContentPreviewHeaderProps> = ({
|
||||
onAssistantToggle,
|
||||
topic
|
||||
}) => {
|
||||
const formatPercent = (v?: number) => typeof v === 'number' ? `${Math.round(v * 100)}%` : '—';
|
||||
const getChipColor = (v?: number) => {
|
||||
if (typeof v !== 'number') return '#6b7280';
|
||||
if (v >= 0.8) return '#10b981';
|
||||
|
||||
@@ -97,6 +97,7 @@ const PersonaChip: React.FC<PersonaChipProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
fetchPersonaData();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [platform, userId]);
|
||||
|
||||
const handleSavePersona = async (data: PersonaData, saveToDatabase: boolean) => {
|
||||
|
||||
@@ -24,7 +24,7 @@ const QuickEditToolbar: React.FC<QuickEditToolbarProps> = ({ draft, isPreviewing
|
||||
const lines = draft.split('\n');
|
||||
if (lines.length > 0) {
|
||||
const first = lines[0].trim();
|
||||
lines[0] = first.replace(/^(.*?)([\.!?])?$/, '👉 $1$2');
|
||||
lines[0] = first.replace(/^(.*?)([.!?])?$/, '👉 $1$2');
|
||||
}
|
||||
const target = lines.join('\n');
|
||||
window.dispatchEvent(new CustomEvent('linkedinwriter:applyEdit', { detail: { target } }));
|
||||
@@ -62,7 +62,7 @@ const QuickEditToolbar: React.FC<QuickEditToolbarProps> = ({ draft, isPreviewing
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
const target = `[Professionalized]` + '\n\n' + draft;
|
||||
const target = '[Professionalized]\n\n' + draft;
|
||||
window.dispatchEvent(new CustomEvent('linkedinwriter:applyEdit', { detail: { target } }));
|
||||
}}
|
||||
style={{ padding: '6px 10px', border: '1px solid #ddd', borderRadius: 6, background: '#fff', cursor: 'pointer' }}
|
||||
|
||||
@@ -2,10 +2,6 @@ import React, { useState, useRef, useEffect } from 'react';
|
||||
import { hallucinationDetectorService, HallucinationDetectionResponse } from '../../services/hallucinationDetectorService';
|
||||
import FactCheckResults from '../LinkedInWriter/components/FactCheckResults';
|
||||
|
||||
interface TextSelectionHandlerProps {
|
||||
contentRef: React.RefObject<HTMLDivElement>;
|
||||
}
|
||||
|
||||
const useTextSelectionHandler = (contentRef: React.RefObject<HTMLDivElement>) => {
|
||||
const [selectionMenu, setSelectionMenu] = useState<{ x: number; y: number; text: string } | null>(null);
|
||||
const [factCheckResults, setFactCheckResults] = useState<HallucinationDetectionResponse | null>(null);
|
||||
@@ -112,7 +108,7 @@ const useTextSelectionHandler = (contentRef: React.RefObject<HTMLDivElement>) =>
|
||||
switch (editType) {
|
||||
case 'tighten':
|
||||
// Add hook emoji to the beginning
|
||||
editedText = selectedText.replace(/^(.*?)([\.!?])?$/, '👉 $1$2');
|
||||
editedText = selectedText.replace(/^(.*?)([.!?])?$/, '👉 $1$2');
|
||||
break;
|
||||
case 'add-cta':
|
||||
// Add call-to-action
|
||||
|
||||
Reference in New Issue
Block a user