- {target.type === 'webhook'
- ? target.config.url_masked
- : target.config.destination_chat_id}
-
+ {@const targetDestination =
+ target.type === 'webhook' ? target.config.url_masked : target.config.destination_chat_id}
+ {@const alertLabels = eventOptions
+ .filter((event) => target.events.includes(event.event))
+ .map((event) => event.label)
+ .join(', ')}
+
+
+
+
+ {target.id}
+
+
+ {target.type === 'webhook' ? $t('general.webhook') : $t('general.bot')}
+
+
+ {targetDestination}
+
+
+ {alertLabels || $t('general.noChatAlerts')}
+ {#if target.events.length}
+ ยท {target.delivery === 'away' ? $t('general.onlyWhenAway') : $t('general.always')}
+ {/if}
+
+
+
+
+
+
+
+
+
+
patchTarget(target, { enabled: v })}
/>
-
-
-
- {$t('general.automaticEvents')}
-
- {#if target.events.length}
-
- {#each eventOptions.filter((event) => target.events.includes(event.event)) as event}
-
- {/each}
-
- {:else}
-
- {$t('general.noChatAlerts')}
-
- {/if}
-
-
-
- {#if target.events.length}
-
-
- {$t('general.automaticDelivery')}
-
-
- {#each ['away', 'always'] as mode}
-
- {/each}
-
-
- {:else}
-
- {/if}
-
-
-
-
-
-