node-red-contrib-alice 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/alice.html +35 -28
- package/package.json +1 -1
package/nodes/alice.html
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
return this.name || "Alice-Credentials";
|
|
17
17
|
},
|
|
18
18
|
oneditprepare:function(){
|
|
19
|
-
$('#dev-on-gate').text("checking ...");
|
|
19
|
+
// $('#dev-on-gate').text("checking ...");
|
|
20
20
|
$('#subscribe-status').text("checking ...");
|
|
21
21
|
let em = $('#node-config-input-email').val();
|
|
22
22
|
let idt = $('#node-config-input-id').val();
|
|
@@ -28,32 +28,35 @@
|
|
|
28
28
|
$('#node-config-input-name').val(nodename);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
function getDeviceCount(id, email, contId){
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
31
|
+
// function getDeviceCount(id, email, contId){
|
|
32
|
+
// $.ajax({
|
|
33
|
+
// url: "https://nodered-home.ru/api/v1/devices/count",
|
|
34
|
+
// type:"POST",
|
|
35
|
+
// headers: {
|
|
36
|
+
// 'Content-Type':'application/json'
|
|
37
|
+
// },
|
|
38
|
+
// crossDomain: true,
|
|
39
|
+
// contentType:"application/json",
|
|
40
|
+
// data: JSON.stringify({
|
|
41
|
+
// id: id,
|
|
42
|
+
// email: email
|
|
43
|
+
// }),
|
|
44
|
+
// dataType: "json",
|
|
45
|
+
// format:"json"
|
|
46
|
+
// })
|
|
47
|
+
// .done(result=>{
|
|
48
|
+
// $('#'+contId).text(result.data.text);
|
|
49
|
+
// })
|
|
50
|
+
// .fail(error=>{
|
|
51
|
+
// console.log(error)
|
|
52
|
+
// console.error(error.responseJSON);
|
|
53
|
+
// RED.notify("Error : "+error.responseJSON.message, {type:"error"});
|
|
54
|
+
// });
|
|
55
|
+
// };
|
|
56
56
|
function getSubscribeStatus(id, email, contId){
|
|
57
|
+
if (email.length < 3 || id.length < 3){
|
|
58
|
+
return;
|
|
59
|
+
};
|
|
57
60
|
$.ajax({
|
|
58
61
|
url: "https://nodered-home.ru/payment/getsubscribestatus",
|
|
59
62
|
type:"POST",
|
|
@@ -221,13 +224,17 @@
|
|
|
221
224
|
<p><b>Subscription:</b></p>
|
|
222
225
|
</div>
|
|
223
226
|
<div class="form-row">
|
|
224
|
-
<label for="node-config-input-token" style="width: 150px">
|
|
225
|
-
<label for="node-config-input-token" style="width: 150px">Subscription status:</label> <span id="subscribe-status"></span>
|
|
227
|
+
<label for="node-config-input-token" style="width: 150px">Subscription status:</label> <span id="subscribe-status"></span>
|
|
226
228
|
<div class="form-tips" id="node-tip-subscribe-warn">
|
|
227
229
|
<span>Important:</span><br>
|
|
228
230
|
<span> - By purchasing a subscription, you agree to the terms of the <a href="https://nodered-home.ru/public_offer.pdf" target="_blank">public offer</a></span><br>
|
|
229
231
|
<span> - View and manage your subscriptions <a href="https://my.cloudpayments.ru/ru/unsubscribe" target="_blank">here</a></span>
|
|
230
232
|
<div style="text-align: end">
|
|
233
|
+
<!-- <label for="node-input-subList" style="text-align: start">Period:</label>
|
|
234
|
+
<select id="node-input-subList" style="width:70%; margin-top:10px; margin-bottom:10px;">
|
|
235
|
+
<option value=1>1 month - 199 rubles</option>
|
|
236
|
+
<option value=12>12 month - 2 300 rubles</option>
|
|
237
|
+
</select> -->
|
|
231
238
|
<button id="subscribe-button"
|
|
232
239
|
onclick="pay($('#node-config-input-id').val(), $('#node-config-input-email').val())"
|
|
233
240
|
class="ui-button">Buy a subscription
|