-
Notifications
You must be signed in to change notification settings - Fork 4
/
component-chatbot.html
75 lines (63 loc) · 2.06 KB
/
component-chatbot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<script type="text/javascript">
RED.nodes.registerType('component-chatbot-receive',{
category: 'Web Components',
color: '#56FBAB',
defaults: {
name: {
value: ""
},
unique : {
value : ""
}
},
inputs:0,
outputs:1,
icon: "component-chatbot-receive.png",
label: function() {
return this.name || "Chatbot In";
},
oneditprepare : function(){
var node = this;
}
});
RED.nodes.registerType('component-chatbot-reply',{
category: 'Web Components',
color: '#56FBAB',
defaults: {
name: {
value: ""
}
},
inputs:1,
outputs:0,
icon: "component-chatbot-reply.png",
label: function() {
return this.name || "Chatbot Out";
},
oneditprepare : function(){
var node = this;
}
});
</script>
<script type="text/x-red" data-template-name="component-chatbot-receive">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-unique"><i class="icon-tag"></i>Connection ID</label>
<input type="text" id="node-input-unique" placeholder="Enter a unique name" />
</div>
</script>
<script type="text/x-red" data-help-name="component-chatbot-receive">
<p>A node that receives messages from a client-side chatbot web component</p>
</script>
<script type="text/x-red" data-template-name="component-chatbot-reply">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="component-chatbot-reply">
<p>A node that replies to messages sent from a client-side chatbot web component</p>
</script>