Add node docs, collabora purple UI, and portable install env

Human-readable help in all six palette nodes, docs/NODES.md with usage examples, expanded example flows, and auto-detect NODERED_DIR plus CODE bridge IP from .env on any VM.
This commit is contained in:
root
2026-08-22 17:10:34 +02:00
parent 5d4d7a58e6
commit 4fb614be87
13 changed files with 558 additions and 50 deletions
+24 -3
View File
@@ -1,7 +1,7 @@
<script type="text/javascript">
RED.nodes.registerType('collabora-wopi', {
category: 'nextcloud collabora',
color: '#0082c9',
color: '#7950a2',
defaults: {
name: { value: '' },
config: { type: 'nc-collab-config', required: true },
@@ -38,6 +38,27 @@
</script>
<script type="text/html" data-help-name="collabora-wopi">
<p>WOPI discovery/capabilities och editor-URL. Agenten ska nästan aldrig PutFile — använd WebDAV PUT.</p>
<p><code>buildEditor</code>: <code>msg.wopiSrc</code> + <code>msg.token</code> → <code>msg.editorUrl</code>.</p>
<p>Inte filkonvertering — hälsokoll och WOPI-hjälp mot CODE.</p>
<table style="width:100%; font-size:12px;">
<tr><th>Operation</th><th>Du får</th></tr>
<tr><td><code>capabilities</code></td><td>JSON: vad CODE kan (convert-to m.m.)</td></tr>
<tr><td><code>discovery</code></td><td>XML: mime → editor-URL</td></tr>
<tr><td><code>buildEditor</code></td><td><code>msg.editorUrl</code> från <code>msg.wopiSrc</code> + <code>msg.token</code></td></tr>
<tr><td><code>checkFileInfo</code></td><td>JSON om filen (WOPI-host, oftast Nextcloud)</td></tr>
<tr><td><code>getFile</code></td><td>filbytes via WOPI GET</td></tr>
</table>
<p><code>buildEditor</code> sätter ungefär:<br>
<code>{collaboraPublicUrl}/browser/dist/cool.html?WOPISrc=...&amp;access_token=...</code><br>
Publik URL = Nextcloud/proxy (<code>https://cloud.hannesahlin.se</code>), inte intern CODE-IP.</p>
<h4>När</h4>
<ul>
<li>Första test att CODE lever → <code>capabilities</code></li>
<li>WOPI-token från <code>nc-office document:direct</code> → bygg iframe-URL</li>
<li>Felsökning. Spara filer via WebDAV, inte WOPI PutFile.</li>
</ul>
<pre>inject → collabora-wopi (capabilities) → debug</pre>
</script>