|
1 | 1 | <script setup lang="ts"> |
2 | 2 | import type { BreadCrumbItem, TaskStatsResponse } from '@/types/types'; |
3 | 3 | import type { TaskResource } from '@/types/resources'; |
| 4 | +import type { Ref } from 'vue'; |
4 | 5 |
|
5 | | -import { computed, onMounted, onUnmounted, ref, useTemplateRef, type Ref } from 'vue'; |
| 6 | +import { computed, onMounted, onUnmounted, ref, useTemplateRef } from 'vue'; |
6 | 7 | import { cancelTask, deleteSubTask, deleteTask } from '@/service/siteAPI'; |
7 | 8 | import { subscribeToDaskboardTasks } from '@/service/wsService'; |
8 | 9 | import { useDashboardStore } from '@/stores/DashboardStore'; |
9 | 10 | import { useQueryClient } from '@tanstack/vue-query'; |
10 | 11 | import { useAppStore } from '@/stores/AppStore'; |
11 | 12 | import { storeToRefs } from 'pinia'; |
12 | 13 | import { sortObject } from '@/service/sort/baseSort'; |
| 14 | +import { ButtonText } from '@/components/cedar-ui/button'; |
13 | 15 | import { TableBase } from '@/components/cedar-ui/table'; |
14 | 16 | import { toast } from '@aminnausin/cedar-ui'; |
15 | 17 |
|
16 | | -import DashboardTaskMenu from '@/components/dashboard/DashboardTaskMenu.vue'; |
| 18 | +import DashboardTaskMenu from '@/components/menus/DashboardTaskMenu.vue'; |
17 | 19 | import BasePopover from '@/components/pinesUI/BasePopover.vue'; |
18 | 20 | import IconHorizon from '@/components/icons/IconHorizon.vue'; |
19 | 21 | import BreadCrumbs from '@/components/pinesUI/BreadCrumbs.vue'; |
20 | | -import ButtonText from '@/components/inputs/ButtonText.vue'; |
21 | 22 | import ModalBase from '@/components/pinesUI/ModalBase.vue'; |
22 | 23 | import TaskCard from '@/components/cards/data/TaskCard.vue'; |
23 | 24 | import useModal from '@/composables/useModal'; |
@@ -214,21 +215,25 @@ onUnmounted(async () => { |
214 | 215 | <p class="">Total Tasks: {{ stateTasks.length ?? stateTaskStats?.count_tasks }}</p> |
215 | 216 | </span> |
216 | 217 | <div class="xs:*:h-8 flex w-full flex-wrap items-center gap-2 *:h-fit"> |
217 | | - <BasePopover popoverClass="w-52! rounded-lg mt-10" :button-attributes="{ title: 'Start New Task' }" ref="taskPopover"> |
218 | | - <template #buttonText>New Task</template> |
| 218 | + <BasePopover |
| 219 | + class="xs:flex-initial flex-1" |
| 220 | + popoverClass="w-52! rounded-lg mt-10 " |
| 221 | + :button-attributes="{ title: 'Start New Task', text: 'New Task', class: 'xs:flex-initial flex-1 h-full' }" |
| 222 | + :button-component="ButtonText" |
| 223 | + ref="taskPopover" |
| 224 | + > |
219 | 225 | <template #buttonIcon> |
220 | 226 | <ProiconsAdd /> |
221 | 227 | </template> |
222 | 228 | <template #content> |
223 | 229 | <DashboardTaskMenu @handle-close="taskPopover?.handleClose" /> |
224 | 230 | </template> |
225 | 231 | </BasePopover> |
226 | | - <ButtonText @click="loadData(true)" title="Refresh Task List"> |
227 | | - <template #text>Refresh</template> |
228 | | - <template #icon><ProiconsArrowSync /></template> |
| 232 | + <ButtonText @click="loadData(true)" text="Refresh" title="Refresh Task List" class="xs:flex-initial flex-1"> |
| 233 | + <template #icon><ProiconsArrowSync class="size-4" /></template> |
229 | 234 | </ButtonText> |
230 | | - <ButtonText :to="'/horizon'" text="Horizon" class="xs:flex-initial flex-1" :title="'Redis task management (Linux/Docker Only)'"> |
231 | | - <template #icon><IconHorizon class="aspect-1 h-full" /></template> |
| 235 | + <ButtonText :to="'/horizon'" text="Horizon" class="xs:flex-initial flex-1" title="Redis task management (Linux/Docker Only)"> |
| 236 | + <template #icon><IconHorizon class="size-4" /></template> |
232 | 237 | </ButtonText> |
233 | 238 | </div> |
234 | 239 | </div> |
|
0 commit comments