forked from Archives/Athou_commafeed
let quarkus generate the documentation
This commit is contained in:
883
commafeed-client/package-lock.json
generated
883
commafeed-client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,6 @@
|
||||
"react-redux": "^9.2.0",
|
||||
"react-router-dom": "^7.7.1",
|
||||
"react-swipeable": "^7.0.2",
|
||||
"redoc": "^2.5.0",
|
||||
"style-to-object": "^1.0.9",
|
||||
"throttle-debounce": "^5.0.2",
|
||||
"tinycon": "^0.6.8",
|
||||
|
||||
@@ -3,7 +3,8 @@ import { I18nProvider } from "@lingui/react"
|
||||
import { MantineProvider } from "@mantine/core"
|
||||
import { ModalsProvider } from "@mantine/modals"
|
||||
import { Notifications } from "@mantine/notifications"
|
||||
import React, { useEffect, useState } from "react"
|
||||
import type React from "react"
|
||||
import { useEffect, useState } from "react"
|
||||
import { isSafari } from "react-device-detect"
|
||||
import ReactGA from "react-ga4"
|
||||
import { HashRouter, Navigate, Route, Routes, useLocation, useNavigate } from "react-router-dom"
|
||||
@@ -72,9 +73,6 @@ function Providers(props: { children: React.ReactNode }) {
|
||||
)
|
||||
}
|
||||
|
||||
// api documentation page is very large, load only on-demand
|
||||
const ApiDocumentationPage = React.lazy(async () => await import("@/pages/app/ApiDocumentationPage"))
|
||||
|
||||
function AppRoutes() {
|
||||
const sidebarVisible = useAppSelector(state => state.tree.sidebarVisible)
|
||||
|
||||
@@ -85,7 +83,6 @@ function AppRoutes() {
|
||||
<Route path="login" element={<LoginPage />} />
|
||||
<Route path="register" element={<RegistrationPage />} />
|
||||
<Route path="passwordRecovery" element={<PasswordRecoveryPage />} />
|
||||
<Route path="api" element={<ApiDocumentationPage />} />
|
||||
<Route path="app" element={<Layout header={<Header />} sidebar={<Tree />} sidebarVisible={sidebarVisible} />}>
|
||||
<Route path="category">
|
||||
<Route path=":id" element={<FeedEntriesPage sourceType="category" />} />
|
||||
|
||||
@@ -6,7 +6,9 @@ export const redirectToLogin = createAppAsyncThunk("redirect/login", (_, thunkAp
|
||||
|
||||
export const redirectToRegistration = createAppAsyncThunk("redirect/register", (_, thunkApi) => thunkApi.dispatch(redirectTo("/register")))
|
||||
|
||||
export const redirectToApiDocumentation = createAppAsyncThunk("redirect/api", (_, thunkApi) => thunkApi.dispatch(redirectTo("/api")))
|
||||
export const redirectToApiDocumentation = createAppAsyncThunk("redirect/api", () => {
|
||||
window.location.href = "api-documentation/"
|
||||
})
|
||||
|
||||
export const redirectToSelectedSource = createAppAsyncThunk("redirect/selectedSource", (_, thunkApi) => {
|
||||
const { source } = thunkApi.getState().entries
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import { Box } from "@mantine/core"
|
||||
import { HistoryService, RedocStandalone } from "redoc"
|
||||
|
||||
// disable redoc url sync because it causes issues with hashrouter
|
||||
Object.defineProperty(HistoryService.prototype, "replace", {
|
||||
value: () => {
|
||||
// do nothing
|
||||
},
|
||||
})
|
||||
|
||||
function ApiDocumentationPage() {
|
||||
return (
|
||||
// force white background because documentation does not support dark theme
|
||||
<Box style={{ backgroundColor: "#fff" }}>
|
||||
<RedocStandalone specUrl="openapi.json" />
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
export default ApiDocumentationPage
|
||||
@@ -37,7 +37,8 @@ export default defineConfig(() => ({
|
||||
"/rest": "http://localhost:8083",
|
||||
"/next": "http://localhost:8083",
|
||||
"/ws": "ws://localhost:8083",
|
||||
"/openapi.json": "http://localhost:8083",
|
||||
"/openapi": "http://localhost:8083",
|
||||
"/api-documentation": "http://localhost:8083",
|
||||
"/custom_css.css": "http://localhost:8083",
|
||||
"/custom_js.js": "http://localhost:8083",
|
||||
"/j_security_check": "http://localhost:8083",
|
||||
|
||||
Reference in New Issue
Block a user