feat(engine): ManualSyncRequestEvent + Sync Now button in settings
- Added ManualSyncRequestEvent to events.rs (exported from lib.rs). - SyncPlugin now handles ManualSyncRequestEvent: if no pull is in flight, spawns a new AsyncComputeTaskPool task and sets status to Syncing. Ignores duplicate requests while a pull is active. - Settings panel "Sync" section now shows the status text alongside a "Sync Now" button that fires ManualSyncRequestEvent. - Cleaned up stale doc comment in input_plugin.rs (Esc pause note). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,3 +61,10 @@ pub struct CardFlippedEvent(pub u32);
|
||||
/// persistence/UI systems that need unlock metadata.
|
||||
#[derive(Event, Debug, Clone)]
|
||||
pub struct AchievementUnlockedEvent(pub AchievementRecord);
|
||||
|
||||
/// Request to manually trigger a sync pull from the active backend.
|
||||
///
|
||||
/// Fired by the Settings panel "Sync Now" button. `SyncPlugin` responds by
|
||||
/// starting a new pull task if one is not already in flight.
|
||||
#[derive(Event, Debug, Clone, Copy, Default)]
|
||||
pub struct ManualSyncRequestEvent;
|
||||
|
||||
Reference in New Issue
Block a user