index.js 1.58 KB
Newer Older
1 2 3
import React from 'react';
import { Row, Col } from 'antd';
import GGEditor, { Koni } from 'gg-editor';
4 5 6 7 8 9
import EditorMinimap from '@/components/EditorMinimap';
import { KoniContextMenu } from '@/components/EditorContextMenu';
import { KoniToolbar } from '@/components/EditorToolbar';
import { KoniItemPanel } from '@/components/EditorItemPanel';
import { KoniDetailPanel } from '@/components/EditorDetailPanel';
import KoniCustomNode from '@/components/EditorKoniCustomNode';
10
import styles from '../Flow/index.less';
11
import { FormattedMessage } from 'umi-plugin-react/locale';
12 13
import PageHeaderWrapper from '@/components/PageHeaderWrapper';

chen shuai's avatar
chen shuai committed
14 15
GGEditor.setTrackable(false);

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
const KoniPage = () => {
  return (
    <PageHeaderWrapper
      title={<FormattedMessage id="app.editor.koni.title" />}
      content={<FormattedMessage id="app.editor.koni.description" />}
    >
      <GGEditor className={styles.editor}>
        <Row type="flex" className={styles.editorHd}>
          <Col span={24}>
            <KoniToolbar />
          </Col>
        </Row>
        <Row type="flex" className={styles.editorBd}>
          <Col span={4} className={styles.editorSidebar}>
            <KoniItemPanel />
          </Col>
          <Col span={16} className={styles.editorContent}>
            <Koni className={styles.koni} />
          </Col>
          <Col span={4} className={styles.editorSidebar}>
            <KoniDetailPanel />
            <EditorMinimap />
          </Col>
        </Row>
        <KoniCustomNode />
        <KoniContextMenu />
      </GGEditor>
    </PageHeaderWrapper>
  );
};

export default KoniPage;