autobrr/internal/http
KaiserBh edae1bbf4b
refactor(web): migrate create-react-app to vite (#787)
* removed react-app type instead use vite.

* removed index.html from public since vite uses it from root: read more: https://vitejs.dev/guide/#index-html-and-project-root

* yarn.lock update.

* added vite config file. With commented rollUp option if we want the build to be called build but using default stuff for now.

* updated tsconfig to use vite and include vite.config.ts

* changed package json build commands to use vite.

* for some reason there is an error in vite config when we put project as tsconfig.json.

* build.go updated to use the new dist folder.

* refactored as well updated to use dist and web.AssetHandler again.

* Fixed issue forcing the frontend to be reloaded for all routes to work if logged in fresh without reloading it will always go back to dashboard.

* updated it to use the new function; need to fix the Index for baseUrl I believe, if enabled it works except logs route will crash due to cors.

* refactored and default port to 7474, don't think we need the rollUpOptions.

* added tmp/ to ignore .

* init air.toml, for dev hot reloading both app and backend. https://github.com/cosmtrek/air run it using air but make sure it's in PATH

* updated the start command to build and watch for changes, works great with air.

* revert

* added proxy for vite config. To be used for dev.

* refactor: I think this should fix it, when logs route etc getting accessed usually it throws error but by getting rid of the catch-all it should work as intended, since web.RegisterHandler(r) will catch the unmatched ones.

* fix: baseurl and build

* fix(build): docker ignore !web/dist

* fix(build): dockerignore add exclusions

* docs: update README.md

* build: update postcss config

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-07 16:04:10 +02:00
..
action.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
apikey.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
auth.go feat(http): improve invalid login handling (#597) 2022-12-31 01:04:41 +01:00
config.go feat(settings): make log level configurable from UI (#704) 2023-02-11 22:37:06 +01:00
download_client.go feat(clients): add support for qBittorrent 4.4.0+ (#558) 2022-12-10 19:25:04 +01:00
encoder.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
feed.go feat(feeds): view latest RSS and Torznab feed (#609) 2023-01-02 23:00:11 +01:00
filter.go feat(filters): improve list view with filtering (#465) 2022-09-22 11:54:17 +02:00
health.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
indexer.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
irc.go feat(irc): improve list view (#466) 2022-09-22 16:39:05 +02:00
logs.go refactor(logs): use zerolog instead of log (#797) 2023-03-30 22:04:44 +02:00
logs_sanitize_test.go refactor(logs): improve log sanitization performance (#779) 2023-03-26 23:25:23 +02:00
middleware.go chore(http): set log level to trace (#765) 2023-03-19 22:01:43 +01:00
notification.go feat(api): add apikey support (#408) 2022-08-15 11:58:13 +02:00
release.go feat(http/releases): report errors to end-users. (#596) 2022-12-31 00:35:44 +01:00
server.go refactor(web): migrate create-react-app to vite (#787) 2023-04-07 16:04:10 +02:00
update.go feat: show new updates in dashboard (#690) 2023-02-05 18:44:11 +01:00