/
complicated.html
64 lines (60 loc) · 2.68 KB
/
complicated.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
<script type="text/javascript">
RED.nodes.registerType('complicated',{
category: 'function',
color: '#DEBD5C',
defaults: {
name: {value:""},
api: {value:""},
complication: {value:""}
},
inputs:1,
outputs:1,
icon: "white-globe.png",
label: function() {
return this.name||"complicated";
}
});
</script>
<script type="text/x-red" data-template-name="complicated">
<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-api"><i class="fa-key"></i> ApiKey</label>
<input type="text" id="node-input-api">
</div>
<div class="form-row">
<label for="node-input-complication"><i class="fa-list"></i> Select Complication</label>
<select type="text" id="node-input-complication" style="width:70%;">
<option value="modularLarge">modularLarge</option>
<option value="modularSmall">modularSmall</option>
<option value="utilitarianSmall">utilitarianSmall</option>
<option value="utilitarianLarge">utilitarianLarge</option>
<option value="utilitarianSmallFlat">utilitarianSmallFlat</option>
<option value="circularSmall">circularSmall</option>
<option value="extraLarge">extraLarge</option>
<option value="graphicCorner">graphicCorner</option>
<option value="graphicRectangular">graphicRectangular</option>
<option value="graphicBezel">graphicBezel</option>
<option value="graphicCircular">graphicCircular</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="complicated">
<p>Node-Red node to easily send messages to your Apple Watch using the app: Complicated.<BR>
Webpage of the app: https://mikelyons.org/complicated/ <br>
Find your API key in the Complicated app and enter this in the node. <br>
Select the complication you want to update from the node dropdown box.<br>
Connect the output to the http-request node. No need to configure the http-request node itself.<br>
<br>
Feeding a multi-line input using an inject node does not work properly. When providing
the \n for a newline this is incorrectly processed.<br>
Feeding multi-line input using a function node will work:
msg.payload = "first line\nSecond Line"<br>
return msg<br>
<br>
Use an inject node with empty string to trigger a function node if you want to feed a
multi-line to Complicated app.<br>
</p>
</script>