From 1dddaa9bcca470f57768c39e37822dda3c4e74ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Tue, 26 Jul 2022 00:01:52 +0000 Subject: [PATCH] Document autoclose --- README.md | 2 ++ custom_components/browser_mod/browser_mod.js | 1 + js/plugin/services.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 16a9a55..7846706 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ data: [left_button_action: ] [dismissable: ] [dismiss_action: ] + [autoclose: ] [timeout: ] [timeout_action: ] [style: ] @@ -272,6 +273,7 @@ If `size` is `wide` or `fullscreen` the card will be displayed wider or covering `right_button` and `left_button` specify the text of two action buttons. \ When either action button is clicked, the dialog is closed and the service specified as `right_button_action` or `left_button_action` is called. \ If `dismissable` is false, the dialog cannot be closed by the user without clicking either action button. If it is true and the dialog is dismissed, `dismiss_action` is called. \ +If `autoclose` is true the dialog will close automatically when the mouse, screen or keyboard is touched, at which point `dismiss_action` will be called. \ If `timeout` is specified the dialog will close automatically after `timeout` milliseconds, at which point `timeout_action` will be called. \ Finally, `style` lets you specify some CSS styles to apply to the dialog itself (to style a card in the dialog check out [card-mod](https://github.com/thomasloven/lovelace-card-mod)) diff --git a/custom_components/browser_mod/browser_mod.js b/custom_components/browser_mod/browser_mod.js index d6d9e59..7cdf4af 100644 --- a/custom_components/browser_mod/browser_mod.js +++ b/custom_components/browser_mod/browser_mod.js @@ -954,6 +954,7 @@ const ServicesMixin = (SuperClass) => { [left_button_action: ] [dismissable: ] [dismiss_action: ] + [autoclose: ] [timeout: ] [timeout_action: ] [style: ] diff --git a/js/plugin/services.ts b/js/plugin/services.ts index 8a46121..7bde390 100644 --- a/js/plugin/services.ts +++ b/js/plugin/services.ts @@ -30,6 +30,7 @@ export const ServicesMixin = (SuperClass) => { [left_button_action: ] [dismissable: ] [dismiss_action: ] + [autoclose: ] [timeout: ] [timeout_action: ] [style: ]