Commit 85d14bbd by Sergey

add clearBlob

parent f686998b
......@@ -293,6 +293,7 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
onClick: () => {
modalOpener('voicemessage', 'Записать голосовое сообщение')
setRecordType({audio: true})
clearBlobUrl()
}
},
webcamera: {
......@@ -300,6 +301,7 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
onClick: () => {
modalOpener('webcamera', 'Записать с камеры')
setRecordType({video: true})
clearBlobUrl()
}
},
screencust: {
......@@ -307,6 +309,7 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
onClick: () => {
modalOpener('screencust', 'Записать экран')
setRecordType({screen: true})
clearBlobUrl()
}
},
// katex: {
......@@ -638,6 +641,21 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
isDisabled = true;
}
break;
case 'screencust':
if(status === 'recording' || isUploading || !mediaBlobUrl){
isDisabled = true;
}
break;
case 'voicemessage':
if(status === 'recording' || isUploading || !mediaBlobUrl){
isDisabled = true;
}
break;
case 'webcamera':
if(status === 'recording' || isUploading || !mediaBlobUrl){
isDisabled = true;
}
break;
case 'iframe':
try{
let url = new URL(embedContent);
......@@ -753,14 +771,15 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
onClick: () => {
stopRecording();
unMuteAudio();
clearBlobUrl();
setUploaderUid(`uid${new Date()}`);
setUploadedPaths([]);
setModalIsOpen(false);
}
},
{
title: (mediaBlobUrl && uploadedPaths.length === 0) ? (isUploading ? 'Сохранение...' : 'Сохранить') : 'Вставить',
className: (status === 'recording' || isUploading) ? ' atma-editor-complete-block' : ' atma-editor-complete',
title: (mediaBlobUrl && uploadedPaths.length === 0) ? (isUploading ? 'Сохранение...' : 'Вставить') : 'Вставить',
className: ' atma-editor-complete',
onClick: async () => {
if ((status === 'recording' || isUploading)) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment