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