-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstrapi.html
44 lines (38 loc) · 1.33 KB
/
strapi.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
<script type="text/x-red" data-template-name="strapi">
<div class="form-row">
<label for="node-input-strapiAPIURL"><i class="fa fa-link"></i> API URL</label>
<input type="text" id="node-input-strapiAPIURL" placeholder="Strapi API URL" style=" vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-jwtToken"><i class="fa fa-key"></i> JWT Token </label>
<input type="text" id="node-input-jwtToken" placeholder="JWT_TOKEN">
</div>
</script>
<script type="text/x-red" data-help-name="strapi">
<p>Request <b>msg.payload</b> params to Strapi API.</p>
<p>Simple way to get to Strapi API.</p>
<p><a href="https://strapi.io/" target="_new">ref this</a></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('strapi',{
category: 'function',
defaults: {
strapiAPIURL: {value:"", required:true},
jwtToken: {value:"", required:false}
},
// credentials: {
// jwtToken: {type: "password"}
// },
color:"#8e75ff",
icon: "strapi.png",
align: "left",
inputs:1,
outputs:1,
label: function() {
return this.name||"strapi";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>