From 70c790ff89075a785d7f0623bbf3c34a3806bbdc Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Thu, 19 Jun 2025 08:46:18 -0400 Subject: [PATCH] fix: alignment of settings on ManagementAccess settings page (#1421) ## Summary by CodeRabbit - **Refactor** - Removed description text display from a form field for a cleaner interface. - Enhanced form field matching to better target specific string array inputs. - Updated remote access settings UI for clearer layout and separation of title and details. - Adjusted label container styling to allow more flexible width. - Improved grouping of precondition information for better visual structure. - Added a colon to the SSO users settings label for consistency. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210572375587668 --- .../resolvers/settings/settings.service.ts | 2 +- .../src/service/connect-settings.service.ts | 39 ++++++++++++------- unraid-ui/src/forms/LabelRenderer.vue | 2 +- unraid-ui/src/forms/PreconditionsLabel.vue | 18 +++++---- unraid-ui/src/forms/StringArrayField.vue | 1 - unraid-ui/src/forms/renderers.ts | 2 +- 6 files changed, 37 insertions(+), 27 deletions(-) diff --git a/api/src/unraid-api/graph/resolvers/settings/settings.service.ts b/api/src/unraid-api/graph/resolvers/settings/settings.service.ts index 457803194..7b5365aff 100644 --- a/api/src/unraid-api/graph/resolvers/settings/settings.service.ts +++ b/api/src/unraid-api/graph/resolvers/settings/settings.service.ts @@ -146,7 +146,7 @@ export class ApiSettings { elements: [ createLabeledControl({ scope: '#/properties/api/properties/ssoSubIds', - label: 'Unraid Connect SSO Users', + label: 'Unraid Connect SSO Users:', description: `Provide a list of Unique Unraid Account IDs. Find yours at account.unraid.net/settings. Requires restart if adding first user.`, controlOptions: { inputType: 'text', diff --git a/packages/unraid-api-plugin-connect/src/service/connect-settings.service.ts b/packages/unraid-api-plugin-connect/src/service/connect-settings.service.ts index 421f2a2f9..a9ccf90fd 100644 --- a/packages/unraid-api-plugin-connect/src/service/connect-settings.service.ts +++ b/packages/unraid-api-plugin-connect/src/service/connect-settings.service.ts @@ -294,22 +294,31 @@ export class ConnectSettingsService { /** shown when preconditions are not met */ const requirements: UIElement[] = [ { - type: 'Label', - text: 'Allow Remote Access', - options: { - format: 'preconditions', - description: 'Remote Access is disabled. To enable, please make sure:', - items: [ - { - text: 'You are signed in to Unraid Connect', - status: isSignedIn, + type: 'UnraidSettingsLayout', + elements: [ + { + type: 'Label', + text: 'Allow Remote Access:', + }, + { + type: 'Label', + text: 'Allow Remote Access', + options: { + format: 'preconditions', + description: 'Remote Access is disabled. To enable, please make sure:', + items: [ + { + text: 'You are signed in to Unraid Connect', + status: isSignedIn, + }, + { + text: 'You have provisioned a valid SSL certificate', + status: isSSLCertProvisioned, + }, + ], }, - { - text: 'You have provisioned a valid SSL certificate', - status: isSSLCertProvisioned, - }, - ], - }, + }, + ], }, ]; diff --git a/unraid-ui/src/forms/LabelRenderer.vue b/unraid-ui/src/forms/LabelRenderer.vue index af367ce80..be6b3009a 100644 --- a/unraid-ui/src/forms/LabelRenderer.vue +++ b/unraid-ui/src/forms/LabelRenderer.vue @@ -70,7 +70,7 @@ const descriptionClass = computed(() => {