diff --git a/CHANGELOG.md b/CHANGELOG.md index e4e632b..160d15c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Release Notes for Sprig +## 3.5.1 - 2024-10-23 + +### Changed + +- Updated htmx to version 2.0.3 ([changelog](https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#203---2024-10-03)). +- The fetch function is now called inside an event listener when calling `sprig.triggerRefreshOnLoad()`, making it more robust. +- Reverted some variable method name changes to improve autocompletion in PhpStorm. + +### Fixed + +- Fixed the ability to pass a JSON encoded string into the `sprig.triggerEvents()` function ([#15](https://github.com/putyourlightson/craft-sprig-core/issues/15). + ## 3.5.0 - 2024-08-29 ### Added diff --git a/composer.json b/composer.json index 1f5493c..20bfe81 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { "name": "putyourlightson/craft-sprig", "description": "A reactive Twig component framework for Craft.", - "version": "3.5.0", + "version": "3.5.1", "type": "craft-plugin", "license": "mit", "require": { "php": "^8.2", "craftcms/cms": "^5.0", "nystudio107/craft-code-editor": "^1.0", - "putyourlightson/craft-sprig-core": "^3.5.0" + "putyourlightson/craft-sprig-core": "^3.5.2" }, "require-dev": { "craftcms/ecs": "dev-main", diff --git a/src/controllers/PlaygroundController.php b/src/controllers/PlaygroundController.php index 4a54aed..a85179b 100644 --- a/src/controllers/PlaygroundController.php +++ b/src/controllers/PlaygroundController.php @@ -54,7 +54,7 @@ public function actionSave(): Response $id = Sprig::$plugin->playground->save($name, $component, $variables); - Craft::$app->getSession()->setNotice(Craft::t('sprig', 'Component saved.')); + Craft::$app->getSession()->setSuccess(Craft::t('sprig', 'Component saved.')); return $this->redirect('sprig/' . $id); } @@ -72,7 +72,7 @@ public function actionUpdate(): Response Sprig::$plugin->playground->update($id, $component, $variables); - Craft::$app->getSession()->setNotice(Craft::t('sprig', 'Component updated.')); + Craft::$app->getSession()->setSuccess(Craft::t('sprig', 'Component updated.')); return $this->redirect('sprig/' . $id); } @@ -88,7 +88,7 @@ public function actionDelete(): Response Sprig::$plugin->playground->delete($id); - Craft::$app->getSession()->setNotice(Craft::t('sprig', 'Component deleted.')); + Craft::$app->getSession()->setSuccess(Craft::t('sprig', 'Component deleted.')); return $this->redirect('sprig'); }