An OpenCloud web extension that adds an "Send as E-Mail" context menu action for files.
- TypeScript 95.6%
- SCSS 2.2%
- Dockerfile 1.9%
- JavaScript 0.3%
| .forgejo/workflows | ||
| dev/docker | ||
| l10n | ||
| src | ||
| tests/unit | ||
| .editorconfig | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc.json | ||
| .renovaterc.json | ||
| CHANGELOG.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.js | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
web-app-open-xchange
An OpenCloud web extension that adds a "Send as E-Mail" context menu action for files. When triggered, it posts the selected file(s) to the parent window via postMessage, enabling integration with Open-Xchange in embed mode.
Features
- Context menu action – "Send as E-Mail" appears in the right-click menu for single or multiple files.
- Embed mode integration – Emits an
opencloud-embed:selectmessage with the selected resources to the parent frame. - URL-gated visibility – The action only appears when the page is loaded with the
?open-xchangequery parameter. - URL language preference – The extension can apply English fallback or a bundled language with
lang,language, orlocalequery parameters and persists it to the user'spreferredLanguagewhen it differs. - Translations – Includes German (de) translations; additional languages can be added in
l10n/translations.json.
Getting Started
Prerequisites
- A running Open-Xchange (OX) instance with the companion opencloud-ox extension installed and configured. Note: the opencloud-ox extension is currently not open-source.
- pnpm (see
packageManagerfield inpackage.jsonfor the required version) - Docker & Docker Compose (for the development environment)
Install Dependencies
pnpm install
Build
pnpm build
The built extension will be placed in the dist/ directory.
Development
Start the development server with hot-reload:
pnpm dev
Then bring up the OpenCloud backend:
docker compose up
OpenCloud will be available at https://host.docker.internal:9200. Log in with admin / admin.
To activate the extension's context menu action, append ?open-xchange to the URL.
To apply and save a language preference from the URL, add lang, language, or locale, for example ?open-xchange&lang=en, ?open-xchange&lang=de, ?open-xchange&locale=de-DE, or ?open-xchange&locale=de_DE.
Tests
pnpm test