-
折线图表
+
+
折线图表
组件总览
接收单一数值数据或JSON格式的多个数值数据,显示为折线统计图。
@@ -325,8 +343,8 @@
消息主题 - 组件的消息主题。
-
-
投票器
+
+
投票器
组件总览
接收文本数据,增加对应选项的计数。
@@ -363,8 +381,8 @@
列名 - 用英文逗号分隔的表格列名列表。
-
-
数据地图
+
+
数据地图
组件总览
接收JSON格式的地图标记数据,并进行显示。
@@ -389,6 +407,125 @@
消息主题 - 组件的消息主题。
+
+
仪表盘
+
组件总览
+
+ 接收数值消息,进行仪表盘显示。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+ 指示范围 - 仪表盘的最小值和最大值。
+
+
+
+
+
组件总览
+
+ 查询天气信息,主动发送消息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+ 自动更新频率 - 自动更新天气信息的频率。
+
+
+ 自动发送频率 - 自动发送天气信息的频率。
+
+
+ 采集位置 - 天气信息的地理位置。
+
+
+
+
摄像头
+
组件总览
+
+ 拍摄实时画面,发送BASE64编码的画面截图。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+ 分辨率 - 拍摄画面的分辨率。
+
+
+ 帧率 - 每秒捕捉画面的次数。
+
+
+
+
+
组件总览
+
+ 点击录制语音,转文字发送。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+
+
下拉选项
+
组件总览
+
+ 设置下拉列表,快速选择发送消息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+ 选项列表 - 下拉列表的选项,使用逗号分隔。
+
+
+
+
+
组件总览
+
+ 输入文本,点击发送消息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
+
+
文本显示屏
+
组件总览
+
+ 接收并呈现消息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件的消息主题。
+
+
点阵屏
组件总览
@@ -416,6 +553,93 @@
垂直像素 - 点阵屏垂直像素的个数。
+
+
标签
+
组件总览
+
+ 呈现文本信息。
+
+
可配置项
+
+ 显示文本 - 呈现的文本信息。
+
+
+
+
图片 / 视频
+
组件总览
+
+ 接收外部链接或BASE64格式的字符串,呈现图片/视频。
+
+
可配置项
+
+ 图片链接 - 默认呈现的图片/视频链接或BASE64字符串。
+
+
+ 消息主题 - 接收消息、动态更新图片/视频的主题。
+
+
+
+
装饰框
+
组件总览
+
+ 将组件组合起来。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 颜色 - 框体颜色。
+
+
+
+
人脸识别
+
组件总览
+
+ 录入并识别人脸,输出人脸识别信息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件发送消息的主题。
+
+
+ 触发间隔 - 检测人脸的最短时间间隔。
+
+
+
+
蜂鸣器
+
组件总览
+
+ 收到消息时,发出提示音。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件接收消息的主题。
+
+
+ 提示音类型 - 收到消息时发出提示音的类型。
+
+
+
+
二维码识别
+
组件总览
+
+ 识别二维码/条形码,发送消息。
+
+
可配置项
+
+ 组件名称 - 组件的名称,用于在页面上显示,并作为逻辑视图控制的唯一id。
+
+
+ 消息主题 - 组件发送消息的主题。
+
+
diff --git a/js/widgets.js b/js/widgets.js
index 5c63653..8ab9ad4 100644
--- a/js/widgets.js
+++ b/js/widgets.js
@@ -169,7 +169,7 @@ function add_pixel(user_title, user_topic, user_content, user_style, title_style
if (tbd)
tbd.remove()
}
- attrs = [
+ var attrs = [
['user-type', 'pixel'],
['user-title', user_title],
['user-topic', user_topic],
@@ -476,7 +476,7 @@ function add_button(user_title, user_topic, user_content, user_style, title_styl
if (tbd)
tbd.remove()
}
- attrs = [
+ var attrs = [
['user-type', 'input_button'],
['user-title', user_title],
['user-topic', user_topic],
@@ -701,7 +701,7 @@ function add_slider(user_title, user_topic, user_content, user_style, title_styl
if (tbd)
tbd.remove()
}
- attrs = [
+ var attrs = [
['user-type', 'input_slider'],
['user-title', user_title],
['user-topic', user_topic],
@@ -881,7 +881,7 @@ function add_controller(user_title, user_topic, user_content, user_style, title_
contents.push(controllerDiv)
var controllerID = randomString() + 'con'
controllerDiv.attr('id', controllerID)
- attrs = [
+ var attrs = [
['user-type', 'input_controller'],
['user-title', user_title],
['user-content', "0,0"],
@@ -1061,7 +1061,7 @@ function add_keyboard(user_title, user_topic, user_content, user_style, title_st
var topic = $("
" + user_topic + "")
topicDiv.append($("
"))
topicDiv.append(topic)
- attrs = [
+ var attrs = [
['user-type', 'input_keyboard'],
['user-title', user_title],
['user-topic', user_topic],
@@ -1280,7 +1280,7 @@ function add_tinydb(user_title, user_topic, user_content, user_style, title_styl
var topic = $("
" + user_topic + "")
topicDiv.append($("
"))
topicDiv.append(topic)
- attrs = [
+ var attrs = [
['user-type', 'tinydb'],
['user-title', user_title],
['user-topic', user_topic],
@@ -1514,7 +1514,7 @@ function add_mic(user_title, user_topic, user_content, user_style, title_style)
var topic = $("
" + user_topic + "")
topicDiv.append($("
"))
topicDiv.append(topic)
- attrs = [
+ var attrs = [
['user-type', 'input_mic'],
['user-title', user_title],
['user-topic', user_topic],
@@ -1765,7 +1765,7 @@ function add_bulb(user_title, user_topic, user_content, user_style, title_style)
bulb.attr('class', 'bulb2')
else if (user_content == 3)
bulb.attr('class', 'bulb3')
- attrs = [
+ var attrs = [
['user-type', 'output_bulb'],
['user-title', user_title],
['user-topic', user_topic],
@@ -1966,7 +1966,7 @@ function add_ble(user_title, user_topic, user_content, user_style, title_style)
var topic = $("
" + user_topic + "")
topicDiv.append($("
"))
topicDiv.append(topic)
- attrs = [
+ var attrs = [
['user-type', 'ble'],
['user-title', user_title],
['user-topic', user_topic],
@@ -2289,7 +2289,7 @@ function add_magic(user_title, user_topic, user_content, user_style, title_style
var transparentDiv = $('
')
contents.push(title)
contents.push(transparentDiv)
- attrs = [
+ var attrs = [
['user-type', 'magic'],
['user-title', user_title],
['user-topic', user_topic],
@@ -2445,7 +2445,7 @@ async function add_timer(user_title, user_topic, user_content, user_style, title
topicDiv.append(topic)
var bulb = $("

")
contents.push(bulb)
- attrs = [
+ var attrs = [
['user-type', 'timer'],
['user-title', user_title],
['user-topic', user_topic],
@@ -2670,7 +2670,7 @@ async function add_trigger(user_title, user_topic, user_content, user_style, tit
topicDiv.append(topic)
var bulb = $("

")
contents.push(bulb)
- attrs = [
+ var attrs = [
['user-type', 'trigger'],
['user-title', user_title],
['user-topic', user_topic],
@@ -3050,7 +3050,7 @@ function add_rgb(user_title, user_topic, user_content, user_style, title_style)
pickerRGBDiv.append(pickerDiv)
pickerRGBDiv.append(RGBDiv)
contents.push(pickerRGBDiv)
- attrs = [
+ var attrs = [
['user-type', 'input_rgb'],
['user-title', user_title],
['user-topic', user_topic],
@@ -3381,7 +3381,7 @@ function add_bar(user_title, user_topic, user_content, user_style, title_style)
if (tbd)
tbd.remove()
}
- attrs = [
+ var attrs = [
['user-type', 'output_bar'],
['user-title', user_title],
['user-topic', user_topic],
@@ -3638,7 +3638,7 @@ function add_dashboard(user_title, user_topic, user_content, user_style, title_s
var dashID = randomString() + "dash"
dashCanvas.attr('id', dashID)
contents.push(dashDiv)
- attrs = [
+ var attrs = [
['user-type', 'output_dashboard'],
['user-title', user_title],
['user-topic', user_topic],
@@ -3843,7 +3843,7 @@ function add_map(user_title, user_topic, user_content, user_style, title_style)
event.stopPropagation()
}, { passive: false })
contents.push(mapDiv)
- attrs = [
+ var attrs = [
['user-type', 'output_map'],
['user-title', user_title],
['user-topic', user_topic],
@@ -4188,7 +4188,7 @@ function add_map(user_title, user_topic, user_content, user_style, title_style)
event.stopPropagation()
}, { passive: false })
contents.push(mapDiv)
- attrs = [
+ var attrs = [
['user-type', 'output_map'],
['user-title', user_title],
['user-topic', user_topic],
@@ -4525,7 +4525,7 @@ function add_text(user_title, user_topic, user_content, user_style, title_style)
textDiv.css('font-size', fontSize + 'rem')
textDiv.attr('class', 'mid_screen')
contents.push(textDiv)
- attrs = [
+ var attrs = [
['user-type', 'output_text'],
['user-title', user_title],
['user-topic', user_topic],
@@ -4772,7 +4772,7 @@ function add_table(user_title, user_topic, user_content, user_style, title_style
textDiv.text(stringendecoder.decodeHtml(user_content))
textDiv.attr('class', 'mid_screen')
//contents.push(textDiv)
- attrs = [
+ var attrs = [
['user-type', 'table'],
['user-title', user_title],
['user-topic', user_topic],
@@ -5155,7 +5155,7 @@ function add_weather(user_title, user_topic, user_content, user_style, title_sty
buttonDiv.append(sendIcon)
contents.push(buttonDiv)
- attrs = [
+ var attrs = [
['user-type', 'input_weather'],
['user-title', user_title],
['user-topic', user_topic],
@@ -5653,7 +5653,7 @@ function add_chart(user_title, user_topic, user_content, user_style, title_style
if (tbd)
tbd.remove()
}
- attrs = [
+ var attrs = [
['user-type', 'output_chart'],
['user-title', user_title],
['user-topic', user_topic],
@@ -5853,7 +5853,7 @@ function add_decorate_text(user_title, user_topic, user_content, user_style, tit
var contents = []
var ctt = $("
" + user_content.replaceAll('\n', '
') + "
")
contents.push(ctt)
- attrs = [
+ var attrs = [
['user-type', 'decorate_text'],
['user-title', randomString()],
['user-content', user_content],
@@ -5986,7 +5986,7 @@ function add_decorate_pic(user_title, user_topic, user_content, user_style, titl
var ctt = $("

")
}
contents.push(ctt)
- attrs = [
+ var attrs = [
['user-type', 'decorate_pic'],
['user-topic', user_topic],
['user-title', randomString()],
@@ -6216,7 +6216,7 @@ function add_camera(user_title, user_topic, user_content, user_style, title_styl
var fps = parseInt(user_content.split(",")[1])
var resolutionX = parseInt(resolution.split("x")[0])
var resolutionY = parseInt(resolution.split("x")[1])
- attrs = [
+ var attrs = [
['user-type', 'camera'],
['user-title', user_title],
['user-topic', user_topic],
@@ -6676,7 +6676,7 @@ function add_face(user_title, user_topic, user_content, user_style, title_style)
})
- attrs = [
+ var attrs = [
['user-type', 'face'],
['user-title', user_title],
['user-topic', user_topic],
@@ -6966,7 +6966,7 @@ function add_ocr(user_title, user_topic, user_content, user_style, title_style)
var bell_icon = $('
')
icon_div.append(bell_icon)
contents.push(icon_div)
- attrs = [
+ var attrs = [
['user-type', 'ocr'],
['user-title', user_title],
['user-topic', user_topic],
@@ -7220,7 +7220,7 @@ function add_qr(user_title, user_topic, user_content, user_style, title_style) {
})
- attrs = [
+ var attrs = [
['user-type', 'qr'],
['user-title', user_title],
['user-topic', user_topic],
@@ -7455,7 +7455,7 @@ var helpButton = $('
')
helpWindow.css("width", "300px")