Compare commits
1 Commits
931c03ba93
...
feature/ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdb8e31c54 |
1
deploy/nginx/mailcow-plugin-runtime.conf
Normal file
1
deploy/nginx/mailcow-plugin-runtime.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Mailcow plugin runtime reverse proxy\n# Include this from the Mailcow nginx site or merge into the active server block.\n# Adjust upstream address if the runtime is not on localhost:4110.\n\nlocation /plugins-runtime/ {\n proxy_pass http://127.0.0.1:4110/;\n proxy_http_version 1.1;\n\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n\n proxy_request_buffering off;\n proxy_buffering off;\n client_max_body_size 100m;\n}\n
|
||||||
1
docs/v0.3.0-mailcow-integration.md
Normal file
1
docs/v0.3.0-mailcow-integration.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# mailcow-plugin-runtime v0.3.0 integration plan\n\n## Scope\n- Proxy runtime behind Mailcow at \n- Load runtime bootstrap into Mailcow UI\n- Render compose toolbar and attachment hooks\n- Wire plugin end to end\n\n## Deployment notes\n1. Start runtime on port .\n2. Add to the Mailcow nginx server block.\n3. Ensure is reachable from Mailcow.\n4. Inject the bootstrap loader into the Mailcow compose page.\n\n## Expected follow-up\n- Replace placeholders in with actual selectors and injection logic.\n- Implement attachment token exchange and ownCloud file listing here.\n
|
||||||
1
plugins/owncloud-attach/api/README.md
Normal file
1
plugins/owncloud-attach/api/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# owncloud-attach API placeholders\n\nExpected endpoints:\n- GET /plugins/owncloud-attach/api/files\n- POST /plugins/owncloud-attach/api/attach\n- GET /plugins/owncloud-attach/api/health\n\nImplement the runtime-side token exchange and ownCloud file listing here.\n
|
||||||
1
plugins/owncloud-attach/ui/index.html
Normal file
1
plugins/owncloud-attach/ui/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>owncloud-attach</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 24px; background: #0b0b0f; color: #f7f7f8; }\n .card { max-width: 720px; margin: 0 auto; padding: 24px; border-radius: 16px; background: #15151d; }\n button { padding: 10px 14px; border-radius: 10px; border: 0; cursor: pointer; }\n </style>\n </head>\n <body>\n <div class="card">\n <h1>owncloud-attach</h1>\n <p>Placeholder UI for the ownCloud picker modal.</p>\n <button id="connect-owncloud">Connect ownCloud</button>\n </div>\n </body>\n</html>\n
|
||||||
1
scripts/next-steps.sh
Executable file
1
scripts/next-steps.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/usr/bin/env bash\nset -euo pipefail\n\necho 'Next manual steps:'\necho '1. Wire deploy/nginx/mailcow-plugin-runtime.conf into the Mailcow nginx server block.'\necho '2. Make Mailcow load src/integrations/mailcow/install.ts output on compose pages.'\necho '3. Replace placeholder selectors in src/integrations/mailcow/dom-targets.ts.'\necho '4. Build owncloud-attach picker API and file attachment flow.'\n
|
||||||
1
src/hooks/mailcow-hooks.ts
Normal file
1
src/hooks/mailcow-hooks.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import { MAILCOW_SELECTORS } from "../integrations/mailcow/dom-targets";\n\nfunction ensureHookContainer(selector: string, id: string): HTMLElement | null {\n const host = document.querySelector(selector);\n if (!host) return null;\n\n let node = document.getElementById(id);\n if (!node) {\n node = document.createElement("div");\n node.id = id;\n node.dataset.pluginHookContainer = id;\n host.appendChild(node);\n }\n\n return node;\n}\n\nexport function mountComposeToolbarHook(): void {\n ensureHookContainer(MAILCOW_SELECTORS.composeToolbar, "mailcow-plugin-hook-compose-toolbar");\n}\n\nexport function mountComposeAttachmentsHook(): void {\n ensureHookContainer(MAILCOW_SELECTORS.composeAttachments, "mailcow-plugin-hook-compose-attachments");\n}\n
|
||||||
1
src/integrations/mailcow/bootstrap-loader.ts
Normal file
1
src/integrations/mailcow/bootstrap-loader.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export interface MailcowBootstrapOptions {\n runtimeBaseUrl?: string;\n}\n\nexport function loadPluginRuntimeBootstrap(options: MailcowBootstrapOptions = {}): HTMLScriptElement {\n const runtimeBaseUrl = options.runtimeBaseUrl ?? "/plugins-runtime";\n const script = document.createElement("script");\n script.src = `\${runtimeBaseUrl}/runtime/bootstrap.js`;\n script.async = true;\n script.dataset.runtimeBaseUrl = runtimeBaseUrl;\n document.head.appendChild(script);\n return script;\n}\n
|
||||||
1
src/integrations/mailcow/dom-targets.ts
Normal file
1
src/integrations/mailcow/dom-targets.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const MAILCOW_SELECTORS = {\n composeToolbar: "[data-mailcow-compose-toolbar], .compose-toolbar, .toolbar",\n composeAttachments: "[data-mailcow-compose-attachments], .compose-attachments, .attachments",\n};\n
|
||||||
1
src/integrations/mailcow/install.ts
Normal file
1
src/integrations/mailcow/install.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import { loadPluginRuntimeBootstrap } from "./bootstrap-loader";\nimport { mountComposeToolbarHook, mountComposeAttachmentsHook } from "../hooks/mailcow-hooks";\n\nexport function installMailcowPluginRuntime(): void {\n loadPluginRuntimeBootstrap();\n\n window.addEventListener("DOMContentLoaded", () => {\n mountComposeToolbarHook();\n mountComposeAttachmentsHook();\n });\n}\n
|
||||||
Reference in New Issue
Block a user