You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by ak...@apache.org on 2022/12/21 03:31:51 UTC
[age-viewer] branch main updated: allow previous queries to be copied to editor (#64)
This is an automated email from the ASF dual-hosted git repository.
ako pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/age-viewer.git
The following commit(s) were added to refs/heads/main by this push:
new 4427a4c allow previous queries to be copied to editor (#64)
4427a4c is described below
commit 4427a4c023337f890bbf428f38ec621b0f799df2
Author: marodins <67...@users.noreply.github.com>
AuthorDate: Tue Dec 20 19:31:47 2022 -0800
allow previous queries to be copied to editor (#64)
---
frontend/src/components/frame/Frame.jsx | 14 +++++++++++++-
frontend/src/components/frame/Frame.module.scss | 5 ++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/frame/Frame.jsx b/frontend/src/components/frame/Frame.jsx
index c4be9a0..969c2fd 100644
--- a/frontend/src/components/frame/Frame.jsx
+++ b/frontend/src/components/frame/Frame.jsx
@@ -20,13 +20,14 @@
import React, { useState } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
- faAngleDown, faAngleUp, faCompressAlt, faExpandAlt, faSync, faTimes,
+ faAngleDown, faAngleUp, faCompressAlt, faExpandAlt, faSync, faTimes, faClone,
} from '@fortawesome/free-solid-svg-icons';
import { Button, Popover } from 'antd';
import PropTypes from 'prop-types';
import { useDispatch } from 'react-redux';
import styles from './Frame.module.scss';
import { removeFrame } from '../../features/frame/FrameSlice';
+import { setCommand } from '../../features/editor/EditorSlice';
import { removeActiveRequests } from '../../features/cypher/CypherSlice';
import EdgeWeight from '../../icons/EdgeWeight';
import IconFilter from '../../icons/IconFilter';
@@ -64,6 +65,17 @@ const Frame = ({
<strong>
{reqString}
</strong>
+ <FontAwesomeIcon
+ id={styles.toEditor}
+ title="copy to editor"
+ icon={faClone}
+ size="s"
+ onClick={() => dispatch(setCommand(reqString))}
+ style={{
+ cursor: 'pointer',
+ }}
+ />
+
</div>
<div className={styles.ButtonArea}>
{onThick ? (
diff --git a/frontend/src/components/frame/Frame.module.scss b/frontend/src/components/frame/Frame.module.scss
index 914a635..77017bc 100644
--- a/frontend/src/components/frame/Frame.module.scss
+++ b/frontend/src/components/frame/Frame.module.scss
@@ -134,6 +134,9 @@
height: 100% !important;
}
+#toEditor:hover{
+ color:rgb(20, 33, 55)
+}
/* ---------------------------------------------------
MEDIAQUERIES
----------------------------------------------------- */
@@ -148,4 +151,4 @@
// margin: auto 18%;
// display: flex;
// }
-}
\ No newline at end of file
+}