Commit graph

50 commits

Author SHA1 Message Date
ze0s
be05ffba73
feat(irc): manually re-process announces (#1419)
* fix(releases): add manual processing

* feat(irc): add re-process button to channel msg

* feat(irc): add missing client method

* feat(web): change reprocess icon placement

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2024-03-19 18:23:43 +01:00
martylukyy
1a23b69bcf
feat(web): move from react-router to @tanstack/router (#1338)
* fix(auth): invalid cookie handling and wrongful basic auth invalidation

* fix(auth): fix test to reflect new HTTP status code

* fix(auth/web): do not throw on error

* fix(http): replace http codes in middleware to prevent basic auth invalidation
fix typo in comment

* fix test

* fix(web): api client handle 403

* refactor(http): auth_test use testify.assert

* refactor(http): set session opts after valid login

* refactor(http): send more client headers

* fix(http): test

* refactor(web): move router to tanstack/router

* refactor(web): use route loaders and suspense

* refactor(web): useSuspense for settings

* refactor(web): invalidate cookie in middleware

* fix: loclfile

* fix: load filter/id

* fix(web): login, onboard, types, imports

* fix(web): filter load

* fix(web): build errors

* fix(web): ts-expect-error

* fix(tests): filter_test.go

* fix(filters): tests

* refactor: remove duplicate spinner components
refactor: ReleaseTable.tsx loading animation
refactor: remove dedicated `pendingComponent` for `settingsRoute`

* fix: refactor missed SectionLoader to RingResizeSpinner

* fix: substitute divides with borders to account for unloaded elements

* fix(api): action status URL param

* revert: action status URL param
add comment

* fix(routing): notfound handling and split files

* fix(filters): notfound get params

* fix(queries): colon

* fix(queries): comments ts-ignore

* fix(queries): extract queryKeys

* fix(queries): remove err

* fix(routes): move zob schema inline

* fix(auth): middleware and redirect to login

* fix(auth): failing test

* fix(logs): invalidate correct key

* fix(logs): invalidate correct key

* fix(logs): invalidate correct key

* fix: JSX element stealing focus from searchbar

* reimplement empty release table state text

* fix(context): use deep-copy

* fix(releases): empty state and filter input warnings

* fix(releases): empty states

* fix(auth): onboarding

* fix(cache): invalidate queries

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2024-02-12 13:07:00 +01:00
martylukyy
35d1a6985f
fix(web): irc settings light theme colors (#1357) 2024-01-20 09:31:22 +01:00
ze0s
45b522abf8
chore: update license header year (#1332)
* chore: update license header year

* chore: update license header year tsx files

* chore: update license header
2024-01-01 16:21:02 +01:00
KaiserBh
db7ab7c99a
feat(web): migrate Tanstack Query to v5 (#1277)
* feat: migrate to v5

* refactor: Revise error handling in QueryClient for compatibility with React Query v5

The `useErrorBoundary` option has been renamed to `throwOnError` and suspense have been removed: more on suspense more on suspense.
https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5#new-hooks-for-suspense

* refactor: Callbacks on useQuery (and QueryObserver) have been removed

onSuccess, onError and onSettled have been removed from Queries. They haven't been touched for Mutations. Please see this https://github.com/TanStack/query/discussions/5279 for motivations behind this change and what to do instead.

* refactor: change to isPending, isLoading have been renamed for mutations.

Also, they are using object now:
- useQuery(key, fn, options)
+ useQuery({ queryKey, queryFn, ...options })

* refactor: change to placeHolderData.

Removed keepPreviousData in favor of placeholderData identity function
https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5#removed-keeppreviousdata-in-favor-of-placeholderdata-identity-function

* fix: useSuspenseQuery instead of useQuery.

* fix(web): more useSuspenseQuery substitutions

* whoops - nobody saw that okay?

* fix pnpm lockfile

* fix pnpm lockfile again

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
Co-authored-by: soup <soup@r4tio.dev>
2023-12-25 15:37:29 +01:00
martylukyy
8ef8bc6003
enchancement(web): IRC settings layout (#1312)
* enchancement(web): IRC settings layout

* consolidate some css
2023-12-25 13:16:17 +01:00
KaiserBh
92646dacc8
build(web): bump vite and cjs node api refactor (#1276)
* refactor: use ES module.

To maintain compatibility with vite 6 and since that's where the web are heading too.
Also moved some deps to devDeps, better optimized production builds. Changed some of the script command to match how others run or preview it, I think it was still using CRA.

* chore: update-lock.yaml

* refactor: since we are using ESM now, .cjs .ts required.

Changed the file extensions and refactored the .eslintrc.cjs I think there was a lot of bloat from the previous version and removed most of them and keep it simple for now, we can always expand from here a clean slate.

* refactor: added .node.json and refactored.

* fix(build): APIClient.ts had few error.

ESLint: Unexpected lexical declaration in case block.(no-case-declarations)

and TS2554: Expected  0-1  arguments, but got  2
we passed the cause to the constructor which it only takes 1 argument so removed it instead, since it's already in the string "Offline".

* fix(build): import never used.

* fix(build): add the types for react-dom/client.

* fix(build): use ESNext instead.

* fix(build): hmm why are we missing the types for the import?

Added @types/react-table.

* chore(lint): fix lint warnings

Don't use * for export.

* chore(lint): missing deps.

React Hook useEffect has a missing dependency: 'validateForm'. Either include it or remove the dependency array

* chore(lint): fix import.

* chore(lint): fix import.

* chore(lint): fix react hook.

error  React Hook "useMutation" is called conditionally. React Hooks must be called in the exact same order in every component render  react-hooks/rules-of-hooks

* chore(lint): value never used.

  52:10  error    '_regexPattern' is assigned a value but never used

* chore(lint): add missing dependency to useEffect

* chore(lint): fix imports.

* chore(lint): add deps to array.

* chore(lint): error  Unexpected lexical declaration in case block  no-case-declarations

* chore(lint): remove any and add types.

I am not sure about type CompleteFilterType I know it's being used for JSON so might need to use any?? dunno just test it and see if works.

* chore(lint): react-hooks/exhaustive-deps

* chore(lint): react-hooks/exhaustive-deps

* chore(lint): use type guard instead of any.

* chore(lint): react-hooks/exhaustive-deps

* Revert "chore(lint): remove any and add types."

This reverts commit 7b9168fe7826d63cb00e44df8e15fbde49b59174.

* chore(web): ignore sourcemap warnings

* chore(web): update vite to 5.0.4

* chore: add the new script `pnpm dev` to start the dev env.

* chore: add the curly braces.

more info: https://eslint.org/docs/latest/rules/no-case-declarations

* chore: remove the extra spaces

* chore: remove the extra spaces

* chore: add the curly braces.

* chore: add curly braces

* remove text-shadow property and comment

* revert switch case braces for Actions.tsx

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-12-15 23:36:16 +01:00
Shivaram Lingamneni
b2c32a421e
fix(irc): improve IRC handler management (#1269)
* fix some races in IRC handler management

* remove go 1.21 and slices package

* chore: update deps

* fix: use exp/slices pkg and client callbacks

* fix(irc): remove deadlock mutex from authenticate

* restore locking in authenticate()

* fix(irc): data races

* fix(irc): do not allow restart of disabled network

* fix(irc): disable restart btn if net disabled

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-12-12 20:29:43 +01:00
stacksmash76
e842a7bd42
enhancement(web): ui overhaul (#1155)
* Various WebUI changes and fixes.

* feat(tooltip): make tooltip display upwards

* fix(tooltip): place tooltip to the right

* fix(web): add missing ml-px to SwitchGroup header

current: https://i.imgur.com/2WXstPV.png
new: https://i.imgur.com/QGQ49mP.png

* fix(web): collapse sections

* fix(web):  improve freeleech section

* fix(web): rename action to action_components

Renamed the 'action' folder to 'action_components' to resolve import issues due to case sensitivity.

* fix(web): align CollapsibleSection

Old Advanced tab: https://i.imgur.com/MXaJ5eJ.png
New Advanced tab: https://i.imgur.com/4nPJJRw.png
Music tab for comparison: https://i.imgur.com/I59X7ot.png

* fix(web): remove invalid CSS class

* revert: vertical padding on switchgroup

added py-0 on the freeleech part instead

* feat(settings): add back log files

* fix(settings): irc channels and font sizes

* fix(components): radio select roundness

* fix(styling): various minor changes

* fix(filters): remove jitter fields

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-11-18 14:46:16 +01:00
Fabricio Silva
8600d3a2ab
fix(indexes): toggle on and off with switch (#1164)
* chore(indexers): replace array position with id

* fix(indexers): enable and disable without editing

* feat(indexer): add toggle endpoint and refactoring

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-10-03 21:57:11 +02:00
martylukyy
80aa0b6331
enhancement(web): disable background scroll when IRC fullscreen view is active (#1112)
* enhancement(web): disable background scroll when IRC fullscreen view is active

* switch from add/remove to toggle.

* add missing unmount
2023-09-11 20:31:00 +02:00
stacksmash76
3c030dc0ce
fix(web): cant update from settings panels (#1105)
* fix(web): propagation bug with IRC network table dropdown

* fix submit button not working
2023-09-11 13:31:07 +02:00
stacksmash76
d187daa566
enhancement(web): layout improvements (#1095)
* minor style fixes

fix: removed not-allowed button-in-button in IRCLogsDropdown, removed unnecessary inner div as well
fix: removed shadow from 'remove releases older than X?' modal in settings on the light theme. (told soup about this long ago)

* added tips for searching releases, improved overall look

enhancement: made title page headings have a smaller vertical margin (almost by half)
chore: moved title page headings from <header> to some less-obtuse screen-reader element
enhancement: added documentation to the search engine on the releases table page
enhancement: made StatsItem cards more compact (WIP - to be coupled with more stats items)
enhancement: made WarningAlert be more contrastful on the light theme, made it more compact and added a border as well.

* better wording for search tips

* bad merge resolve, fixed now
2023-09-10 17:28:30 +02:00
stacksmash76
2fed48e0dd
enhancement(web): add react suspense and improve DX (#1089)
* add react suspense, fix broken stuff, clean up code, improve DX

enhancement: added react suspense + spinner to show loading (still can be added in certain places)
chore: cleaned up Header/NavBar code
chore: cleaned up DeleteModal code
chore: cleaned up other relevant code
enhancement: changed remove button style to be much more pleasant (see e.g. filter tabs)
fix: made active tab on filters page to be blue (as it should've been) when active
fix: fixed ghost delimiter which was only visible when DeleteModal was active in FormButtonGroup
chore: removed most of linter warnings/errors
fix: fixed incorrect/double modal transition in FilterExternalItem
fix: fixed incorrect z-height on Options popover in Settings/IRC (would've been visible when Add new was clicked)
enhancement: improved robustness of all Context classes to support seamless new-feature expansion (#866)
enhancement: improved expand logic (see #994 comments)

* reverted irc expand view to previous design

* forgot to propagate previous z-height fix

* jinxed it

* add license header to new files

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2023-09-10 12:35:43 +02:00
martylukyy
2f0d52e71c
enhancement(web): IRC logs view (#1066)
* enhancement(web): IRC logs view

* revert sorting changes and implement auto scroll

* replace setTimeout with useEffect and dep
add option menu for scroll on new log toggle.
prevent duplicate log entries when toggling settings.scrollOnNewLog through clearing logs once

* linting
2023-09-01 21:56:12 +02:00
martylukyy
72bb2ddadb
feat(web): fullscreen view for irc announce logs (#994)
* fullscreen view for announce logs

* cleanup functions and classes

* some css touches

---------

Co-authored-by: Fabricio Silva <hi@fabricio.dev>
2023-07-21 17:24:43 +02:00
martylukyy
2358ea143e
fix(web): view button alignment in irc settings (#1011)
fix view button alignment in irc settings
2023-07-15 19:37:04 +02:00
Fabricio Silva
8d20d2cf39
feat(web): improve irc view (#989)
* inherit font-size

* inherit cursor-pointer and bubble click event

* improve react keys using ids instead of array position

* fix scrollbar corner not being transparent

* change irc view height calculation

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-07-02 14:21:01 +02:00
Fabricio Silva
a5e05284d0
chore(web): add ignore pattern to eslint for the unused-vars rule (#965)
* allow eslint ununsed vars and params if starts with _

* comment rests of unused code on Irc.tsx

* fix some eslint warn about unused code
2023-07-02 14:19:03 +02:00
Fabricio Silva
8721ab65ce
fix(irc): urlencode SSEKey for SSE streams (#990)
apply RFC4648 to base64 sseKey to fix urlEncoding
2023-06-17 14:44:20 +02:00
ze0s
ecc84f5f2d
fix(irc): view channel history (#987)
fix(irc): irc monitor channels

* base64 sse stream key
2023-06-15 23:17:26 +02:00
ze0s
ccabe96bdf
feat(irc): view announces per channel (#948)
* feat(irc): add sse to handler

* feat(irc): view and send irc messages per network

* refactor(irc): use id as handlerkey

* refactor(irc): use id as handlerkey

* feat(web): add irc context

* refactor: create sse stream per network channel

* fix(irc): remove non-working wildcard callback handler

* feat: use fork of sse

* chore(deps): update ergo/irc-go to v0.3.0

* fix: clean irc msg before sse publish

* feat: add view channel button

* feat: styling improvements

* feat: show time
2023-05-21 15:51:40 +02:00
soup
8acf33589d
enhancement(web): mutation improvements and toast updates (#913)
* make notification switch take onToggleMutation

Instead of opening it like the edit button, it now enables/disables it directly.

* improved toast for update checks

* improved toast for download clients

it now mentions what client is enabled/disabled

* improved irc network toast

* added toast when copying apikey

* added toast to log download

implemented an info variant for the toasts

* improved feed toast

* improved toast for update checks

* Merge branch 'develop' into enhancement/mutation-improvements-toast-updates
2023-05-06 18:19:43 +02:00
ze0s
604c7896bd
chore: add LICENSE GPLv2-or-later (#897)
* chore: add LICENSE

* chore: add LICENSE to README
2023-05-01 16:21:59 +02:00
ze0s
6e5385a490
refactor(web): replace pkg react-query with tanstack/react-query (#868)
* refactor: move to tanstack/react-query and fix cache

* refactor(releases): move to tanstack/react-query

* refactor(logs): move to tanstack/react-query

* refactor(base): move to tanstack/react-query

* refactor(base): move to tanstack/react-query

* refactor(dashboard): move to tanstack/react-query

* refactor(auth): move to tanstack/react-query

* refactor(filters): move to tanstack/react-query

* refactor(settings): move to tanstack/react-query

* chore(pkg): add tanstack/react-query

* refactor(filters): move to tanstack/react-query

* refactor: move to tanstack/react-query

* refactor: invalidate queries

* chore(pkg): remove old react-query

* chore: change imports to root prefixes

* build: remove needs web from test

* set enableReinitialize to true to fix formik caching issues

* fix all property for apiKeys const

* fix toast when enabling/disabling feed

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-04-27 21:26:27 +02:00
ze0s
286f2f53f7
fix(indexers): test API button (#844)
fix(indexers): api test button
2023-04-16 18:50:23 +02:00
soup
59f41be3ef
enhancement(settings): make lists sortable (#800)
* initial commit

* sorting for clients and networks

* sort feeds

* cursor pointer on hover
2023-03-30 22:27:24 +02:00
ze0s
ac276868fb
feat(settings): make log level configurable from UI (#704)
* feat(settings): set log level

* fix: light theme colors

* fix: light theme colors size unit
2023-02-11 22:37:06 +01:00
martylukyy
6a839bedec
feat(web): irc settings add toggle switches (#606)
* feat(web): switch buttons on irc settings page

* changed resolution limit for responsive design from 640px to 768px
values in Network, Server and Nick will now truncate instead of showing a scrollbar
changes in element alignments

* feat(irc): toggle from settings

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-01-06 22:41:47 +01:00
soup
ca4ad498a4
feat(web): settings cosmetic improvements (#621)
* Minor cosmetic changes

- Changed Feeds paragraph to include regular RSS feeds
- Centered "Danger Zone" header on Settings/Releases
- Added punctuations to subtitles and sublabes that were missing them
- Removed some subtitles over "Create new" buttons in Settings

* settings(releases) Added paragraph below header

* Changed user and docs icons

* Fixed Notifications table for narrow screens

* Made Notifications-page dynamic like the IRC-page

- Hiding notification type and events on smaller screens

* Made API table look better on smaller screens

- Adjusted col-spans
- overflow-auto on name

* overflow-hidden on name

* Made Feeds dynamic like Notifications

* Made Clients dynamic like Feeds and Notifications

* name field will now truncate instead of span itself over multiple lines
mouseovering the name will now show the full value
mitigated scrollbars
changes to col-span to move the name column closer to enabled switch
adjusted paddings in desktop and mobile layout

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-01-06 22:07:27 +01:00
ze0s
4bf023d030
feat(irc): support optional SASL and NickServ auth (#511)
* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): add validation

* feat(indexers): unify and set required values

* feat(irc): add postgres migrations

* feat(irc): use nick as handlerkey

* feat(irc): use account for nickserv

* fix(irc): pg db migration
2022-10-27 22:25:58 +02:00
stacksmash76
ac988f28f4
feat(web): better tooltips and uniformity (#474)
* - fix: changed all {text,bg}-{teal,indigo}-* color properties to {text,bg}-{blue}-* so there is only one dominant primary color in the UI -- blue
- enhancement: added `cursor: pointer` to the PageButton component (used in pagination)
- enhancement: modified TitleCell to use the new Tooltip component and modified the width selectors to a more sane default value, now instead of scrolling one just has to tap the cell to see it's untruncated value
- enhancement: modified the Tooltip component to use react-popper-tooltip (which in turn uses popper.js) which is a much better alternative, since it uses auto-positioning in case there's not enough space and some things aren't as broken as in the previous version (e.g. there was a problem with forcing the previous tooltip to use a specific width)
- enhancement: added a useMedia hook selector from the react-use repository, which might come in handy in the future for better/easier decoupling of Desktop and Mobile UI/UX patterns via JS (versus CSS-only)
- enhancement: made the mobile navbar more visible and clear. also fixed previous path === "/" bug which was fixed on desktop.
- fix: fixed table headers/footers so they're rounded
- enhancement: made pagination components more compact (buttons and show N result selector)

* changed {ring, border}-indigo-* to ring-blue-*

* build: add yarn.lock

* fix: formatting warnings

* fix: formatting warnings

* fix: more formatting warnings

* fix: more formatting
2022-10-14 21:54:21 +02:00
ze0s
300418b9f1
feat(irc): improve list view (#466)
* feat(irc): add irc status examples

* feat(irc): add dropdown menu to list

* feat(irc): update heroicons and add expand button

* feat(irc): update heroicons and add expand button
2022-09-22 16:39:05 +02:00
Kyle Sanderson
7deac6a781
fix(irc): rewrite handler pipeline (#399)
* fix(irc): rewrite handler pipeline

This might be overkill but the pipeline has been made event driven. I've tested on a couple networks, and bouncing nicks / connections brings it back every time. creating the a different branch from https://github.com/autobrr/autobrr/pull/398 because it's pretty intrusive (and I didn't apply the GUI changes).

* fix(irc): couple adjustments

* fix(irc): deadlocks

* fix: add missing dependency

* fix(irc): remove more locks from connect cmds

* feat(irc): conditional monitoring message

* feat(irc): show unhealthy network in ui

* feat(irc): improve logs and comments
2022-08-12 15:32:02 +02:00
stacksmash76
3da594ec75
feat(web): mobile UI improvements (#359)
* enhancement: improved alerts component contrast
enhancement: simplified and improved radio switch group look
fix: fixed inconsistent spacing in input components (there's still some work left to be done)
fix: made slideover panel display on full width on mobile devices
enhancement: made forms more accessible to mobile users, adapter changes in accordance with the previous input components fix
fix: fixed misspelling in NotificationForms filename
chore: cleaned up code
fix: made filter table top edges less round and improved look
fix: fixed a bug where when a modal/slideover component was opened, a 1px white bar would be shown in one of the modal parent elements (for the fix see L89 in screens/settings/DwonloadClient.tsx)
enhancement: improved responsiveness for irc network list

* Fixed 2 small comma warnings from ESLint

Co-authored-by: anonymous <anonymous>
2022-07-17 23:34:49 +02:00
Ludvig Lundgren
f63ace662a
feat(irc): improve reconnect and add notifications (#315)
* refactor(irc): nickserv and methods

* feat(notifications): add new events and refactor send

* feat(irc): handle disconnect reconnect and connect

* feat(irc): update config for ergo local irc server

* feat(irc): retry initial connect

* feat(irc): show nickserv errors
2022-06-29 16:50:38 +02:00
stacksmash76
c4efbd6e20
fix(web): unauthorized errors (#320)
- fix(ErrorPage): add padding to the page for mobile devices

- chore(react-query): wrap APIClient calls in anonymous functions to avoid passing react-query context variables by accident

- fix incorrect ordering of ErrorBoundary and QueryClientProvider (ErrorBoundary is now the parent)
2022-06-22 22:26:53 +02:00
stacksmash76
4d753b76ed
refactor(web): update to react 18 and other deps (#285)
* Started refactoring codebase for React 18.

* Migrated to react-router v6 fully

* Removed useless test setup along with relevant packages.

* Removed leftover console.log statement

* feat: use status forbidden for onboarding

* refactor(web): use react hook form on login

* fix: comply with r18 shenanigans

* chore: update packages
2022-06-10 19:31:46 +02:00
stacksmash76
cb8f280e86
refactor(web) add eslint (#222)
* fix(tsconfig.json): changed skipLibCheck to false.
refactor(eslint): moved configuration from package.json to .eslintrc.js and added a typescript plugin for future use

* feat: wip eslint and types

* feat: fix identation

* feat: get rid of last any types
2022-05-17 06:44:07 +02:00
stacksmash76
2c46993264
feat(web): error boundry and fixes (#270)
* web: Added error handling. Fixed table overflow issues. Improved release status titles. Fixed a few bugs where certain forms/modals didn't close properly.

feat(web): Added react-error-boundary and stacktracey for handling errors. In case of a recoverable/non-state updating error, a notification is thrown, otherwise the user is shown an error page with the appropriate stack trace and error type and cause with the possibility of resolving the error by reseting the page's state.
enhancement(web/data-table/cells): Improved cell display behavior in tables -- it's now scrollable on mobile. Improved release status string readability.
enhancement(web/settings/Irc): Made IRC refetch interval every 3 seconds for those who are not patient.
fix(web/modals/DeleteModal): Fixed modal bug where it didn't close on button click.
fix(web/forms/IndexerForms): Fixed bug where the form didn't close on button click.
enhancement(web/ReleaseTable): Made the table more compact by utilizing 3em padding between cells instead of 6.
enhancement(web/ActivityTable): Ditto as above.
enhancement(web): Changed width of every page section from max-w-7xl (1280px to where applicable)
chore(web/dashboard/ActivityTable): Reformatted the file to a saner syntax.
enhancement(web/dashboard/StatsItem): Enlarged font size, set font to extrabold instead of bold and made padding consistent.
fix(web/navbar): Fixed bold font not showing properly on Firefox due to an argument ordering issue.

* chore: update pkg and fix broken proxy
2022-05-12 16:26:41 +02:00
stacksmash76
9ea29d02a2
refactor: releases table-related code and fix for #158 (#159)
* refactor(APIClient): updated the newly added findQuery function to use URLSearchParams instead of manually crafting the URI string itself.

* refactor: moved duplicate dashboard/release code to a separate folder: components/data-table.

* refactor(SlideOver): added proper typings to the SlideOver component and added a sanity check to prevent passing of null/undefined values to the child component before rendering.

* refactor: removed the redundant Network and Channel typings and updated relevant typings to match the backend. adapted relevant code to match these changes.

* fix(ChannelsFieldArray): fixed a bug where it was unable to add a new irc network due to the validation object being initialized as non-empty (formik requires that successful validated entries return empty objects)

* refactor(screens/settings/Irc): replaced incorrect typings, sanitized potentially null values and cleaned up the code.

* fix: included changes should fix issue #158 as well.

* feat: send chan empty array
2022-03-04 21:13:46 +01:00
stacksmash76
b60e5f61c6
refactor: web api client and cleanup (#128)
refactor: refactored APIClient.ts with a new fetch wrapper and changed it into an explicit-import.

chore: modified package.json not to start browser on "npm run start"

chore: cleaned up code, deleted 2mo+ useless old comments.

fix: fixed parameter collision in screens/filters/details.tsx

fix: override react-select's Select component style to make it consistent. addresses #116

Co-authored-by: anonymous <anonymous>
2022-02-10 17:47:05 +01:00
stacksmash76
20138030e1
refactor: various frontend improvements (#101)
* Removed recoil and replaced it with react-ridge-state, a 0.4kb alternative.

* Added AuthContext and SettingsContext persistent localStorage states.

* Fixed tailwind.config.js incorrect key directive. See https://tailwindcss.com/docs/content-configuration#safelisting-classes.

* Changed darkMode in Tailwind to "class" and started manually adjusting the theme according to the appropriate media query.

* Added possibility of changing the theme manually via the Settings tab.

* Changed Releases.tsx behavior to show the UI only when the HTTP request succeeded and there is some data (i.e. table is non-empty).

* Changed the table color of screens/filters/list.tsx to a one notch lighter shade of gray for eye-comfort.

* Replaced "User" in the header, with the users real username.

* Made data version, commit and date fields optional in settings/Application.tsx.

* Started working on a RegExp playground, which works fine, but JS won't cooperate and return the right match length. Either way, the RegExp must be implemented on backend and then must be communicated with the frontend. Otherwise a potential for incorrect results exists.

* Removed Layout.tsx, since it was redundant.

* Created a Checkbox component class for easier and consistent future use.

* Rewritten App.tsx, Login.tsx, Logout.tsx to accomodate for new changes.

* Fixed previous mistake regarding tailwind.config.js purge key, since we're still using old postcss7 from October last year

* Removed package-lock.json from both root and web directories.

* Refresh TypeScript configuration to support a types/ directory containing d.ts. The effect of this is that types don't have to be imported anymore and are at all times available globally. This also unifies them into a single source of truth, which will be a lot easier to manage in the future. Note: Only certain interop types have been moved at the time of writing.

* Fixed minor Checkbox argument mistake.

* fix: remove length from data check

* chore: lock files are annoying

* fix: select

* fix: wip release filtering
2022-01-26 23:54:29 +01:00
Ludvig Lundgren
d8c37dde2f
fix: irc network distinguish inactive and error (#76) 2022-01-10 22:05:27 +01:00
Ludvig Lundgren
140fc97398 feat: show irc channel status 2022-01-09 02:41:19 +01:00
Ludvig Lundgren
f103dff221 feat: show irc network status in settings list 2022-01-08 21:18:38 +01:00
Ludvig Lundgren
5e29564f03
Refactor(web): Replace final-form with Formik and cleanup (#46)
* refactor: begin to replace final-form

* refactor: replace final-form with formik n cleanup
2021-12-23 22:01:59 +01:00
Ludvig Lundgren
66048c5533
feat: dark mode (#32) 2021-09-26 16:52:37 +02:00
Ludvig Lundgren
4d40d41628
Refactor irc client (#19)
* refactor: update http handlers

* feat: add trace log level

* refactir: irc handler

* refactor(definitions): add irc settings and invite cmd:

* feat: add dft values to inputs

* refactor: indexer irc forms

* refactor(definitions): fix nickserv.password var:

* feat: pre fill indexer name field

* refactor: handle stopping and updates
2021-08-29 23:23:02 +02:00
Ludvig Lundgren
773e57afe6 feat: add webui 2021-08-11 15:27:48 +02:00