Skip to content

Commit

Permalink
adds: Symfony UX Controller online/offline status
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Mar 5, 2024
1 parent 8291e0d commit 71ae912
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion assets/dist/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class default_1 extends Controller {
this.dispatch(name, { detail: payload, prefix: 'connection-status' });
}
statusChanged(data) {
console.log('statusChanged', data);
this.messageTargets.forEach((element) => {
element.innerHTML = data.message;
});
Expand Down
6 changes: 3 additions & 3 deletions assets/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@spomky-labs/pwa-bundle",
"name": "@pwa/connection-status",
"description": "PWA for Symfony",
"license": "MIT",
"version": "1.0.0",
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"symfony": {
"controllers": {
"status": {
"connection-status": {
"main": "dist/controller.js",
"name": "spomky-labs/pwa-status",
"name": "pwa/connection-status",
"webpackMode": "eager",
"fetch": "eager",
"enabled": true
Expand Down
1 change: 0 additions & 1 deletion assets/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default class extends Controller {
}

statusChanged(data) {
console.log('statusChanged', data);
this.messageTargets.forEach((element) => {
element.innerHTML = data.message;
});
Expand Down
2 changes: 1 addition & 1 deletion src/SpomkyLabsPwaBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private function setAssetMapperPath(ContainerBuilder $builder): void
$builder->prependExtensionConfig('framework', [
'asset_mapper' => [
'paths' => [
__DIR__ . '/../assets/dist' => '@spomky-labs/pwa-bundle/status',
__DIR__ . '/../assets/dist' => '@pwa/connection-status/status',
],
],
]);
Expand Down

0 comments on commit 71ae912

Please sign in to comment.