diff --git a/src/components/ShellView/CypherEditor.vue b/src/components/ShellView/CypherEditor.vue index 9fc30d7..73d4e3c 100644 --- a/src/components/ShellView/CypherEditor.vue +++ b/src/components/ShellView/CypherEditor.vue @@ -27,19 +27,10 @@ class="shell-editor__tools_container" :style="{ width: toolbarWidth + 'px' }" > -
- +
+
-
+
-
+
-
+
{ return { name: "CypherEditor", @@ -229,10 +214,15 @@ emits: ['remove', 'evaluateCypher', 'toggleMaximize', 'generateAndEvaluateQuery' removeCell() { this.$emit("remove"); }, - isActive(){ + isActive() { return (this.isQueryGenerationMode && this.$refs.gptQuestionTextArea === document.activeElement) || (!this.isQueryGenerationMode && this.editor && this.editor.hasTextFocus()); - } + }, + loadFromHistory(history) { + this.isQueryGenerationMode = history.isQueryGenerationMode; + this.gptQuestion = history.gptQuestion; + this.setEditorContent(history.cypherQuery); + }, }, } diff --git a/src/components/ShellView/ShellCell.vue b/src/components/ShellView/ShellCell.vue index 8eed7d3..aba6a5c 100644 --- a/src/components/ShellView/ShellCell.vue +++ b/src/components/ShellView/ShellCell.vue @@ -19,10 +19,7 @@ :is-maximized="isMaximized" :navbar-height="navbarHeight" /> -
+
{{ loadingText ? loadingText : "Loading..." }} @@ -85,6 +82,10 @@ export default { isActive() { return this.$refs.editor.isActive(); }, + loadEditorFromHistory(history) { + this.isEvaluated = true; + this.$refs.editor.loadFromHistory(history); + }, evaluateCypher(query) { this.queryResult = null; this.errorMessage = ""; diff --git a/src/components/ShellView/ShellMainView.vue b/src/components/ShellView/ShellMainView.vue index ae99f9c..59891ef 100644 --- a/src/components/ShellView/ShellMainView.vue +++ b/src/components/ShellView/ShellMainView.vue @@ -1,8 +1,5 @@