Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://account.unraid.net/settings" target="_blank" rel="noopener noreferrer">account.unraid.net/settings</a>. Requires restart if adding first user.`,
controlOptions: {
inputType: 'text',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
text: 'You have provisioned a valid SSL certificate',
status: isSSLCertProvisioned,
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,
},
],
},
],
},
},
],
},
];

Expand Down
2 changes: 1 addition & 1 deletion unraid-ui/src/forms/LabelRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const descriptionClass = computed(() => {

<template>
<!-- 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">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elibosley would this break assumptions in ui's you've been building?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not

<!-- Replace native label with the Label component -->
<Label v-if="labelText" :class="labelClass">{{ labelText }}</Label>
<!-- Use v-html with the parsedDescription ref -->
Expand Down
18 changes: 10 additions & 8 deletions unraid-ui/src/forms/PreconditionsLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ const description = computed(() => props.uischema.options?.description);

<template>
<!-- Render each precondition as a list item with an icon bullet -->
<p v-if="description" class="mb-2">{{ description }}</p>
<ul class="list-none space-y-1">
<li v-for="(item, index) in items" :key="index" class="flex items-center">
<span v-if="item.status" class="text-green-500 mr-2 font-bold">✓</span>
<span v-else class="text-red-500 mr-2 font-extrabold">✕</span>
<span>{{ item.text }}</span>
</li>
</ul>
<div>
<p v-if="description" class="mb-2">{{ description }}</p>
<ul class="list-none space-y-1">
<li v-for="(item, index) in items" :key="index" class="flex items-center">
<span v-if="item.status" class="text-green-500 mr-2 font-bold">✓</span>
<span v-else class="text-red-500 mr-2 font-extrabold">✕</span>
<span>{{ item.text }}</span>
</li>
</ul>
</div>
</template>
1 change: 0 additions & 1 deletion unraid-ui/src/forms/StringArrayField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const placeholder = computed(() => control.value.uischema?.options?.placeholder

<template>
<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">
<Input
:type="inputType"
Expand Down
2 changes: 1 addition & 1 deletion unraid-ui/src/forms/renderers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const jsonFormsRenderers: JsonFormsRendererRegistryEntry[] = [
},
{
renderer: markRaw(withErrorWrapper(StringArrayField)),
tester: rankWith(4, and(isControl, schemaMatches(isStringArray))),
tester: rankWith(4, and(isControl, schemaMatches(isStringArray), optionIs('format', 'array'))),
},
// Labels
{
Expand Down
Loading