Compare commits
1 Commits
main
..
6cfe6a3835
| Author | SHA1 | Date | |
|---|---|---|---|
| 6cfe6a3835 |
@@ -989,7 +989,10 @@ class DefaultController extends ControllerAbstract {
|
|||||||
isset($data['variant']) && is_string($data['variant']) ? $data['variant'] : 'inline',
|
isset($data['variant']) && is_string($data['variant']) ? $data['variant'] : 'inline',
|
||||||
);
|
);
|
||||||
if ($preview === null) {
|
if ($preview === null) {
|
||||||
return new Response('', Response::HTTP_NO_CONTENT);
|
return new JsonResponse([
|
||||||
|
'status' => 'error',
|
||||||
|
'error' => ['code' => 404, 'message' => 'Preview unavailable'],
|
||||||
|
], Response::HTTP_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new StreamedResponse($preview->resource->stream(), Response::HTTP_OK, [
|
return new StreamedResponse($preview->resource->stream(), Response::HTTP_OK, [
|
||||||
|
|||||||
+12
-8
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
namespace KTXM\MailManager;
|
namespace KTXM\MailManager;
|
||||||
|
|
||||||
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
use KTXF\Module\ModuleBrowserInterface;
|
||||||
use KTXF\Module\Configuration\ModuleContextInterface;
|
|
||||||
use KTXF\Module\ModuleInstanceAbstract;
|
use KTXF\Module\ModuleInstanceAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +11,7 @@ use KTXF\Module\ModuleInstanceAbstract;
|
|||||||
* Provides unified mail sending and management across multiple providers
|
* Provides unified mail sending and management across multiple providers
|
||||||
* with context-aware service discovery and queued delivery.
|
* with context-aware service discovery and queued delivery.
|
||||||
*/
|
*/
|
||||||
class Module extends ModuleInstanceAbstract
|
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -59,10 +58,15 @@ class Module extends ModuleInstanceAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configure(ModuleContextInterface $context): void
|
public function registerBI(): array {
|
||||||
{
|
return [
|
||||||
if ($context instanceof BrowserModuleContextInterface) {
|
'handle' => $this->handle(),
|
||||||
$context->registerModule($this, 'MailManager', 'static/module.mjs');
|
'namespace' => 'MailManager',
|
||||||
}
|
'version' => $this->version(),
|
||||||
|
'label' => $this->label(),
|
||||||
|
'author' => $this->author(),
|
||||||
|
'description' => $this->description(),
|
||||||
|
'boot' => 'static/module.mjs',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+4
-2
@@ -3005,7 +3005,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vuetify": {
|
"node_modules/vuetify": {
|
||||||
"version": "4.1.4",
|
"version": "4.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-4.1.12.tgz",
|
||||||
|
"integrity": "sha512-WXGbnuzqUGPZM7nF38C3jiucaLRutHZOICVW0wg1dyXppW11i+su/IT20nK+1o86nsgTdedejeEv53cJUrI30A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -3014,7 +3016,7 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": ">=4.7",
|
"typescript": ">=4.7",
|
||||||
"vite-plugin-vuetify": ">=2.1.0",
|
"vite-plugin-vuetify": ">=2.1.0",
|
||||||
"vue": "^3.5.0",
|
"vue": "^3.5.0 || ^3.6.0-0",
|
||||||
"webpack-plugin-vuetify": ">=3.1.0"
|
"webpack-plugin-vuetify": ">=3.1.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
|
|||||||
@@ -199,9 +199,6 @@ export async function transceiveBlob<TRequest>(operation: string, data: TRequest
|
|||||||
await fetchWrapper.post(API_URL, request, {
|
await fetchWrapper.post(API_URL, request, {
|
||||||
headers: { 'Accept': '*/*' },
|
headers: { 'Accept': '*/*' },
|
||||||
onStream: async (response: Response) => {
|
onStream: async (response: Response) => {
|
||||||
if (response.status === 204) {
|
|
||||||
throw new Error(`[${operation}] Preview unavailable`);
|
|
||||||
}
|
|
||||||
blob = await response.blob();
|
blob = await response.blob();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user