diff --git a/renderer/src/components/AudioRecorder/components/ReferenceSelector.js b/renderer/src/components/AudioRecorder/components/ReferenceSelector.js index be9e05d6b..2268d8382 100644 --- a/renderer/src/components/AudioRecorder/components/ReferenceSelector.js +++ b/renderer/src/components/AudioRecorder/components/ReferenceSelector.js @@ -3,7 +3,9 @@ import PropTypes from 'prop-types'; const AudioWaveform = dynamic(() => import('./WaveForm'), { ssr: false }); -export default function ReferenceSelector({ data, versepath, verse }) { +export default function ReferenceSelector({ + data, versepath, verse, font, fontSize, +}) { const path = require('path'); return (
+
1.3) ? 1.5 : '', + }} + > {story.verseText}
diff --git a/renderer/src/components/EditorPage/AudioEditor/AudioEditor.js b/renderer/src/components/EditorPage/AudioEditor/AudioEditor.js index 274f4f5be..793151c69 100644 --- a/renderer/src/components/EditorPage/AudioEditor/AudioEditor.js +++ b/renderer/src/components/EditorPage/AudioEditor/AudioEditor.js @@ -31,7 +31,7 @@ const AudioEditor = ({ editor }) => { audioContent, audioPath, selectedFont, - fontSize, + editorFontSize, // eslint-disable-next-line no-unused-vars updateWave, // updateWave is used to update the waveform in the Editor after recording audio }, actions: { @@ -219,7 +219,7 @@ const AudioEditor = ({ editor }) => { verse={verse} location={audioPath} updateWave={updateWave} - fontSize={fontSize} + fontSize={editorFontSize} selectedFont={selectedFont} /> )} diff --git a/renderer/src/components/EditorPage/ObsEditor/EditorPanel.js b/renderer/src/components/EditorPage/ObsEditor/EditorPanel.js index 3dee90440..61bda0a19 100644 --- a/renderer/src/components/EditorPage/ObsEditor/EditorPanel.js +++ b/renderer/src/components/EditorPage/ObsEditor/EditorPanel.js @@ -8,12 +8,13 @@ const EditorPanel = ({ obsStory, storyUpdate }) => { const { state: { selectedFont, - fontSize, + editorFontSize, }, actions: { setSelectedStory, }, } = useContext(ReferenceContext); + const { states: { scrollLock } } = useContext(ProjectContext); const { t } = useTranslation(); const handleChange = (e) => { @@ -90,7 +91,7 @@ const EditorPanel = ({ obsStory, storyUpdate }) => { className="flex-grow text-justify ml-2 p-2 text-xl" style={{ fontFamily: selectedFont || 'sans-serif', - fontSize: `${fontSize}rem`, + fontSize: `${editorFontSize}rem`, }} /> @@ -118,8 +119,8 @@ const EditorPanel = ({ obsStory, storyUpdate }) => { onInput={(e) => handleAutoHeight(e)} style={{ fontFamily: selectedFont || 'sans-serif', - fontSize: `${fontSize}rem`, - lineHeight: (fontSize > 1.3) ? 1.5 : '', + fontSize: `${editorFontSize}rem`, + lineHeight: (editorFontSize > 1.3) ? 1.5 : '', }} /> @@ -140,8 +141,8 @@ const EditorPanel = ({ obsStory, storyUpdate }) => { className="flex-grow text-justify ml-2 p-2 text-sm" style={{ fontFamily: selectedFont || 'sans-serif', - fontSize: `${fontSize}rem`, - lineHeight: (fontSize > 1.3) ? 1.5 : '', + fontSize: `${editorFontSize}rem`, + lineHeight: (editorFontSize > 1.3) ? 1.5 : '', }} /> diff --git a/renderer/src/components/EditorPage/ObsEditor/ObsEditor.js b/renderer/src/components/EditorPage/ObsEditor/ObsEditor.js index 26e903744..9e3c0526b 100644 --- a/renderer/src/components/EditorPage/ObsEditor/ObsEditor.js +++ b/renderer/src/components/EditorPage/ObsEditor/ObsEditor.js @@ -19,7 +19,11 @@ import { getDetails } from './utils/getDetails'; const ObsEditor = () => { const [mdData, setMdData] = useState(); const [directoryName, setDirectoryName] = useState(); - const { state: { obsNavigation, loadData }, actions: { setLoadData } } = useContext(ReferenceContext); + const { + state: { + obsNavigation, loadData, +}, actions: { setLoadData }, +} = useContext(ReferenceContext); const updateStory = (story) => { logger.debug('ObsEditor.js', 'In updateStory for upadting the story to the backend md file'); @@ -89,6 +93,7 @@ const ObsEditor = () => { ); localforage.setItem('projectmeta', value); // This func will update the scribe-setting.json file + // saveReferenceResource(selectedFont, editorFontSize); saveReferenceResource(); }); }); diff --git a/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js b/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js index ab236fddc..376ddb769 100644 --- a/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js +++ b/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js @@ -18,14 +18,15 @@ const style = { fontStyle: 'italic', }, }; -const ReferenceObs = ({ stories, font, title }) => { +const ReferenceObs = ({ + stories, font, title, fontSize, +}) => { const [isLoading, setIsLoading] = useState(true); const [direction, setDirection] = useState('ltr'); const [networkState, setNetworkState] = useState({ online: true }); const { state: { selectedStory, - fontSize, }, actions: { setSelectedStory, diff --git a/renderer/src/components/EditorPage/ObsEditor/WebReferenceObs.js b/renderer/src/components/EditorPage/ObsEditor/WebReferenceObs.js index 9135e95c4..88700360a 100644 --- a/renderer/src/components/EditorPage/ObsEditor/WebReferenceObs.js +++ b/renderer/src/components/EditorPage/ObsEditor/WebReferenceObs.js @@ -26,7 +26,7 @@ const ReferenceObs = ({ stories }) => { state: { selectedStory, selectedFont, - fontSize, + fontSize1: fontSize, }, actions: { setSelectedStory, diff --git a/renderer/src/components/EditorPage/Reference/Audio/ReferenceAudio.js b/renderer/src/components/EditorPage/Reference/Audio/ReferenceAudio.js index cda21beb9..e9be9002b 100644 --- a/renderer/src/components/EditorPage/Reference/Audio/ReferenceAudio.js +++ b/renderer/src/components/EditorPage/Reference/Audio/ReferenceAudio.js @@ -25,6 +25,8 @@ const ReferenceAudio = ({ chapter, verse, bookId, + font, + fontSize, }) => { const { actions: { @@ -227,6 +229,8 @@ const ReferenceAudio = ({ data={bookData} versepath={mp3Path} verse={verse} + font={font} + fontSize={fontSize} // goToVerse={{ // chapter: parseInt(chapter, 10), // verse: parseInt(verse, 10), diff --git a/renderer/src/components/EditorPage/Reference/OBS/ObsResourceCard.js b/renderer/src/components/EditorPage/Reference/OBS/ObsResourceCard.js index 5890d1168..6d97e2069 100644 --- a/renderer/src/components/EditorPage/Reference/OBS/ObsResourceCard.js +++ b/renderer/src/components/EditorPage/Reference/OBS/ObsResourceCard.js @@ -17,6 +17,7 @@ function ObsResourceCard({ isLoading, setIndex, font, + fontSize, }) { const { state: { filters, markdownView }, @@ -36,7 +37,12 @@ function ObsResourceCard({ itemIndex={index} setItemIndex={setIndex} /> -