From c7ec93722b7b92f5dde046bad128211cbabc1b71 Mon Sep 17 00:00:00 2001 From: Fabricio Silva Date: Fri, 21 Jul 2023 16:33:51 +0100 Subject: [PATCH] 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 --- .gitignore | 40 +++++++------- web/index.html | 14 ++--- web/manifest.json | 25 --------- web/src/api/APIClient.ts | 6 +- web/src/components/data-table/Cells.tsx | 4 +- web/src/components/inputs/select.tsx | 2 +- web/src/components/inputs/select_wide.tsx | 2 +- web/src/components/inputs/switch.tsx | 4 +- web/src/components/inputs/text.tsx | 3 +- web/src/components/modals/index.tsx | 6 +- web/src/components/panels/index.tsx | 14 ++--- web/src/domain/routes.tsx | 55 +++++++------------ web/src/forms/filters/FilterAddForm.tsx | 6 +- web/src/forms/index.ts | 2 +- web/src/forms/settings/APIKeyAddForm.tsx | 8 +-- .../forms/settings/DownloadClientForms.tsx | 8 +-- web/src/forms/settings/IndexerForms.tsx | 20 +++---- web/src/screens/Base.tsx | 6 +- .../{dashboard/index.tsx => Dashboard.tsx} | 6 +- web/src/screens/Logs.tsx | 11 ++-- .../{releases/index.tsx => Releases.tsx} | 4 +- web/src/screens/Settings.tsx | 3 +- web/src/screens/auth/{login.tsx => Login.tsx} | 0 .../auth/{onboarding.tsx => Onboarding.tsx} | 5 +- .../{filters/index.tsx => auth/index.ts} | 4 +- .../filters/{action.tsx => Action.tsx} | 8 +-- .../filters/{details.tsx => Details.tsx} | 16 +++--- .../screens/filters/{list.tsx => List.tsx} | 48 ++++++++-------- web/src/screens/filters/index.ts | 7 +++ web/src/screens/settings/Action.tsx | 2 +- web/src/screens/settings/Api.tsx | 2 +- web/src/screens/settings/DownloadClient.tsx | 10 ++-- web/src/screens/settings/Feed.tsx | 8 +-- web/src/screens/settings/Indexer.tsx | 6 +- web/src/screens/settings/Logs.tsx | 4 +- web/src/screens/settings/Notifications.tsx | 4 +- web/src/screens/settings/RegexPlayground.tsx | 10 ++-- web/src/screens/settings/Releases.tsx | 4 +- web/src/screens/settings/index.ts | 19 ++++--- web/tsconfig.json | 2 +- web/vite.config.ts | 9 ++- 41 files changed, 187 insertions(+), 230 deletions(-) delete mode 100644 web/manifest.json rename web/src/screens/{dashboard/index.tsx => Dashboard.tsx} (75%) rename web/src/screens/{releases/index.tsx => Releases.tsx} (89%) rename web/src/screens/auth/{login.tsx => Login.tsx} (100%) rename web/src/screens/auth/{onboarding.tsx => Onboarding.tsx} (99%) rename web/src/screens/{filters/index.tsx => auth/index.ts} (56%) rename web/src/screens/filters/{action.tsx => Action.tsx} (99%) rename web/src/screens/filters/{details.tsx => Details.tsx} (99%) rename web/src/screens/filters/{list.tsx => List.tsx} (99%) create mode 100644 web/src/screens/filters/index.ts diff --git a/.gitignore b/.gitignore index d437f49..3610550 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,25 @@ -# Logs and databases # -###################### +# Logs and databases *.log *.sql *.sqlite -*.db -*.db-shm -*.db-wal *.db* +log/ +logs/ -# OS generated files # -###################### -.DS_Store -.DS_Store? +# OS generated files +.DS_Store* ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db -# Other +# IDE .idea +.vscode + +# Package manager +node_modules/ .pnp.* .yarn/* !.yarn/patches @@ -27,17 +27,17 @@ Thumbs.db !.yarn/releases !.yarn/sdks !.yarn/versions -node_modules/ +# Ditto for yarn, except we're using pnpm +yarn.lock +# If needed, package-lock.json shall be added manually using an explicit git add command +package-lock.json + +# Others web/build bin/ -log/ -#dist/ +dist/ .run/ tmp/ -# If needed, package-lock.json shall be added -# manually using an explicit git add command. -package-lock.json -# Ditto for yarn, except we're using npm. -yarn.lock -dist/* -!dist/.gitkeep + +# Preserve files +!.gitkeep diff --git a/web/index.html b/web/index.html index c454413..da0cef8 100644 --- a/web/index.html +++ b/web/index.html @@ -10,16 +10,12 @@ - + - - - - - + + + + autobrr