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.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210572375587668
This commit is contained in:
Pujit Mehrotra
2025-06-19 08:46:18 -04:00
committed by GitHub
parent 0788756b91
commit 70c790ff89
6 changed files with 37 additions and 27 deletions
@@ -146,7 +146,7 @@ export class ApiSettings {
elements: [ elements: [
createLabeledControl({ createLabeledControl({
scope: '#/properties/api/properties/ssoSubIds', 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 <a href="https://account.unraid.net/settings" target="_blank" rel="noopener noreferrer">account.unraid.net/settings</a>. Requires restart if adding first user.`, description: `Provide a list of Unique Unraid Account IDs. Find yours at <a href="https://account.unraid.net/settings" target="_blank" rel="noopener noreferrer">account.unraid.net/settings</a>. Requires restart if adding first user.`,
controlOptions: { controlOptions: {
inputType: 'text', inputType: 'text',
@@ -293,6 +293,13 @@ export class ConnectSettingsService {
/** shown when preconditions are not met */ /** shown when preconditions are not met */
const requirements: UIElement[] = [ const requirements: UIElement[] = [
{
type: 'UnraidSettingsLayout',
elements: [
{
type: 'Label',
text: 'Allow Remote Access:',
},
{ {
type: 'Label', type: 'Label',
text: 'Allow Remote Access', text: 'Allow Remote Access',
@@ -311,6 +318,8 @@ export class ConnectSettingsService {
], ],
}, },
}, },
],
},
]; ];
/** shown when preconditions are met */ /** shown when preconditions are met */
+1 -1
View File
@@ -70,7 +70,7 @@ const descriptionClass = computed(() => {
<template> <template>
<!-- Use the computed isVisible based on renderer.value.visible --> <!-- Use the computed isVisible based on renderer.value.visible -->
<div class="flex flex-col gap-2 max-w-lg flex-shrink-0"> <div class="flex flex-col gap-2 flex-shrink-0">
<!-- Replace native label with the Label component --> <!-- Replace native label with the Label component -->
<Label v-if="labelText" :class="labelClass">{{ labelText }}</Label> <Label v-if="labelText" :class="labelClass">{{ labelText }}</Label>
<!-- Use v-html with the parsedDescription ref --> <!-- Use v-html with the parsedDescription ref -->
@@ -28,6 +28,7 @@ const description = computed(() => props.uischema.options?.description);
<template> <template>
<!-- Render each precondition as a list item with an icon bullet --> <!-- Render each precondition as a list item with an icon bullet -->
<div>
<p v-if="description" class="mb-2">{{ description }}</p> <p v-if="description" class="mb-2">{{ description }}</p>
<ul class="list-none space-y-1"> <ul class="list-none space-y-1">
<li v-for="(item, index) in items" :key="index" class="flex items-center"> <li v-for="(item, index) in items" :key="index" class="flex items-center">
@@ -36,4 +37,5 @@ const description = computed(() => props.uischema.options?.description);
<span>{{ item.text }}</span> <span>{{ item.text }}</span>
</li> </li>
</ul> </ul>
</div>
</template> </template>
-1
View File
@@ -41,7 +41,6 @@ const placeholder = computed(() => control.value.uischema?.options?.placeholder
<template> <template>
<div class="space-y-4"> <div class="space-y-4">
<p v-if="control.description" v-html="control.description" />
<div v-for="(item, index) in items" :key="index" class="flex gap-2"> <div v-for="(item, index) in items" :key="index" class="flex gap-2">
<Input <Input
:type="inputType" :type="inputType"
+1 -1
View File
@@ -92,7 +92,7 @@ export const jsonFormsRenderers: JsonFormsRendererRegistryEntry[] = [
}, },
{ {
renderer: markRaw(withErrorWrapper(StringArrayField)), renderer: markRaw(withErrorWrapper(StringArrayField)),
tester: rankWith(4, and(isControl, schemaMatches(isStringArray))), tester: rankWith(4, and(isControl, schemaMatches(isStringArray), optionIs('format', 'array'))),
}, },
// Labels // Labels
{ {