Router.tsx 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. import { Route, Routes } from "react-router-dom";
  2. import Anonymous from "./layouts/anonymous";
  3. import Dashboard from "./layouts/dashboard";
  4. import NutUsersSignIn from "./pages/nut/users/sign-in";
  5. import NutUsersSignUp from "./pages/nut/users/sign-up";
  6. import NutUsersUnlockNew from "./pages/nut/users/unlock/new";
  7. import NutUsersUnlockVerify from "./pages/nut/users/unlock/verify";
  8. import NutUsersResetPassword from "./pages/nut/users/reset-password";
  9. import NutUsersForgotPassword from "./pages/nut/users/forgot-password";
  10. import NutUsersChangePassword from "./pages/nut/users/change-password";
  11. import NutUsersAccountInfo from "./pages/nut/users/account-info";
  12. import NutUsersLogs from "./pages/nut/users/logs";
  13. import NutForbidden from "./pages/nut/forbidden";
  14. import NutNotFound from "./pages/nut/not-found";
  15. import NutSwitchLanguage from "./pages/nut/switch-languages";
  16. import NutHome from "./pages/nut";
  17. import LibraryCommunity from "./pages/library/community";
  18. import LibraryCommunityList from "./pages/library/community/list";
  19. import LibraryCommunityRecent from "./pages/library/community/recent";
  20. import LibraryPalicanon from "./pages/library/palicanon";
  21. import LibraryPalicanonByPath from "./pages/library/palicanon/bypath";
  22. import LibraryPalicanonChapter from "./pages/library/palicanon/chapter";
  23. import LibraryCourse from "./pages/library/course";
  24. import LibraryCourseList from "./pages/library/course/list";
  25. import LibraryCourseShow from "./pages/library/course/course";
  26. import LibraryLessonShow from "./pages/library/course/lesson";
  27. import LibraryTerm from "./pages/library/term/show";
  28. import LibraryDict from "./pages/library/dict";
  29. import LibraryDictShow from "./pages/library/dict/show";
  30. import LibraryDictRecent from "./pages/library/dict/recent";
  31. import LibraryAnthology from "./pages/library/anthology";
  32. import LibraryAnthologyShow from "./pages/library/anthology/show";
  33. import LibraryAnthologyList from "./pages/library/anthology/list";
  34. import LibraryArticle from "./pages/library/article";
  35. import LibraryArticleShow from "./pages/library/article/show";
  36. import LibraryBlog from "./pages/library/blog";
  37. import LibraryBlogOverview from "./pages/library/blog/overview";
  38. import LibraryBlogTranslation from "./pages/library/blog/translation";
  39. import LibraryBlogCourse from "./pages/library/blog/course";
  40. import LibraryBlogAnthology from "./pages/library/blog/anthology";
  41. import LibraryBlogTerm from "./pages/library/blog/term";
  42. import Studio from "./pages/studio";
  43. import StudioHome from "./pages/studio/home";
  44. import StudioPalicanon from "./pages/studio/palicanon";
  45. import StudioRecent from "./pages/studio/recent";
  46. import StudioChannel from "./pages/studio/channel";
  47. import StudioChannelList from "./pages/studio/channel/list";
  48. import StudioChannelEdit from "./pages/studio/channel/edit";
  49. import StudioGroup from "./pages/studio/group";
  50. import StudioGroupList from "./pages/studio/group/list";
  51. import StudioGroupEdit from "./pages/studio/group/edit";
  52. import StudioGroupShow from "./pages/studio/group/show";
  53. import StudioDict from "./pages/studio/dict";
  54. import StudioDictList from "./pages/studio/dict/list";
  55. import StudioTerm from "./pages/studio/term";
  56. import StudioTermList from "./pages/studio/term/list";
  57. import StudioArticle from "./pages/studio/article";
  58. import StudioArticleList from "./pages/studio/article/list";
  59. import StudioArticleEdit from "./pages/studio/article/edit";
  60. import StudioAnthology from "./pages/studio/anthology";
  61. import StudioAnthologyList from "./pages/studio/anthology/list";
  62. import StudioAnthologyEdit from "./pages/studio/anthology/edit";
  63. import StudioAnalysis from "./pages/studio/analysis";
  64. import StudioAnalysisList from "./pages/studio/analysis/list";
  65. const Widget = () => {
  66. return (
  67. <Routes>
  68. <Route path="anonymous" element={<Anonymous />}>
  69. <Route path="users">
  70. <Route path="sign-in" element={<NutUsersSignIn />} />
  71. <Route path="sign-up" element={<NutUsersSignUp />} />
  72. <Route path="unlock">
  73. <Route path="new" element={<NutUsersUnlockNew />} />
  74. <Route path="verify/:token" element={<NutUsersUnlockVerify />} />
  75. </Route>
  76. <Route
  77. path="reset-password/:token"
  78. element={<NutUsersResetPassword />}
  79. />
  80. <Route path="forgot-password" element={<NutUsersForgotPassword />} />
  81. </Route>
  82. </Route>
  83. <Route path="dashboard" element={<Dashboard />}>
  84. <Route path="users">
  85. <Route path="change-password" element={<NutUsersChangePassword />} />
  86. <Route path="logs" element={<NutUsersLogs />} />
  87. <Route path="account-info" element={<NutUsersAccountInfo />} />
  88. </Route>
  89. </Route>
  90. <Route path="switch-language" element={<NutSwitchLanguage />} />
  91. <Route path="forbidden" element={<NutForbidden />} />
  92. <Route path="" element={<NutHome />} />
  93. <Route path="*" element={<NutNotFound />} />
  94. <Route path="community" element={<LibraryCommunity />}>
  95. <Route path="list" element={<LibraryCommunityList />} />
  96. <Route path="recent" element={<LibraryCommunityRecent />} />
  97. </Route>
  98. <Route path="palicanon" element={<LibraryPalicanon />}>
  99. <Route path="list" element={<LibraryPalicanonByPath />} />
  100. <Route path="list/:root" element={<LibraryPalicanonByPath />} />
  101. <Route path="list/:root/:path" element={<LibraryPalicanonByPath />} />
  102. <Route
  103. path="list/:root/:path/:tag"
  104. element={<LibraryPalicanonByPath />}
  105. />
  106. <Route path="chapter/:id" element={<LibraryPalicanonChapter />} />
  107. </Route>
  108. <Route path="course" element={<LibraryCourse />}>
  109. <Route path="list" element={<LibraryCourseList />}></Route>
  110. <Route path="show/:id" element={<LibraryCourseShow />}></Route>
  111. <Route path="lesson/:id" element={<LibraryLessonShow />}></Route>
  112. </Route>
  113. <Route path="term/:word" element={<LibraryTerm />} />
  114. <Route path="dict" element={<LibraryDict />}>
  115. <Route path=":word" element={<LibraryDictShow />} />
  116. <Route path="recent" element={<LibraryDictRecent />} />
  117. </Route>
  118. <Route path="anthology" element={<LibraryAnthology />}>
  119. <Route path="list" element={<LibraryAnthologyList />} />
  120. <Route path=":id" element={<LibraryAnthologyShow />} />
  121. <Route path=":id/by_channel/:tags" element={<LibraryAnthologyShow />} />
  122. </Route>
  123. <Route path="article" element={<LibraryArticle />}>
  124. <Route path=":type/:id" element={<LibraryArticleShow />} />
  125. <Route path=":type/:id/:mode" element={<LibraryArticleShow />} />
  126. <Route path=":type/:id/:mode/:param" element={<LibraryArticleShow />} />
  127. </Route>
  128. <Route path="blog/:studio" element={<LibraryBlog />}>
  129. <Route path="overview" element={<LibraryBlogOverview />} />
  130. <Route path="palicanon" element={<LibraryBlogTranslation />} />
  131. <Route path="course" element={<LibraryBlogCourse />} />
  132. <Route path="anthology" element={<LibraryBlogAnthology />} />
  133. <Route path="term" element={<LibraryBlogTerm />} />
  134. </Route>
  135. <Route path="studio/:studioname" element={<Studio />}>
  136. <Route path="home" element={<StudioHome />} />
  137. <Route path="palicanon" element={<StudioPalicanon />}></Route>
  138. <Route path="recent" element={<StudioRecent />}></Route>
  139. <Route path="channel" element={<StudioChannel />}>
  140. <Route path="list" element={<StudioChannelList />} />
  141. <Route path=":channelid/edit" element={<StudioChannelEdit />} />
  142. </Route>
  143. <Route path="group" element={<StudioGroup />}>
  144. <Route path="list" element={<StudioGroupList />} />
  145. <Route path=":groupid" element={<StudioGroupShow />} />
  146. <Route path=":groupid/edit" element={<StudioGroupEdit />} />
  147. <Route path=":groupid/show" element={<StudioGroupShow />} />
  148. </Route>
  149. <Route path="dict" element={<StudioDict />}>
  150. <Route path="list" element={<StudioDictList />} />
  151. </Route>
  152. <Route path="term" element={<StudioTerm />}>
  153. <Route path="list" element={<StudioTermList />} />
  154. </Route>
  155. <Route path="article" element={<StudioArticle />}>
  156. <Route path="list" element={<StudioArticleList />} />
  157. <Route path=":articleid/edit" element={<StudioArticleEdit />} />
  158. </Route>
  159. <Route path="anthology" element={<StudioAnthology />}>
  160. <Route path="list" element={<StudioAnthologyList />}></Route>
  161. <Route path=":anthology_id/edit" element={<StudioAnthologyEdit />} />
  162. </Route>
  163. <Route path="analysis" element={<StudioAnalysis />}>
  164. <Route path="list" element={<StudioAnalysisList />} />
  165. </Route>
  166. </Route>
  167. </Routes>
  168. );
  169. };
  170. export default Widget;