diff --git a/lib/Module.php b/lib/Module.php index 6fe050f..1b975f4 100644 --- a/lib/Module.php +++ b/lib/Module.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace KTXM\ServiceWopi; use KTXF\Module\Configuration\ConsoleModuleContextInterface; +use KTXF\Module\Configuration\BrowserModuleContextInterface; use KTXF\Module\Configuration\ModuleContextInterface; use KTXF\Module\ModuleInstanceAbstract; use KTXM\ServiceWopi\Console\CheckCommand; @@ -26,6 +27,9 @@ class Module extends ModuleInstanceAbstract public function configure(ModuleContextInterface $context): void { + if ($context instanceof BrowserModuleContextInterface) { + $context->registerModule($this, 'ServiceWopi', 'static/module.mjs'); + } if ($context instanceof ConsoleModuleContextInterface) { $context->registerCommand(CheckCommand::class); $context->registerCommand(CleanupCommand::class); diff --git a/static/module.mjs b/static/module.mjs new file mode 100644 index 0000000..8c4d895 --- /dev/null +++ b/static/module.mjs @@ -0,0 +1,8 @@ +// This entry advertises the service; session creation validates access and configuration. +export const integrations = { + documents_editor_service: [{ + id: 'wopi', + label: 'WOPI Service', + meta: { protocol: 'wopi' }, + }], +}