Add donation actions (rewards): menu editor + queue, donate-form buttons, overlay menu widget, alert lines
Test and Release / test (push) Successful in 1m43s
Test and Release / release (push) Successful in 7s

- Actions\Matcher (exact / every), ActionRepository, Recorder (idempotent via unique key)
- Admin: Rewards screen with live preview, queue with Mark done, menu badge
- Donate form shows actions as payment buttons; overlay 'actions' widget; alerts list triggered actions
- Installer DB_VERSION 2 (sg_actions, sg_action_events)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 12:36:28 -08:00
1 parent c62ac06b27
commit b0b5012698
25 files changed
+1227 -7

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
declare( strict_types=1 );
namespace StreamGoals\Overlay;
/** Optional capability: donation actions (rewards). Sources without it simply show no actions. */
interface ActionsSource {
/**
* Enabled actions for the goal (goal_id = $goalId or 0), already filtered to the effective minimum and ordered.
* Raw rows with keys title, description, amount_minor, mode.
*
* @return array<int,array<string,mixed>>
*/
public function menuActions( int $goalId ): array;
/**
* Triggered actions per donation (sg_action_events), in trigger order. One lookup for the whole page.
* Raw rows with keys title, times; Payloads sanitizes them.
*
* @param int[] $donationIds
* @return array<int,array<int,array<string,mixed>>> donation id => events
*/
public function actionsFor( array $donationIds ): array;
}