mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
refactor: expose aux timer names via runtime store, index in automations
Addresses review feedback on the aux timer naming feature:
- Automation action labels now reference the timers by index
("Aux timer 1: start") rather than the custom names, keeping the
automation config stable regardless of naming.
- Expose the custom names through the consumer-facing runtime interface:
the aux timer objects broadcast over the websocket now carry a `name`
field. Names are seeded from the persisted settings at bootstrap and
kept in sync whenever the settings change, so every consumer (views and
integrations) reads them from the same runtime data.
- The client control and view consumers now read the name from the
runtime store instead of querying settings directly; the settings form
remains the persisted editing source.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
This commit is contained in:
@@ -14,4 +14,6 @@ export type SimpleTimerState = {
|
||||
current: number;
|
||||
playback: SimplePlayback;
|
||||
direction: SimpleDirection;
|
||||
/** Custom name for the aux timer. Empty string when unnamed */
|
||||
name: string;
|
||||
};
|
||||
|
||||
@@ -53,18 +53,21 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
|
||||
direction: SimpleDirection.CountUp,
|
||||
duration: 0,
|
||||
playback: SimplePlayback.Stop,
|
||||
name: '',
|
||||
},
|
||||
auxtimer2: {
|
||||
current: 0,
|
||||
direction: SimpleDirection.CountUp,
|
||||
duration: 0,
|
||||
playback: SimplePlayback.Stop,
|
||||
name: '',
|
||||
},
|
||||
auxtimer3: {
|
||||
current: 0,
|
||||
direction: SimpleDirection.CountUp,
|
||||
duration: 0,
|
||||
playback: SimplePlayback.Stop,
|
||||
name: '',
|
||||
},
|
||||
ping: 1,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user