aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx12
-rw-r--r--src/client/views/nodes/VideoBox.tsx2
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx10
3 files changed, 3 insertions, 21 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index a8c91aae8..00ca0078e 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -382,7 +382,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
*/
pushInfo = async () => {
const audio = {
- file: this._audio.url,
+ file: DocCast(this.Document.audio)[DocData].url,
};
const response = await axios.post('http://localhost:105/recognize/', audio, {
headers: {
@@ -792,16 +792,10 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
<button className="submit-buttonrecord" onClick={this._listening ? this.stopListening : this.startListening} style={{ background: this._listening ? 'lightgray' : '', borderRadius: '2px' }}>
{<FontAwesomeIcon icon="microphone" size="lg" />}
</button>
- <div
- className="submit-buttonschema-header-button"
- onPointerDown={e => this.openContextMenu(e.clientX, e.clientY, true)}
- style={{ position: 'absolute', top: '5px', left: '50px', zIndex: '100', width: '5px', height: '5px', cursor: 'pointer' }}>
+ <div className="submit-buttonschema-header-button" onPointerDown={e => this.openContextMenu(e.clientX, e.clientY, true)} style={{ position: 'absolute', top: '5px', left: '50px', zIndex: '100', cursor: 'pointer' }}>
<FontAwesomeIcon color={'white'} icon="caret-down" />
</div>
- <button
- className="submit-buttonpronunciation"
- onClick={this.evaluatePronunciation}
- style={{ display: 'inline-flex', alignItems: 'center', background: this._listening ? 'lightgray' : '', borderRadius: '2px', width: '100%' }}>
+ <button className="submit-buttonpronunciation" onClick={this.evaluatePronunciation} style={{ display: 'inline-flex', alignItems: 'center' }}>
Evaluate Pronunciation
</button>
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index d653b27d7..de51f6447 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -879,7 +879,6 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
ref={action((r: CollectionStackedTimeline) => {
this._stackedTimeline = r;
})}
- // eslint-disable-next-line react/jsx-props-no-spreading
{...this._props}
dataFieldKey={this.fieldKey}
fieldKey={this.annotationKey}
@@ -990,7 +989,6 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
left: (this._props.PanelWidth() - this.panelWidth()) / 2,
}}>
<CollectionFreeFormView
- // eslint-disable-next-line react/jsx-props-no-spreading
{...this._props}
ref={this._ffref}
setContentViewBox={emptyFunction}
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index 93153b453..dac869f56 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -1006,26 +1006,16 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
};
getImageDesc = async (u: string) => {
- // if (StrCast(this.dataDoc.description)) return StrCast(this.dataDoc.description); // Return existing description
- // const { href } = (u as URLField).url;
- const hrefParts = u.split('.');
- const hrefComplete = `${hrefParts[0]}_o.${hrefParts[1]}`;
try {
const hrefBase64 = await imageUrlToBase64(u);
const response = await gptImageLabel(
hrefBase64,
'Make flashcards out of this text and image with each question and answer labeled as question and answer. Do not label each flashcard and do not include asterisks: ' + (this.dataDoc.text as RichTextField)?.Text
);
- //const response = await gptImageLabel(u, 'Make flashcards out of this text with each question and answer labeled as question and answer. Do not label each flashcard and do not include asterisks: ');
- // console.log(response);
AnchorMenu.Instance.transferToFlashcard(response || 'Something went wrong', NumCast(this.dataDoc['x']), NumCast(this.dataDoc['y']));
- // this._props.addto_;
- // this.Document[DocData].description = response.trim();
- // return response; // Return the response
} catch (error) {
console.log('Error', error);
}
- // return '';
};
animateRes = (resIndex: number, newText: string) => {