feat: connect settings web component (#1211)

Replaces the Connect Settings form at Settings > Management Access with a webcomponent containing a generated form.

CodeRabbit:

- **New Features**
- Enhanced connection settings with an updated UI, including a new
custom element `<unraid-connect-settings>`.
- Introduced several new form components (e.g., `NumberField`,
`StringArrayField`, `Select`, `Switch`, `PreconditionsLabel`,
`ControlLayout`, and `VerticalLayout`) for a more dynamic experience.
- Added a notification system with the `Toaster` component for user
feedback.
- New GraphQL operations for managing connection settings and API
updates.
- **Chores**
- Upgraded multiple backend and frontend dependencies and refined
configuration files.
- **Tests**
- Expanded test coverage for CSV conversion, form settings merging, and
the new `csvStringToArray` function.
- **Documentation**
- Added introductory documentation for form components and a readme for
the forms directory.
This commit is contained in:
Pujit Mehrotra
2025-03-17 10:26:07 -04:00
committed by GitHub
parent ce61fee41c
commit acbf46df3f
61 changed files with 2531 additions and 574 deletions

View File

@@ -11,7 +11,7 @@ fi
server_name="$1"
# Source directory path
source_directory=".nuxt/nuxt-custom-elements/dist/unraid-components"
source_directory=".nuxt/nuxt-custom-elements/dist/unraid-components/"
if [ ! -d "$source_directory" ]; then
echo "The web components directory does not exist."
@@ -19,7 +19,7 @@ if [ ! -d "$source_directory" ]; then
fi
# Replace the value inside the rsync command with the user's input
rsync_command="rsync -avz -e ssh $source_directory root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers"
rsync_command="rsync -avz -e ssh $source_directory root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt"
echo "Executing the following command:"
echo "$rsync_command"
@@ -34,7 +34,7 @@ update_auth_request() {
# SSH into server and update auth-request.php
ssh "root@${server_name}" "
AUTH_REQUEST_FILE='/usr/local/emhttp/auth-request.php'
WEB_COMPS_DIR='/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/_nuxt/'
WEB_COMPS_DIR='/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt/_nuxt/'
# Find JS files and modify paths
mapfile -t JS_FILES < <(find \"\$WEB_COMPS_DIR\" -type f -name \"*.js\" | sed 's|/usr/local/emhttp||' | sort -u)
@@ -54,7 +54,7 @@ update_auth_request() {
print \$0
next
}
!in_array || !/\/plugins\/dynamix\.my\.servers\/unraid-components\/_nuxt\/unraid-components\.client-/ {
!in_array || !/\/plugins\/dynamix\.my\.servers\/unraid-components\/nuxt\/_nuxt\/unraid-components\.client-/ {
print \$0
}
' \"\$AUTH_REQUEST_FILE\" > \"\${AUTH_REQUEST_FILE}.tmp\"