Commit Graph

68 Commits

Author SHA1 Message Date
Eli Bosley
f5724abffb feat: code first graphql (#1347)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced API capabilities with improved GraphQL interfaces for remote
access, parity checks, notifications, and virtual machine controls.
- Introduction of dynamic remote access settings and refined online
status and service monitoring.
- New `ParityCheckMutationsResolver` for managing parity check
operations through GraphQL.

- **Refactor**
- Consolidated and renamed internal types and schema definitions to
improve consistency and performance.
  - Removed deprecated legacy schemas to streamline the API.
- Updated import paths for various types to reflect new module
structures.

- **Chore**
- Updated environment configurations and test setups to support the new
logging and configuration mechanisms.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-11 15:03:01 -04:00
Michael Datelle
03be042410 test: create tests for stores (#1338)
This gets the original 3 component tests refactored to better follow the
Vue Testing Library philosophy and test behavior. This also adds a new
test file for the server store. Additional batches of tests will be
added in proceeding PR's.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**  
- Streamlined internal code organization and improved maintenance
through refined import structures and cleanup of redundant files.

- **Tests**  
- Expanded and restructured automated tests across core components,
including new test files for `Auth`, `DownloadApiLogs`, and `KeyActions`
to ensure robust behavior.
- Enhanced test configuration and mock implementations for a more
reliable, consistent testing environment.
- Introduced best practices for testing Vue components and Pinia stores.

These updates optimize performance and stability behind the scenes
without altering the end-user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mdatelle <mike@datelle.net>
2025-04-09 11:57:11 -04:00
Michael Datelle
0e008aaf1e test: setup initial test, config and testing libraries (#1309)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced comprehensive testing utilities for Vue components
utilizing the composition API.
- Enhanced testing coverage for the `DownloadApiLogs` and `KeyActions`
components, ensuring robust functionality and user interaction
validation.
- Added mock implementations for various libraries and components to
facilitate isolated unit testing.
- Improved flexibility in the `DummyServerSwitcher` component's input
handling.
- Added a new test setup file to configure the testing environment for
Vue applications.
- Added new test files for `AuthComponent` and `KeyActions` with
comprehensive test cases.
- Introduced a new mock implementation for UI components to streamline
testing.
- Added a new mock implementation for the `useRequest` composable to
prevent hanging issues during tests.
- Added a new mock implementation for the server store used by the Auth
component.

- **Bug Fixes**
- Improved sanitization process to block inline styles for a safer and
more consistent display.

- **Documentation**
- Added README documentation for Vue Component Testing Utilities,
detailing usage and examples.
  - Updated ESLint configuration to ignore coverage directory files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mdatelle <mike@datelle.net>
Co-authored-by: Eli Bosley <ekbosley@gmail.com>
2025-04-03 15:50:49 -04:00
Pujit Mehrotra
61ee689658 feat(ui): webgui-compatible web component library (#1075)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eli Bosley <ekbosley@gmail.com>

- **CI/CD**
	- Updated GitHub Actions workflow to build Unraid UI Web Components.
	- Adjusted artifact naming and download configurations.

- **Web Components**
	- Added new web components and registration mechanism.
	- Implemented toast notifications.
	- Enhanced UI component library.

- **Notifications**
	- Added real-time notification subscription.
	- Created notification settings page.
	- Implemented notification toast system.

- **API Improvements**
	- Refactored GraphQL schema loading.
	- Updated authentication and cookie handling.
	- Improved error logging and server initialization.

- **Development Tools**
	- Updated ESLint configuration.
	- Enhanced import path management.
	- Added new development dependencies.
2025-01-31 10:47:03 -05:00
Eli Bosley
e88593620b feat: automatic session setup for dev 2025-01-30 14:37:33 -05:00
Eli Bosley
895d5857f9 feat: remove apiKey from server 2025-01-27 13:34:32 -05:00
Pujit Mehrotra
f0f5a3057a feat: add csrf support to api & web components (#999) 2025-01-08 14:22:06 -05:00
Pujit Mehrotra
4404208deb chore(web): mock user session cookie during development (#997)
* chore(web): mock user session cookie during development

* refactor(scripts): change default mock session name to mock-user-session

* tmp: log cookies in production

* refactor(api): add dev fixture for a mock user session

* fix(web): only mock session cookie during development

* fix(web): type coercion of MOCK_USER_SESSION env flag
2025-01-08 14:15:46 -05:00
Pujit Mehrotra
7dcf947527 feat(web): open official release notes via header os version 2025-01-07 09:59:36 -08:00
Pujit Mehrotra
4ee42a6cf6 fix(web): escaping html-encoded symbols like apostrophes in translations (#1002)
e.g. end user would see `&apos;` from translations
2025-01-06 14:59:36 -05:00
Pujit Mehrotra
4a29fc9dda fix(web): display error message in sidebar when api is offline (#984)
* fix(web): display error message in sidebar when api is offline

* refactor(web): move offline error derivation to UnraidApiStore

* feat(web): display error in upc when api is offline
2024-12-17 10:25:05 -05:00
Pujit Mehrotra
a09f7c935d refactor(api): delete only archived notifications in deleteAll (#983)
* refactor(api): delete only archived notifications in deleteAll

* refactor: rename deleteAllNotifications mutation to deleteArchivedNotifications

* fix: update mutation name for deleting archived notifications

* chore(web): update codegen dependencies to fix codegen issues

* chore(web): update vue-tsc to fix build typechecking
2024-12-13 14:50:33 -05:00
Pujit Mehrotra
29d9371cc3 fix(web): update unread total immediately upon archiving (#982) 2024-12-13 12:28:56 -05:00
Pujit Mehrotra
dab6985297 refactor(web): evict notification list on archival instead of manually modifying cache 2024-12-11 16:32:05 -05:00
Pujit Mehrotra
e40a9ebecd fix(web): edge case where archived notifications don't appear
if the archive has already been fetched/loaded.
2024-12-11 16:32:05 -05:00
Pujit Mehrotra
23b1f1ac73 fix(web): refetch notifications for sidebar when new notifications arrive 2024-12-10 13:01:35 -05:00
Pujit Mehrotra
acccb3694c chore(web): add testing step to github actions 2024-11-19 13:21:41 -05:00
Pujit Mehrotra
2724485989 test(web): Markdown sanitization & extensibility
fix(web): replaces dompurify with isomorphic-dompurify to enable server-side usage with same syntax
2024-11-19 13:21:41 -05:00
Pujit Mehrotra
2f4ff21986 feat(web): use Markdown helper class to interact with markdown 2024-11-19 13:21:41 -05:00
Pujit Mehrotra
abcaa5aedb feat(web): support markdown in notification messages 2024-11-19 13:21:41 -05:00
Pujit Mehrotra
89eb841b20 feat(web): add delete all notifications button to archive view in notifications sidebar 2024-11-18 14:44:20 -05:00
Pujit Mehrotra
696b55de6c refactor(web): use optional chaining for graphql errors
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-11-14 15:24:20 -05:00
Pujit Mehrotra
da5d1132d1 chore(web): remove noisy console log in apollo disable link 2024-11-14 15:24:20 -05:00
Eli Bosley
27bb375460 feat: vite 2024-11-05 16:11:21 -05:00
Eli Bosley
58665a4e98 fix: trigger loading correctly 2024-11-05 16:11:21 -05:00
Eli Bosley
885d1537b6 feat: fix issues with permissions and invalid modules 2024-11-05 16:11:21 -05:00
Eli Bosley
6ca9f421eb fix: apollo client lint issues 2024-11-05 16:11:21 -05:00
Eli Bosley
545ccf1938 feat: working 2024-11-05 16:11:21 -05:00
Pujit Mehrotra
9d3397a687 refactor(web): reduce magic in identifying apollo cache item 2024-11-05 09:27:43 -05:00
Pujit Mehrotra
e388b37aa6 refactor(web): simplify naming of notification mutations 2024-11-05 09:27:43 -05:00
Pujit Mehrotra
1da882b807 refactor(web): extract notification object cache prefix to a constant 2024-11-05 09:27:43 -05:00
Pujit Mehrotra
d9d5a24b70 feat(web): delete notifications from archive view 2024-11-05 09:27:43 -05:00
Pujit Mehrotra
ddb8bf8a5c refactor(web): improve signature & readability of mergeAndDedup cache function 2024-10-28 10:00:23 -04:00
Pujit Mehrotra
6234d61ae5 fix(web): dedupe incoming notifications during cache merge 2024-10-28 10:00:23 -04:00
Pujit Mehrotra
7ca3efe8b8 doc(web): possibly ambiguous css & confusing cache policies/types 2024-10-28 10:00:23 -04:00
Pujit Mehrotra
7e4022518d feat(web): reconcile pagination with notifications apollo cache 2024-10-28 10:00:23 -04:00
Pujit Mehrotra
ebd671e7b6 refactor(web): move archiveAll cache invalidation into apollo client config 2024-10-23 16:19:33 -04:00
Pujit Mehrotra
adabe92f72 refactor(web): move cn utility inside shadcn for modularization 2024-10-18 11:42:38 -04:00
Pujit Mehrotra
6cac078e15 refactor(web): instantiate apollo client statically instead of dynamically 2024-10-18 11:42:38 -04:00
Zack Spear
e84c3ebe14 feat: WIP notifications w/ shadcn
Currently the build doesn't work in webgui
2024-10-18 11:42:38 -04:00
Eli Bosley
ba77ff4a4c feat: remove console log disabler 2024-10-09 13:49:57 -04:00
Zack Spear
9ea2327fa0 refactor: registration transfer check ineligible copy 2024-08-13 10:31:50 -07:00
Zack Spear
ff67b54a1b refactor: doc urls use /go links 2024-08-13 10:31:31 -07:00
Zack Spear
9ae45d1258 fix(web): discord url 2024-04-30 17:34:46 -07:00
Zack Spear
a57f1d890d fix: changlog relative links and external links 2024-01-31 11:02:37 -08:00
Zack Spear
6e11ca209b refactor: clean up URLs 2023-12-19 16:25:26 -08:00
Zack Spear
ebebf76933 refactor: clean up URLs 2023-12-19 16:25:26 -08:00
Zack Spear
0e0a652dff refactor(web): improved header reboot pill link 2023-11-08 15:06:31 -08:00
Zack Spear
2bd460effb fix(web): preview and test releases usage 2023-11-06 14:48:38 -08:00
Zack Spear
84c96371f5 chore: lint and type check fixes 2023-11-06 13:53:29 -08:00