Rename files and reorganize directories
This commit is contained in:
parent
74a06fccf3
commit
4623e391b9
14
src/App.js
14
src/App.js
@ -1,11 +1,11 @@
|
|||||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||||
import Editor from "./pages/editor";
|
import Editor from "./pages/Editor";
|
||||||
import LandingPage from "./pages/landing_page";
|
import LandingPage from "./pages/LandingPage";
|
||||||
import Survey from "./pages/survey";
|
import Survey from "./pages/Survey";
|
||||||
import Shortcuts from "./pages/shortcuts";
|
import BugReport from "./pages/BugReport";
|
||||||
import BugReport from "./pages/bug_report";
|
import SignUp from "./pages/Signup";
|
||||||
import SignUp from "./pages/signup";
|
import Shortcuts from "./pages/Shortcuts"
|
||||||
import Login from "./pages/login";
|
import Login from "./pages/Login";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
Action,
|
Action,
|
||||||
ObjectType,
|
ObjectType,
|
||||||
} from "../data/data";
|
} from "../data/data";
|
||||||
import { AreaContext, UndoRedoContext } from "../pages/editor";
|
import { AreaContext, UndoRedoContext } from "../pages/Editor";
|
||||||
|
|
||||||
export default function AreaOverview(props) {
|
export default function AreaOverview(props) {
|
||||||
const { areas, addArea, deleteArea, updateArea } = useContext(AreaContext);
|
const { areas, addArea, deleteArea, updateArea } = useContext(AreaContext);
|
@ -50,13 +50,13 @@ import {
|
|||||||
TableContext,
|
TableContext,
|
||||||
TypeContext,
|
TypeContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import { IconAddTable, IconAddArea, IconAddNote } from "./custom_icons";
|
import { IconAddTable, IconAddArea, IconAddNote } from "./CustomIcons";
|
||||||
import { ObjectType, Action, Tab } from "../data/data";
|
import { ObjectType, Action, Tab } from "../data/data";
|
||||||
import jsPDF from "jspdf";
|
import jsPDF from "jspdf";
|
||||||
import { useHotkeys } from "react-hotkeys-hook";
|
import { useHotkeys } from "react-hotkeys-hook";
|
||||||
import { Validator } from "jsonschema";
|
import { Validator } from "jsonschema";
|
||||||
import { areaSchema, noteSchema, tableSchema } from "../schemas";
|
import { areaSchema, noteSchema, tableSchema } from "../data/schemas";
|
||||||
import { Editor } from "@monaco-editor/react";
|
import { Editor } from "@monaco-editor/react";
|
||||||
|
|
||||||
export default function ControlPanel(props) {
|
export default function ControlPanel(props) {
|
@ -21,7 +21,7 @@ import {
|
|||||||
IconSearch,
|
IconSearch,
|
||||||
IconCheckboxTick,
|
IconCheckboxTick,
|
||||||
} from "@douyinfe/semi-icons";
|
} from "@douyinfe/semi-icons";
|
||||||
import { NoteContext, UndoRedoContext } from "../pages/editor";
|
import { NoteContext, UndoRedoContext } from "../pages/Editor";
|
||||||
import { noteThemes, Action, ObjectType } from "../data/data";
|
import { noteThemes, Action, ObjectType } from "../data/data";
|
||||||
|
|
||||||
export default function NotesOverview(props) {
|
export default function NotesOverview(props) {
|
@ -22,7 +22,7 @@ import {
|
|||||||
IllustrationNoContentDark,
|
IllustrationNoContentDark,
|
||||||
} from "@douyinfe/semi-illustrations";
|
} from "@douyinfe/semi-illustrations";
|
||||||
import { Cardinality, Constraint, Action, ObjectType } from "../data/data";
|
import { Cardinality, Constraint, Action, ObjectType } from "../data/data";
|
||||||
import { TableContext, UndoRedoContext } from "../pages/editor";
|
import { TableContext, UndoRedoContext } from "../pages/Editor";
|
||||||
|
|
||||||
export default function ReferenceOverview(props) {
|
export default function ReferenceOverview(props) {
|
||||||
const columns = [
|
const columns = [
|
@ -1,15 +1,15 @@
|
|||||||
import { React, useContext } from "react";
|
import { React, useContext } from "react";
|
||||||
import { Tabs } from "@douyinfe/semi-ui";
|
import { Tabs } from "@douyinfe/semi-ui";
|
||||||
import TableOverview from "./table_overview";
|
import TableOverview from "./TableOverview";
|
||||||
import ReferenceOverview from "./reference_overview";
|
import ReferenceOverview from "./ReferenceOverview";
|
||||||
import AreaOverview from "./area_overview";
|
import AreaOverview from "./AreaOverview";
|
||||||
import { Tab } from "../data/data";
|
import { Tab } from "../data/data";
|
||||||
import { LayoutContext, TabContext } from "../pages/editor";
|
import { LayoutContext, TabContext } from "../pages/Editor";
|
||||||
import NotesOverview from "./notes_overview";
|
import NotesOverview from "./NotesOverview";
|
||||||
import Issues from "./issues";
|
import Issues from "./Issues";
|
||||||
import TypesOverview from "./types_overview";
|
import TypesOverview from "./TypesOverview";
|
||||||
|
|
||||||
const EditorPanel = (props) => {
|
const SidePanel = (props) => {
|
||||||
const { tab, setTab } = useContext(TabContext);
|
const { tab, setTab } = useContext(TabContext);
|
||||||
const { layout } = useContext(LayoutContext);
|
const { layout } = useContext(LayoutContext);
|
||||||
|
|
||||||
@ -65,4 +65,4 @@ const EditorPanel = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default EditorPanel;
|
export default SidePanel;
|
@ -40,7 +40,7 @@ import {
|
|||||||
TableContext,
|
TableContext,
|
||||||
TypeContext,
|
TypeContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import { getSize, hasCheck, hasPrecision, isSized } from "../utils";
|
import { getSize, hasCheck, hasPrecision, isSized } from "../utils";
|
||||||
|
|
||||||
export default function TableOverview(props) {
|
export default function TableOverview(props) {
|
@ -27,7 +27,7 @@ import {
|
|||||||
IllustrationNoContent,
|
IllustrationNoContent,
|
||||||
IllustrationNoContentDark,
|
IllustrationNoContentDark,
|
||||||
} from "@douyinfe/semi-illustrations";
|
} from "@douyinfe/semi-illustrations";
|
||||||
import { TypeContext, UndoRedoContext } from "../pages/editor";
|
import { TypeContext, UndoRedoContext } from "../pages/Editor";
|
||||||
import { isSized, hasPrecision, getSize } from "../utils";
|
import { isSized, hasPrecision, getSize } from "../utils";
|
||||||
|
|
||||||
export default function TableOverview(props) {
|
export default function TableOverview(props) {
|
@ -19,7 +19,7 @@ import {
|
|||||||
SettingsContext,
|
SettingsContext,
|
||||||
TabContext,
|
TabContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
|
|
||||||
export default function Area(props) {
|
export default function Area(props) {
|
||||||
const [hovered, setHovered] = useState(false);
|
const [hovered, setHovered] = useState(false);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useContext, useRef, useState, useEffect } from "react";
|
import React, { useContext, useRef, useState, useEffect } from "react";
|
||||||
import Table from "./table";
|
import Table from "./Table";
|
||||||
import { Action, Cardinality, Constraint, ObjectType } from "../data/data";
|
import { Action, Cardinality, Constraint, ObjectType } from "../data/data";
|
||||||
import Area from "./area";
|
import Area from "./Area";
|
||||||
import Relationship from "./relationship";
|
import Relationship from "./Relationship";
|
||||||
import {
|
import {
|
||||||
AreaContext,
|
AreaContext,
|
||||||
NoteContext,
|
NoteContext,
|
||||||
@ -10,8 +10,8 @@ import {
|
|||||||
TableContext,
|
TableContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
SelectContext,
|
SelectContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import Note from "./note";
|
import Note from "./Note";
|
||||||
import { Toast } from "@douyinfe/semi-ui";
|
import { Toast } from "@douyinfe/semi-ui";
|
||||||
|
|
||||||
export default function Canvas(props) {
|
export default function Canvas(props) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useContext, useState } from "react";
|
|||||||
import { Button, Input, Tag, Avatar } from "@douyinfe/semi-ui";
|
import { Button, Input, Tag, Avatar } from "@douyinfe/semi-ui";
|
||||||
import { IconSend } from "@douyinfe/semi-icons";
|
import { IconSend } from "@douyinfe/semi-icons";
|
||||||
import { socket } from "../data/socket";
|
import { socket } from "../data/socket";
|
||||||
import { MessageContext } from "../pages/editor";
|
import { MessageContext } from "../pages/Editor";
|
||||||
|
|
||||||
export default function Chat() {
|
export default function Chat() {
|
||||||
const [message, setMessage] = useState("");
|
const [message, setMessage] = useState("");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useContext, useState, useEffect } from "react";
|
import React, { useContext, useState, useEffect } from "react";
|
||||||
import { Collapse, Badge } from "@douyinfe/semi-ui";
|
import { Collapse, Badge } from "@douyinfe/semi-ui";
|
||||||
import { SettingsContext, TableContext, TypeContext } from "../pages/editor";
|
import { SettingsContext, TableContext, TypeContext } from "../pages/Editor";
|
||||||
import { validateDiagram, arrayIsEqual } from "../utils";
|
import { validateDiagram, arrayIsEqual } from "../utils";
|
||||||
|
|
||||||
export default function Issues() {
|
export default function Issues() {
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
TabContext,
|
TabContext,
|
||||||
SelectContext,
|
SelectContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import { Action, ObjectType, noteThemes, Tab } from "../data/data";
|
import { Action, ObjectType, noteThemes, Tab } from "../data/data";
|
||||||
import { Input, Button, Popover, Toast } from "@douyinfe/semi-ui";
|
import { Input, Button, Popover, Toast } from "@douyinfe/semi-ui";
|
||||||
import {
|
import {
|
||||||
|
@ -10,9 +10,9 @@ import {
|
|||||||
MessageContext,
|
MessageContext,
|
||||||
SettingsContext,
|
SettingsContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import Todo from "./todo";
|
import Todo from "./Todo";
|
||||||
import Chat from "./chat";
|
import Chat from "./Chat";
|
||||||
|
|
||||||
export default function Sidebar() {
|
export default function Sidebar() {
|
||||||
const SidesheetType = {
|
const SidesheetType = {
|
||||||
|
@ -41,7 +41,7 @@ import {
|
|||||||
TableContext,
|
TableContext,
|
||||||
TypeContext,
|
TypeContext,
|
||||||
UndoRedoContext,
|
UndoRedoContext,
|
||||||
} from "../pages/editor";
|
} from "../pages/Editor";
|
||||||
import { getSize, hasCheck, hasPrecision, isSized } from "../utils";
|
import { getSize, hasCheck, hasPrecision, isSized } from "../utils";
|
||||||
|
|
||||||
export default function Table(props) {
|
export default function Table(props) {
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
IconDeleteStroked,
|
IconDeleteStroked,
|
||||||
IconCaretdown,
|
IconCaretdown,
|
||||||
} from "@douyinfe/semi-icons";
|
} from "@douyinfe/semi-icons";
|
||||||
import { TaskContext } from "../pages/editor";
|
import { TaskContext } from "../pages/Editor";
|
||||||
export default function Todo() {
|
export default function Todo() {
|
||||||
const Priority = {
|
const Priority = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
IconGithubLogo,
|
IconGithubLogo,
|
||||||
IconPaperclip,
|
IconPaperclip,
|
||||||
} from "@douyinfe/semi-icons";
|
} from "@douyinfe/semi-icons";
|
||||||
import RichEditor from "../components/rich_editor";
|
import RichEditor from "../components/RichEditor";
|
||||||
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
||||||
import { editorConfig } from "../data/editor_config";
|
import { editorConfig } from "../data/editor_config";
|
||||||
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState, createContext, useEffect } from "react";
|
import React, { useState, createContext, useEffect } from "react";
|
||||||
import Sidebar from "../components/sidebar";
|
import Sidebar from "../components/Sidebar";
|
||||||
import ControlPanel from "../components/control_panel";
|
import ControlPanel from "../components/ControlPanel";
|
||||||
import Canvas from "../components/canvas";
|
import Canvas from "../components/Canvas";
|
||||||
import EditorPanel from "../components/editor_panel";
|
import SidePanel from "../components/SidePanel";
|
||||||
import {
|
import {
|
||||||
Tab,
|
Tab,
|
||||||
defaultTableTheme,
|
defaultTableTheme,
|
||||||
@ -568,7 +568,7 @@ export default function Editor(props) {
|
|||||||
onMouseMove={dragHandler}
|
onMouseMove={dragHandler}
|
||||||
>
|
>
|
||||||
{layout.sidebar && (
|
{layout.sidebar && (
|
||||||
<EditorPanel
|
<SidePanel
|
||||||
resize={resize}
|
resize={resize}
|
||||||
setResize={setResize}
|
setResize={setResize}
|
||||||
width={width}
|
width={width}
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
TextArea,
|
TextArea,
|
||||||
} from "@douyinfe/semi-ui";
|
} from "@douyinfe/semi-ui";
|
||||||
import { IconSun, IconMoon } from "@douyinfe/semi-icons";
|
import { IconSun, IconMoon } from "@douyinfe/semi-icons";
|
||||||
import RichEditor from "../components/rich_editor";
|
import RichEditor from "../components/RichEditor";
|
||||||
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
||||||
import { editorConfig } from "../data/editor_config";
|
import { editorConfig } from "../data/editor_config";
|
||||||
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Validator } from "jsonschema";
|
import { Validator } from "jsonschema";
|
||||||
import { ddbSchema, jsonSchema } from "../schemas";
|
import { ddbSchema, jsonSchema } from "../data/schemas";
|
||||||
import { sqlDataTypes } from "../data/data";
|
import { sqlDataTypes } from "../data/data";
|
||||||
|
|
||||||
function enterFullscreen() {
|
function enterFullscreen() {
|
||||||
|
Loading…
Reference in New Issue
Block a user