diff --git a/src/lib/components/rules/Rules.svelte b/src/lib/components/rules/Rules.svelte index d3192284..30c71464 100644 --- a/src/lib/components/rules/Rules.svelte +++ b/src/lib/components/rules/Rules.svelte @@ -121,27 +121,51 @@
- - + + +
+ +
+

{$_('rules.rule_criteria')}:

+ {#await dataItem} + loading data items + {:then dataItem} + {#if ruleGroup.cw_rule_criteria.length == 0} +

{$_('rules.no_rule_criteria')}

+ {:else} + {#each ruleGroup.cw_rule_criteria as singleRule, i} + + + + AND + {/each} + {/if} + {/await} + +
+ +
- +
-
- +
+
-
-

{$_('rules.rule_criteria')}:

- {#await dataItem} - loading data items - {:then dataItem} - {#if ruleGroup.cw_rule_criteria.length == 0} -

{$_('rules.no_rule_criteria')}

- {:else} - {#each ruleGroup.cw_rule_criteria as singleRule, i} - - - - {/each} - {/if} - {/await} -
-
- -
{isNew ? $_('rules.create') : 'Update'} diff --git a/src/lib/components/rules/SubRule.svelte b/src/lib/components/rules/SubRule.svelte index 06164b72..da6e714f 100644 --- a/src/lib/components/rules/SubRule.svelte +++ b/src/lib/components/rules/SubRule.svelte @@ -4,6 +4,7 @@ import { uuidv4 } from '$lib/utilities/uuidv4'; import { SelectField, TextField } from 'svelte-ux'; import type { Tables } from '../../../database.types'; + import { _ } from 'svelte-i18n'; // export const latestData; export let root: Tables<'cw_rule_criteria'>; @@ -19,23 +20,23 @@
- + { - return { label: key, value: key }; + return { label: $_(key), value: key }; })} />
- +
- - + +
- +
diff --git a/src/lib/components/ui/DevicePermission.svelte b/src/lib/components/ui/DevicePermission.svelte index d2482c49..e1842d16 100644 --- a/src/lib/components/ui/DevicePermission.svelte +++ b/src/lib/components/ui/DevicePermission.svelte @@ -4,6 +4,7 @@ import { mdiAccount, mdiPlus, mdiTrashCan } from '@mdi/js'; import { toast } from '@zerodevx/svelte-toast'; import { Button, ListItem, SelectField, TextField } from 'svelte-ux'; + import { _ } from 'svelte-i18n'; export let devEui; export let permissions; @@ -71,29 +72,29 @@ >
- - + +
- +
{$_('permissions.add_permission')} -

The following logins have access to this device:

+

{$_('permissions.following_have_access')}: