Files
everyone-can-use-english/enjoy/src/renderer/router.tsx
an-lee 0644c3bbd7 Feat: make notes on caption (#544)
* add segment model

* add note model

* db handle segment & note

* add notes & segments handler

* refactor media caption components

* segment & note create

* fix type

* update note column & may sync

* display selected words for note

* refactor selected words

* auto select words when editing note

* refactor

* refactor caption component

* display notes

* refactor notes components

* fix

* refactor segment & notes into context

* destroy note

* update locale

* fix caption switch issue

* fix layout

* refactor caption layout

* remove deprecated code

* may share note

* improve UI

* fix notes list auto update after created

* remove console.log

* add notes page

* refactor note parameters

* refactor components

* mark note on transcription

* handle no notes

* improve style

* improve style

* show context menu on selection text

* fix utils
2024-04-26 15:05:36 +08:00

93 lines
2.1 KiB
TypeScript

import { createHashRouter } from "react-router-dom";
import { Layout } from "@renderer/components";
import Conversations from "./pages/conversations";
import Conversation from "./pages/conversation";
import Vocabulary from "./pages/vocabulary";
import ErrorPage from "./pages/error-page";
import Landing from "./pages/landing";
import Audio from "./pages/audio";
import Video from "./pages/video";
import Audios from "./pages/audios";
import Videos from "./pages/videos";
import Stories from "./pages/stories";
import Story from "./pages/story";
import Books from "./pages/books";
import Profile from "./pages/profile";
import User from "./pages/user";
import Home from "./pages/home";
import Community from "./pages/community";
import StoryPreview from "./pages/story-preview";
import Notes from "./pages/notes";
export default createHashRouter([
{
path: "/",
element: <Layout />,
errorElement: <ErrorPage />,
children: [
{ index: true, element: <Home /> },
{
path: "/community",
element: <Community />,
},
{
path: "/users/:id",
element: <User />,
},
{
path: "/profile",
element: <Profile />,
},
{
path: "/conversations",
element: <Conversations />,
},
{
path: "/conversations/:id",
element: <Conversation />,
},
{
path: "/vocabulary",
element: <Vocabulary />,
},
{
path: "/audios",
element: <Audios />,
},
{
path: "/audios/:id",
element: <Audio />,
},
{
path: "/videos",
element: <Videos />,
},
{
path: "/videos/:id",
element: <Video />,
},
{
path: "/stories",
element: <Stories />,
},
{
path: "/stories/:id",
element: <Story />,
},
{
path: "/books",
element: <Books />,
},
{
path: "/stories/preview/:uri",
element: <StoryPreview />,
},
{
path: "/notes",
element: <Notes />,
},
],
},
{ path: "/landing", element: <Landing /> },
]);