Skip to content

Commit

Permalink
3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 23, 2024
1 parent f54ad7f commit 23231c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/controllers/PlaygroundController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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');
}
Expand Down

0 comments on commit 23231c5

Please sign in to comment.