More-info service

This commit is contained in:
2022-07-20 00:57:51 +00:00
parent 30d8f027dc
commit 77554aa86c
7 changed files with 104 additions and 9 deletions

View File

@@ -32,6 +32,13 @@ export const ServicesMixin = (SuperClass) => {
[timeout: <number>]
[timeout_action: <service call>]
More-info:
service: browser_mod.more_info
data:
entity: <string>
[large: <true/FALSE>]
[ignore_popup_card: <true/FALSE>]
Close popup:
service: browser_mod.close_popup
@@ -60,6 +67,7 @@ export const ServicesMixin = (SuperClass) => {
"sequence",
"delay",
"popup",
"more_info",
"close_popup",
"navigate",
"refresh",
@@ -101,6 +109,11 @@ export const ServicesMixin = (SuperClass) => {
await new Promise((resolve) => setTimeout(resolve, data.time));
break;
case "more_info":
const { entity, large, ignore_popup_card } = data;
this.showMoreInfo(entity, large, ignore_popup_card);
break;
case "popup":
const { title, content, ...d } = data;
for (const [k, v] of Object.entries(d)) {