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