| 1 | <html> |
| 2 | <head> |
| 3 | <title>Tasks</title> |
| 4 | <script type="module"> |
| 5 | import { store } from "/components/modals/scheduler/scheduler-store.js"; |
| 6 | </script> |
| 7 | </head> |
| 8 | <body> |
| 9 | <div x-data x-init="$store.schedulerStore.onTabActivated()" x-destroy="$store.schedulerStore.onModalClosed()"> |
| 10 | <template x-if="$store.schedulerStore"> |
| 11 | <div class="scheduler-modal-content"> |
| 12 | <div id="scheduler-settings-root" class="scheduler-dashboard"> |
| 13 | <div class="scheduler-dashboard-description">Manage tasks and automated processes for Agent Zero.</div> |
| 14 | <x-component path="modals/scheduler/scheduler-task-editor.html"></x-component> |
| 15 | <x-component path="modals/scheduler/scheduler-task-list.html"></x-component> |
| 16 | </div> |
| 17 | </div> |
| 18 | </template> |
| 19 | |
| 20 | <!-- Modal Footer (exists immediately so modals.js can move it) --> |
| 21 | <template x-if="$store.schedulerStore"> |
| 22 | <div class="modal-footer scheduler-modal-footer" data-modal-footer |
| 23 | x-show="$store.schedulerStore.isCreating || $store.schedulerStore.isEditing"> |
| 24 | <div class="buttons-container scheduler-modal-footer-actions"> |
| 25 | <div class="buttons-left"> |
| 26 | <button type="button" class="button cancel" |
| 27 | x-show="$store.schedulerStore.isEditing" |
| 28 | @click="$confirmClick($event, () => $store.schedulerStore.deleteTask($store.schedulerStore.editingTask.uuid))">Delete</button> |
| 29 | </div> |
| 30 | <div class="buttons-right"> |
| 31 | <button type="button" class="button confirm" |
| 32 | @click="$store.schedulerStore.saveTask()">Save</button> |
| 33 | <button type="button" class="button cancel" |
| 34 | @click="$store.schedulerStore.cancelEdit()">Cancel</button> |
| 35 | </div> |
| 36 | </div> |
| 37 | </div> |
| 38 | </template> |
| 39 | </div> |
| 40 | |
| 41 | <style> |
| 42 | .scheduler-modal-content { |
| 43 | display: flex; |
| 44 | flex-direction: column; |
| 45 | height: 100%; |
| 46 | min-height: 400px; |
| 47 | } |
| 48 | .scheduler-dashboard { |
| 49 | padding: 0; |
| 50 | } |
| 51 | .scheduler-dashboard-description { |
| 52 | padding: 0 0 1rem 0; |
| 53 | } |
| 54 | |
| 55 | .scheduler-modal-footer { |
| 56 | padding: 0.6rem 1rem; |
| 57 | } |
| 58 | |
| 59 | .scheduler-modal-footer-actions { |
| 60 | width: 100%; |
| 61 | } |
| 62 | </style> |
| 63 | </body> |
| 64 | </html> |