Skip to content

Commit

Permalink
Saving font for OBS editor and Audio in the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
vipinpaul committed Nov 17, 2023
1 parent 3e8ca79 commit c071247
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions renderer/src/components/context/ReferenceContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ export default function ReferenceContextProvider({ children }) {
setBookmarksVerses(resources.project?.textStories.bookMarks);
setProjectScriptureDir(resources.project?.textStories?.scriptDirection?.toUpperCase());
setObsNavigation(resources.project?.textStories.navigation ? resources.project?.textStories.navigation : '1');
setSelectedFont(resources.project?.textStories?.font);
break;
case 'audioTranslation':
setBookmarksVerses(resources.project?.audioTranslation.bookMarks);
setProjectScriptureDir(resources.project?.audioTranslation?.scriptDirection?.toUpperCase());
setSelectedFont(resources.project?.audioTranslation?.font);
break;
default:
break;
Expand Down
6 changes: 6 additions & 0 deletions renderer/src/modules/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import BibleNavigation from '@/modules/biblenavigation/BibleNavigation';
import { ReferenceContext } from '@/components/context/ReferenceContext';
import { ProjectContext } from '@/components/context/ProjectContext';
import { splitStringByLastOccurance } from '@/util/splitStringByLastMarker';
import MenuDropdown from '@/components/MenuDropdown/MenuDropdown';
import * as logger from '../../logger';

export default function Editor({
Expand All @@ -41,6 +42,7 @@ export default function Editor({
actions: {
setBookmarksVerses,
setObsNavigation,
handleSelectedFont,
},
} = useContext(ReferenceContext);
const [bookMarked, setBookMarks] = useState(false);
Expand Down Expand Up @@ -146,6 +148,10 @@ export default function Editor({
<div aria-label="editor-pane" className="h-4 flex flex-1 justify-center text-white text-xxs uppercase tracking-wider font-bold leading-3 truncate">
{t('label-editor-pane')}
</div>
<div className="flex ml-auto">
<MenuDropdown selectedFont={selectedFont} setSelectedFont={handleSelectedFont} buttonStyle="h-6 mr-2 w-6 text-white cursor-pointer" />
{/* <InsertMenu handleClick={handleClick} selectedText={selectedText} /> */}
</div>
<div title={t('tooltip-editor-lock')} className="flex items-center">
{scrollLock === true ? (
<div>
Expand Down

0 comments on commit c071247

Please sign in to comment.