aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-08-11 04:07:40 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-08-11 04:07:40 -0400
commit8d3ef2ead4fb8a8625b7fbfe57e528819a030474 (patch)
tree20ba97019352b0106dac71c7f25b3f7ac0b61291 /src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
parentafd43afb6b75a7af0032ee14c79d1dd7ffedcac4 (diff)
edit and copy buttons added to GPT template preview
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
index b45ac7f46..205923346 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
@@ -135,6 +135,7 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> {
emptyFunction,
undoable(clickEv => {
clickEv.stopPropagation();
+ clickEv.preventDefault();
func();
}, 'create docs')
)
@@ -356,6 +357,14 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> {
this.forceUpdate();
}
+ editTemplate = () => {
+
+ }
+
+ copyGPTTemplate = () => {
+
+ }
+
get templatesPreviewContents(){
const renderedTemplates: Doc[] = [];
@@ -383,6 +392,12 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> {
boxShadow: this._selectedTemplate === info.doc ? `0 0 15px rgba(68, 118, 247, .8)` : ''
}}
onPointerDown={e => this.setUpButtonClick(e, () => runInAction(() => this.updateSelectedTemplate(info.doc)))}>
+ <button className='option-button left' onPointerDown={e => this.setUpButtonClick(e, () => {this.editTemplate()})}>
+ <FontAwesomeIcon icon='pencil' color='black'/>
+ </button>
+ <button className='option-button right' onPointerDown={e => this.setUpButtonClick(e, () => {this.copyGPTTemplate()})}>
+ <FontAwesomeIcon icon='plus' color='black'/>
+ </button>
<img className='docCreatorMenu-preview-image' src={info.icon!.url.href.replace(".png", "_o.png")} />
</div>
)}