52 lines
2.1 KiB
HTML
52 lines
2.1 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('habitica-group', {
|
|
category: 'Habitica',
|
|
color: '#a6bbcf',
|
|
defaults: {
|
|
name: {value: ''},
|
|
apiAccount: {value: '', type: 'habitica-account', required: true},
|
|
account: {value: '', type: 'habitica-account', required: true},
|
|
fields: {value: ''},
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: 'file.png',
|
|
label: function() {
|
|
return this.name || 'Habitica: Group';
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="habitica-group">
|
|
<div class="form-row">
|
|
<label for="node-input-name">
|
|
<i class="fa fa-tag"></i> Name
|
|
</label>
|
|
<input type="text" id="node-input-name" placeholder="Name" />
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-apiAccount">
|
|
<i class="fa fa-tag"></i> API Account
|
|
</label>
|
|
<input type="text" id="node-input-apiAccount" placeholder="API Account" />
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-account">
|
|
<i class="fa fa-tag"></i> Account
|
|
</label>
|
|
<input type="text" id="node-input-account" placeholder="Account" />
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-fields-editor">
|
|
<i class="fa fa-tag"></i> Fields
|
|
</label>
|
|
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-fields-editor"></div>
|
|
<small>Enter one or more fields, separated by commas or line breaks. For sub-fields, use "dot-notation" such as <code>items.gear</code>. <a href="https://github.com/HabitRPG/habitica/blob/develop/website/server/models/user/schema.js">See the Habitica user schema</a> for more information.</small>
|
|
<br />
|
|
<small><em>Example: <code>stats,achievements,items.gear</code></em></small>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="habitica-group">
|
|
<p>Retrieve profile information for a given user from the Habitica API.</p>
|
|
</script> |