aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/GPTPopup
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2024-04-17 13:17:51 -0400
committeralyssaf16 <alyssa_feinberg@brown.edu>2024-04-17 13:17:51 -0400
commitc5b2912cc4f44c5e12d8b5dc123d99bf9c4d9b85 (patch)
treef61ca56109ac51161f2877c4dc3038e9d5b91b9c /src/client/views/pdf/GPTPopup
parente95d25eb8159bb7c753fa27e74e9baa8d3bffea6 (diff)
ai flashcards
Diffstat (limited to 'src/client/views/pdf/GPTPopup')
-rw-r--r--src/client/views/pdf/GPTPopup/GPTPopup.tsx42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index dbcdd4e3a..32c1721ec 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -144,6 +144,15 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
_layout_autoHeight: true,
});
this.addDoc(newDoc, this.sidebarId);
+ // const arr = [newDoc];
+ // const newCol = Docs.Create.CarouselDocument(arr, {
+ // _width: 200,
+ // _height: 200,
+ // _layout_fitWidth: true,
+ // _layout_autoHeight: true,
+ // });
+ // this.addDoc(newDoc, this.sidebarId);
+ // this.addDoc(newCol, this.sidebarId);
const anchor = AnchorMenu.Instance?.GetAnchor(undefined, false);
if (anchor) {
DocUtils.MakeLink(newDoc, anchor, {
@@ -152,21 +161,24 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
}
};
- transferToFlashcard = () => {
- const senArr = this.text.split('.');
- for (var i = 0; i < senArr.length; i += 2) {
- console.log('SEN: ' + senArr[i]);
- const newDoc = Docs.Create.ComparisonDocument(senArr[i], { _layout_isFlashcard: true, _width: 300, _height: 300 });
- newDoc.text = senArr[i];
- this.addDoc(newDoc, this.sidebarId);
- const anchor = AnchorMenu.Instance?.GetAnchor(undefined, false);
- if (anchor) {
- DocUtils.MakeLink(newDoc, anchor, {
- link_relationship: 'GPT Summary',
- });
- }
- }
- };
+ // transferToFlashcard = () => {
+ // const senArr = this.text.split('Question');
+ // const collectionArr: Doc[] = [];
+ // for (var i = 1; i < senArr.length; i++) {
+ // console.log('Arr ' + i + ': ' + senArr[i]);
+ // const newDoc = Docs.Create.ComparisonDocument(senArr[i], { _layout_isFlashcard: true, _width: 300, _height: 300 });
+ // newDoc.text = senArr[i];
+ // collectionArr.push(newDoc);
+ // }
+ // const newCol = Docs.Create.CarouselDocument(collectionArr, {
+ // _width: 200,
+ // _height: 200,
+ // _layout_fitWidth: true,
+ // _layout_autoHeight: true,
+ // });
+ // this.addDoc(newCol, this.sidebarId);
+ // this.addToCollection?.(newCol);
+ // };
/**
* Transfers the image urls to actual image docs