generated from Nodarx/template
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ecc660c44 | |||
| fd15d91363 | |||
| eb0e020993 | |||
| 67405777e7 | |||
| 1c2a8722a1 | |||
| bb85de1164 | |||
| 797ab1ea30 | |||
| 3890e0b93c | |||
| 0c9745737b | |||
| 86624786dd | |||
| 145051e179 | |||
| 975804845a | |||
| de9614fdb6 | |||
| 3c394135e5 | |||
| d619693460 | |||
| 631c35a00a | |||
| 44cc7b7b0d |
+7
-12
@@ -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',
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+385
-675
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
"vue-tsc": "^3.0.5",
|
"vue-tsc": "^3.0.5",
|
||||||
"@vitest/coverage-v8": "^4.1.6",
|
"@vitest/coverage-v8": "^4.1.6",
|
||||||
"@vue/test-utils": "^2.4.10",
|
"@vue/test-utils": "^2.4.10",
|
||||||
"jsdom": "^29.1.1",
|
"jsdom": "^30.0.0",
|
||||||
"vitest": "^4.1.6"
|
"vitest": "^4.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 -->
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user