Files

20 lines
2.7 KiB
HTML
Raw Permalink Normal View History

<script type="text/javascript">
RED.nodes.registerType('filesharing',{category:'nextcloud',color:'#22AA66',
defaults:{name:{value:""},nextcloud:{type:"nextcloud-config",required:true},operation:{value:"shares:list"},shareId:{value:""},token:{value:""}},
inputs:1,outputs:1,icon:"filesharing.svg",label:function(){return this.name||"File Sharing";}});
</script>
<script type="text/html" data-template-name="filesharing">
<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="File Sharing"></div>
<div class="form-row"><label for="node-input-nextcloud"><i class="fa fa-cloud"></i> Config</label><input type="text" id="node-input-nextcloud" placeholder="Select config node"></div>
<div class="form-row"><label for="node-input-operation"><i class="fa fa-cog"></i> Operation</label>
<select id="node-input-operation" style="width:100%;">
<optgroup label="Shares"><option value="shares:list">List Shares</option><option value="shares:get">Get Share</option><option value="shares:create">Create Share</option><option value="shares:update">Update Share</option><option value="shares:delete">Delete Share</option><option value="shares:inherited">Inherited Shares</option><option value="shares:pending">Pending Shares</option><option value="shares:accept">Accept Share</option><option value="shares:sendEmail">Send Share Email</option><option value="shares:token">Generate Token</option></optgroup>
<optgroup label="Deleted Shares"><option value="deleted:list">List Deleted</option><option value="deleted:restore">Restore Deleted</option></optgroup>
<optgroup label="Sharees"><option value="sharees:search">Search Sharees</option><option value="sharees:recommended">Recommended Sharees</option></optgroup>
<optgroup label="Remote Shares"><option value="remote:list">List Remote</option><option value="remote:pending">Pending Remote</option><option value="remote:get">Get Remote</option><option value="remote:accept">Accept Remote</option><option value="remote:decline">Decline Remote</option><option value="remote:unshare">Unshare Remote</option></optgroup>
<optgroup label="Preview &amp; Info"><option value="preview:get">Public Preview</option><option value="info:get">Share Info</option></optgroup>
</select></div>
<hr><div class="form-row"><label>Share ID</label><input type="text" id="node-input-shareId" placeholder="msg.shareId"></div>
<div class="form-row"><label>Share Token</label><input type="text" id="node-input-token" placeholder="msg.token"></div>
<div class="form-tips"><p>Create share: pass <code>msg.path</code>, <code>msg.shareType</code>, <code>msg.shareWith</code>. Update: <code>msg.permissions</code>, <code>msg.expireDate</code>, etc.</p></div>
</script>