39 files
This commit is contained in:
@@ -866,6 +866,9 @@
|
||||
"panel.notif_section_recipients": "Empfänger",
|
||||
"panel.notif_section_recipients_desc": "Weise jedem Kind und Elternteil einen Home Assistant Benachrichtigungsdienst zu. Leer lassen, um Benachrichtigungen für diese Person zu überspringen.",
|
||||
"panel.notif_streak_cutoff_label": "Frist",
|
||||
"panel.notif_nav_url_global_label": "Beim Tippen öffnen",
|
||||
"panel.notif_nav_url_global_hint": "Wohin eine angetippte Benachrichtigung führt: ein Pfad wie /taskmate oder /lovelace/parents, eine vollständige URL oder noAction. Gilt für alle Benachrichtigungen, sofern unten nicht pro Typ überschrieben.",
|
||||
"panel.notif_nav_url_row_placeholder": "Nutzt globalen Standard",
|
||||
"panel.notif_tab_title": "Benachrichtigungen",
|
||||
"panel.template_assignment_mode_label": "Zuweisungsmodus",
|
||||
"panel.template_builtin": "Integriert",
|
||||
|
||||
@@ -916,6 +916,9 @@
|
||||
"panel.notif_section_recipients": "Recipients",
|
||||
"panel.notif_section_recipients_desc": "Map each child and parent to a Home Assistant notify service. Leave blank to skip notifications for that person.",
|
||||
"panel.notif_streak_cutoff_label": "Cutoff",
|
||||
"panel.notif_nav_url_global_label": "When tapped, open",
|
||||
"panel.notif_nav_url_global_hint": "Where a tapped notification opens: a path like /taskmate or /lovelace/parents, a full URL, or noAction. Applies to all notifications unless overridden per type below.",
|
||||
"panel.notif_nav_url_row_placeholder": "Uses global default",
|
||||
"panel.notif_send_test": "Send test",
|
||||
"panel.notif_test_sent": "Test sent to {count} recipient(s) + persistent notification",
|
||||
"panel.notif_tab_title": "Notifications",
|
||||
|
||||
@@ -916,6 +916,9 @@
|
||||
"panel.notif_section_recipients": "Recipients",
|
||||
"panel.notif_section_recipients_desc": "Map each child and parent to a Home Assistant notify service. Leave blank to skip notifications for that person.",
|
||||
"panel.notif_streak_cutoff_label": "Cutoff",
|
||||
"panel.notif_nav_url_global_label": "When tapped, open",
|
||||
"panel.notif_nav_url_global_hint": "Where a tapped notification opens: a path like /taskmate or /lovelace/parents, a full URL, or noAction. Applies to all notifications unless overridden per type below.",
|
||||
"panel.notif_nav_url_row_placeholder": "Uses global default",
|
||||
"panel.notif_send_test": "Send test",
|
||||
"panel.notif_test_sent": "Test sent to {count} recipient(s) + persistent notification",
|
||||
"panel.notif_tab_title": "Notifications",
|
||||
|
||||
@@ -866,6 +866,9 @@
|
||||
"panel.notif_section_recipients": "Destinataires",
|
||||
"panel.notif_section_recipients_desc": "Associez chaque enfant et parent à un service de notification Home Assistant. Laisser vide pour ignorer les notifications pour cette personne.",
|
||||
"panel.notif_streak_cutoff_label": "Limite",
|
||||
"panel.notif_nav_url_global_label": "Au toucher, ouvrir",
|
||||
"panel.notif_nav_url_global_hint": "Où mène une notification touchée : un chemin comme /taskmate ou /lovelace/parents, une URL complète ou noAction. S'applique à toutes les notifications sauf remplacement par type ci-dessous.",
|
||||
"panel.notif_nav_url_row_placeholder": "Utilise la valeur globale",
|
||||
"panel.notif_tab_title": "Notifications",
|
||||
"panel.template_assignment_mode_label": "Mode d'assignation",
|
||||
"panel.template_builtin": "Intégré",
|
||||
|
||||
@@ -866,6 +866,9 @@
|
||||
"panel.notif_section_recipients": "Mottakere",
|
||||
"panel.notif_section_recipients_desc": "Koble hvert barn og foresatt til en Home Assistant-varslingstjeneste. La stå tomt for å hoppe over varsler for den personen.",
|
||||
"panel.notif_streak_cutoff_label": "Grense",
|
||||
"panel.notif_nav_url_global_label": "Ved trykk, åpne",
|
||||
"panel.notif_nav_url_global_hint": "Hvor et trykk på et varsel åpner: en sti som /taskmate eller /lovelace/parents, en full URL, eller noAction. Gjelder alle varsler med mindre det overstyres per type nedenfor.",
|
||||
"panel.notif_nav_url_row_placeholder": "Bruker global standard",
|
||||
"panel.notif_tab_title": "Varsler",
|
||||
"panel.template_assignment_mode_label": "Tildelingsmodus",
|
||||
"panel.template_builtin": "Innebygd",
|
||||
|
||||
@@ -866,6 +866,9 @@
|
||||
"panel.notif_section_recipients": "Mottakarar",
|
||||
"panel.notif_section_recipients_desc": "Kople kvart born og kvar føresett til ein Home Assistant-varslingsteneste. La stå tomt for å hoppa over varsel for den personen.",
|
||||
"panel.notif_streak_cutoff_label": "Grense",
|
||||
"panel.notif_nav_url_global_label": "Ved trykk, opne",
|
||||
"panel.notif_nav_url_global_hint": "Kvar eit trykk på eit varsel opnar: ein sti som /taskmate eller /lovelace/parents, ein full URL, eller noAction. Gjeld alle varsel med mindre det vert overstyrt per type nedanfor.",
|
||||
"panel.notif_nav_url_row_placeholder": "Brukar global standard",
|
||||
"panel.notif_tab_title": "Varsel",
|
||||
"panel.template_assignment_mode_label": "Tildelingsmodus",
|
||||
"panel.template_builtin": "Innebygd",
|
||||
|
||||
@@ -866,6 +866,9 @@
|
||||
"panel.notif_section_recipients": "Destinatários",
|
||||
"panel.notif_section_recipients_desc": "Associe cada criança e responsável a um serviço de notificação do Home Assistant. Deixe em branco para pular notificações para essa pessoa.",
|
||||
"panel.notif_streak_cutoff_label": "Limite",
|
||||
"panel.notif_nav_url_global_label": "Ao tocar, abrir",
|
||||
"panel.notif_nav_url_global_hint": "Para onde uma notificação tocada abre: um caminho como /taskmate ou /lovelace/parents, uma URL completa ou noAction. Aplica-se a todas as notificações, exceto se substituída por tipo abaixo.",
|
||||
"panel.notif_nav_url_row_placeholder": "Usa o padrão global",
|
||||
"panel.notif_tab_title": "Notificações",
|
||||
"panel.template_assignment_mode_label": "Modo de atribuição",
|
||||
"panel.template_builtin": "Integrado",
|
||||
|
||||
@@ -871,6 +871,9 @@
|
||||
"panel.notif_section_recipients": "Destinatários",
|
||||
"panel.notif_section_recipients_desc": "Associe cada criança e encarregado a um serviço de notificação do Home Assistant. Deixe em branco para ignorar notificações para essa pessoa.",
|
||||
"panel.notif_streak_cutoff_label": "Limite",
|
||||
"panel.notif_nav_url_global_label": "Ao tocar, abrir",
|
||||
"panel.notif_nav_url_global_hint": "Para onde uma notificação tocada abre: um caminho como /taskmate ou /lovelace/parents, um URL completo ou noAction. Aplica-se a todas as notificações, salvo substituição por tipo abaixo.",
|
||||
"panel.notif_nav_url_row_placeholder": "Usa o padrão global",
|
||||
"panel.notif_tab_title": "Notificações",
|
||||
"panel.template_assignment_mode_label": "Modo de atribuição",
|
||||
"panel.template_builtin": "Incorporado",
|
||||
|
||||
@@ -676,6 +676,8 @@ class TaskMatePanel extends HTMLElement {
|
||||
if (act === "notif-set-parent-notify"){ /* handled in _onChange */ return; }
|
||||
if (act === "notif-rename-parent") { /* handled in _onChange */ return; }
|
||||
if (act === "notif-set-streak-cutoff"){ /* handled in _onChange */ return; }
|
||||
if (act === "notif-set-nav-url-global"){ /* handled in _onChange */ return; }
|
||||
if (act === "notif-set-nav-url-type") { /* handled in _onChange */ return; }
|
||||
if (act === "notif-add-parent") { this._notifAddParent(); return; }
|
||||
if (act === "notif-delete-parent") { this._notifDeleteParent(t.dataset.parentId); return; }
|
||||
if (act === "notif-add-custom") { this._notifAddCustom(); return; }
|
||||
@@ -915,6 +917,14 @@ class TaskMatePanel extends HTMLElement {
|
||||
this._notifSetStreakCutoff(t.value);
|
||||
return;
|
||||
}
|
||||
if (t.dataset.act === "notif-set-nav-url-global") {
|
||||
this._notifSetNavUrl(null, t.value);
|
||||
return;
|
||||
}
|
||||
if (t.dataset.act === "notif-set-nav-url-type") {
|
||||
this._notifSetNavUrl(t.dataset.typeId, t.value);
|
||||
return;
|
||||
}
|
||||
if (t.dataset.act === "notif-set-escalation") {
|
||||
this._notifSetEscalation(t.dataset.escField, t.value);
|
||||
return;
|
||||
@@ -2100,6 +2110,13 @@ class TaskMatePanel extends HTMLElement {
|
||||
await this._fetchState();
|
||||
}
|
||||
|
||||
async _notifSetNavUrl(typeId, navUrl) {
|
||||
const payload = { type: "taskmate/notifications/set_nav_url", nav_url: navUrl || "" };
|
||||
if (typeId) payload.type_id = typeId;
|
||||
await this._callWS(payload);
|
||||
await this._fetchState();
|
||||
}
|
||||
|
||||
async _notifSetEscalation(field, value) {
|
||||
const s = (this._notifState && this._notifState.settings) || {};
|
||||
const cur = {
|
||||
@@ -4578,6 +4595,13 @@ class TaskMatePanel extends HTMLElement {
|
||||
<div class="tm-card" style="margin-bottom:16px">
|
||||
<h3>${this._t("panel.notif_section_matrix")}</h3>
|
||||
<p class="tm-meta">${this._t("panel.notif_section_matrix_desc")}</p>
|
||||
<div class="tm-meta" style="margin:4px 0 12px;display:flex;flex-wrap:wrap;align-items:center;gap:8px">
|
||||
<label style="font-weight:500">${this._t("panel.notif_nav_url_global_label")}</label>
|
||||
<input type="text" class="tm-input" style="flex:1;min-width:180px"
|
||||
value="${this._esc((ns.settings && ns.settings.notification_nav_url) || "")}"
|
||||
data-act="notif-set-nav-url-global" placeholder="/taskmate">
|
||||
<div class="tm-meta" style="flex-basis:100%">${this._t("panel.notif_nav_url_global_hint")}</div>
|
||||
</div>
|
||||
<div class="tm-table-wrap">
|
||||
<table class="tm-table">
|
||||
<thead>
|
||||
@@ -4630,6 +4654,12 @@ class TaskMatePanel extends HTMLElement {
|
||||
<ha-icon icon="mdi:send" style="--mdc-icon-size:14px"></ha-icon> ${this._t("panel.notif_send_test")}
|
||||
</button>
|
||||
</div>
|
||||
<div style="margin-top:6px;display:flex;align-items:center;gap:8px">
|
||||
<input type="text" class="tm-notif-time-input" style="width:150px"
|
||||
value="${this._esc(c.nav_url || "")}"
|
||||
data-act="notif-set-nav-url-type" data-type-id="${this._esc(t.id)}"
|
||||
placeholder="${this._t("panel.notif_nav_url_row_placeholder")}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user