Skip to content

Commit

Permalink
New Console (#674)
Browse files Browse the repository at this point in the history
* New Console (#665)

* mod: update fetch space list logic

* feat: add schema in console

* mod: remove

* feat: add editor hightlight

* mod: update monaco editor

* mod: update drawer

* feat: add / history provider

* feat: support running select rows

* mod: code review

---------

Co-authored-by: Nut He <[email protected]>

* feat: monaco-editor worker

* fix: rebase

* mod: remove npmrc

* fix: explain

* chore: remove console doc sider

---------

Co-authored-by: Nut He <[email protected]>
  • Loading branch information
huaxiabuluo and hetao92 authored Nov 28, 2023
1 parent 660937d commit 8fb9867
Show file tree
Hide file tree
Showing 29 changed files with 1,636 additions and 424 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

37 changes: 0 additions & 37 deletions app/components/CodeMirror/index.less

This file was deleted.

192 changes: 0 additions & 192 deletions app/components/CodeMirror/index.tsx

This file was deleted.

11 changes: 2 additions & 9 deletions app/components/GQLCodeMirror/index.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
import { Collapse, CollapseProps } from 'antd';
import { useI18n } from '@vesoft-inc/i18n';

import CodeMirror from '@app/components/CodeMirror';
import MonacoEditor from '@app/components/MonacoEditor';

import styles from './index.module.less';
interface IOptions {
[propName: string]: any;
}
const GQLCodeMirror = (props: { currentGQL: string; option?: IOptions }) => {
const options = {
keyMap: 'sublime',
fullScreen: true,
mode: 'nebula',
readOnly: true,
...props.option,
};
const { intl } = useI18n();
const items: CollapseProps['items'] = [
{
key: 'ngql',
label: intl.get('common.exportNGQL'),
children: <CodeMirror value={props.currentGQL} options={options} height="80px" />,
children: <MonacoEditor value={props.currentGQL} readOnly height="80px" />,
},
];
return <Collapse className={styles.exportGql} items={items} />;
Expand Down
32 changes: 32 additions & 0 deletions app/components/MonacoEditor/index.module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// :global {
// /* padding between the gutter and code */
// .monaco-editor .view-line {
// padding-left: 5px;
// }

// /* fix cursor location */
// .monaco-editor .cursor {
// margin-left: 5px;
// }

// /* fix highlighted text selection */
// .monaco-editor .selectionHighlight {
// margin-left: 5px;
// }

// /* fix highlighted brackets */
// .monaco-editor .bracket-match {
// margin-left: 5px;
// }

// /* fix multiline text selection */
// .monaco-editor .cslr.selected-text {
// margin-left: 5px;
// }

// /* fix multiline text selection */
// .monaco-editor .bottom-left-radius, .monaco-editor .top-left-radius {
// margin-left: 5px;
// }

// }
Loading

0 comments on commit 8fb9867

Please sign in to comment.