Add hook to script edit schedules in the client
Expose the schedules in the schedules store as the window global owltideSchedules so that mass changes can easily be scripted by a programmer.
This commit is contained in:
parent
56791609f4
commit
a932cccfc0
2 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,10 @@ export const useSchedulesStore = defineStore("schedules", () => {
|
|||
pendingSyncs: ref<Map<number, SyncOperation>>(new Map()),
|
||||
};
|
||||
|
||||
/* Expose schedules to the console on the client to make it easy to inspect and do scripted modifications. */
|
||||
if (import.meta.client)
|
||||
(window as any).owltideSchedules = state.schedules;
|
||||
|
||||
const getters = {
|
||||
activeSchedule: computed(() => {
|
||||
if (state.activeScheduleId.value === undefined)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue