3 Commits

Author SHA1 Message Date
Sebastian de9614fdb6 chore(deps): update dependency vite to v8.2.2
JS Unit Tests / test (pull_request) Successful in 1m14s
Build Test / test (pull_request) Successful in 1m29s
2026-09-01 03:02:46 +00:00
Sebastian d619693460 refactor(module): register browser integration through context
Signed-off-by: Sebastian <krupinski01@gmail.com>
2026-08-31 22:55:59 -04:00
Sebastian 631c35a00a fix(preview): show fallback when image loading fails
Signed-off-by: Sebastian <krupinski01@gmail.com>
2026-08-31 22:55:59 -04:00
3 changed files with 10 additions and 12 deletions
+7 -12
View File
@@ -2,10 +2,11 @@
namespace KTXM\MediaViewer; namespace KTXM\MediaViewer;
use KTXF\Module\ModuleBrowserInterface; use KTXF\Module\Configuration\BrowserModuleContextInterface;
use KTXF\Module\Configuration\ModuleContextInterface;
use KTXF\Module\ModuleInstanceAbstract; use KTXF\Module\ModuleInstanceAbstract;
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface class Module extends ModuleInstanceAbstract
{ {
public function __construct() public function __construct()
@@ -41,16 +42,10 @@ class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
return []; return [];
} }
public function registerBI(): array public function configure(ModuleContextInterface $context): void
{ {
return [ if ($context instanceof BrowserModuleContextInterface) {
'handle' => $this->handle(), $context->registerModule($this, 'MediaViewer', 'static/module.mjs');
'namespace' => 'MediaViewer', }
'version' => $this->version(),
'label' => $this->label(),
'author' => $this->author(),
'description' => $this->description(),
'boot' => 'static/module.mjs',
];
} }
} }
+2
View File
@@ -3,6 +3,7 @@ import { ref, computed, onMounted, onUnmounted } from 'vue'
import type { MediaLeafProps } from '@/types' import type { MediaLeafProps } from '@/types'
const props = defineProps<MediaLeafProps>() const props = defineProps<MediaLeafProps>()
const emit = defineEmits<{ error: [] }>()
// ── Pan / zoom state ──────────────────────────────────────────────────────── // ── Pan / zoom state ────────────────────────────────────────────────────────
@@ -103,6 +104,7 @@ onUnmounted(() => {
transformOrigin: 'center center', transformOrigin: 'center center',
}" }"
draggable="false" draggable="false"
@error="emit('error')"
/> />
<!-- Zoom hint --> <!-- Zoom hint -->
+1
View File
@@ -82,6 +82,7 @@ defineExpose({
:item="item" :item="item"
:presentation="presentation" :presentation="presentation"
class="media-stage__viewer" class="media-stage__viewer"
@error="error = true; url = ''"
/> />
</template> </template>
<template #fallback> <template #fallback>