Skip to content

Commit 1383551

Browse files
committed
wrap remote access preconditions in UnraidSettingsLayout
1 parent 8fd7a94 commit 1383551

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

packages/unraid-api-plugin-connect/src/service/connect-settings.service.ts

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -294,22 +294,31 @@ export class ConnectSettingsService {
294294
/** shown when preconditions are not met */
295295
const requirements: UIElement[] = [
296296
{
297-
type: 'Label',
298-
text: 'Allow Remote Access',
299-
options: {
300-
format: 'preconditions',
301-
description: 'Remote Access is disabled. To enable, please make sure:',
302-
items: [
303-
{
304-
text: 'You are signed in to Unraid Connect',
305-
status: isSignedIn,
306-
},
307-
{
308-
text: 'You have provisioned a valid SSL certificate',
309-
status: isSSLCertProvisioned,
297+
type: 'UnraidSettingsLayout',
298+
elements: [
299+
{
300+
type: 'Label',
301+
text: 'Allow Remote Access',
302+
},
303+
{
304+
type: 'Label',
305+
text: 'Allow Remote Access',
306+
options: {
307+
format: 'preconditions',
308+
description: 'Remote Access is disabled. To enable, please make sure:',
309+
items: [
310+
{
311+
text: 'You are signed in to Unraid Connect',
312+
status: isSignedIn,
313+
},
314+
{
315+
text: 'You have provisioned a valid SSL certificate',
316+
status: isSSLCertProvisioned,
317+
},
318+
],
310319
},
311-
],
312-
},
320+
},
321+
],
313322
},
314323
];
315324

unraid-ui/src/forms/PreconditionsLabel.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ const description = computed(() => props.uischema.options?.description);
2828

2929
<template>
3030
<!-- Render each precondition as a list item with an icon bullet -->
31-
<p v-if="description" class="mb-2">{{ description }}</p>
32-
<ul class="list-none space-y-1">
33-
<li v-for="(item, index) in items" :key="index" class="flex items-center">
34-
<span v-if="item.status" class="text-green-500 mr-2 font-bold">✓</span>
35-
<span v-else class="text-red-500 mr-2 font-extrabold">✕</span>
36-
<span>{{ item.text }}</span>
37-
</li>
38-
</ul>
31+
<div>
32+
<p v-if="description" class="mb-2">{{ description }}</p>
33+
<ul class="list-none space-y-1">
34+
<li v-for="(item, index) in items" :key="index" class="flex items-center">
35+
<span v-if="item.status" class="text-green-500 mr-2 font-bold">✓</span>
36+
<span v-else class="text-red-500 mr-2 font-extrabold">✕</span>
37+
<span>{{ item.text }}</span>
38+
</li>
39+
</ul>
40+
</div>
3941
</template>

0 commit comments

Comments
 (0)