chore(web): relocations and cleanups (#957)

* delete manifest (vite-plugin-pwa generates it)

* fix upper case letter on screen components

* fix imports of screens components missing upper case

* remove default export from Base.tsx

* move RegexPlayground to settings import

* replace some relative path imports

* remove React and ununsed imports

* small alignments on vite.config.ts

* move Dashboard and Releases to screens

* move filters/index.tsx to filters/index.ts

* remove default export from APIKeyAddForm

* remove default export from FilterAddForm

* organize imports and exports for the router

* add .vscode workspace to gitignore

* some touchs on .gitignore file

* fix some eslint rules
This commit is contained in:
Fabricio Silva 2023-07-21 16:33:51 +01:00 committed by GitHub
parent 72bb2ddadb
commit c7ec93722b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 187 additions and 230 deletions

View file

@ -4,31 +4,18 @@
*/
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { Login } from "@screens/auth/login";
import { Onboarding } from "@screens/auth/onboarding";
import Base from "@screens/Base";
import { Dashboard } from "@screens/dashboard";
import { FilterDetails, Filters } from "@screens/filters";
import { Logs } from "@screens/Logs";
import { Releases } from "@screens/releases";
import Settings from "@screens/Settings";
import {
APISettings,
ApplicationSettings,
DownloadClientSettings,
FeedSettings,
IndexerSettings,
IrcSettings,
LogSettings,
NotificationSettings,
ReleaseSettings
} from "@screens/settings/index";
import { RegexPlayground } from "@screens/settings/RegexPlayground";
import { NotFound } from "@components/alerts/NotFound";
import { baseUrl } from "@utils";
import { NotFound } from "@components/alerts/NotFound";
import { Base } from "@screens/Base";
import { Dashboard } from "@screens/Dashboard";
import { Logs } from "@screens/Logs";
import { Filters, FilterDetails } from "@screens/filters";
import { Releases } from "@screens/Releases";
import { Settings } from "@screens/Settings";
import * as SettingsSubPage from "@screens/settings/index";
import { Login, Onboarding } from "@screens/auth";
export const LocalRouter = ({ isLoggedIn }: { isLoggedIn: boolean }) => (
<BrowserRouter basename={baseUrl()}>
{isLoggedIn ? (
@ -43,16 +30,16 @@ export const LocalRouter = ({ isLoggedIn }: { isLoggedIn: boolean }) => (
<Route path=":filterId/*" element={<FilterDetails />} />
</Route>
<Route path="settings" element={<Settings />}>
<Route index element={<ApplicationSettings />} />
<Route path="logs" element={<LogSettings />} />
<Route path="api-keys" element={<APISettings />} />
<Route path="indexers" element={<IndexerSettings />} />
<Route path="feeds" element={<FeedSettings />} />
<Route path="irc" element={<IrcSettings />} />
<Route path="clients" element={<DownloadClientSettings />} />
<Route path="notifications" element={<NotificationSettings />} />
<Route path="releases" element={<ReleaseSettings />} />
<Route path="regex-playground" element={<RegexPlayground />} />
<Route index element={<SettingsSubPage.Application />} />
<Route path="logs" element={<SettingsSubPage.Logs />} />
<Route path="api-keys" element={<SettingsSubPage.Api />} />
<Route path="indexers" element={<SettingsSubPage.Indexer />} />
<Route path="feeds" element={<SettingsSubPage.Feed />} />
<Route path="irc" element={<SettingsSubPage.Irc />} />
<Route path="clients" element={<SettingsSubPage.DownloadClient />} />
<Route path="notifications" element={<SettingsSubPage.Notification />} />
<Route path="releases" element={<SettingsSubPage.Release />} />
<Route path="regex-playground" element={<SettingsSubPage.RegexPlayground />} />
</Route>
</Route>
</Routes>
@ -63,4 +50,4 @@ export const LocalRouter = ({ isLoggedIn }: { isLoggedIn: boolean }) => (
</Routes>
)}
</BrowserRouter>
);
);