diff --git a/web/components/Docker/HeaderContent.vue b/web/components/Docker/HeaderContent.vue index 99df0376b..f79ad529a 100644 --- a/web/components/Docker/HeaderContent.vue +++ b/web/components/Docker/HeaderContent.vue @@ -2,17 +2,32 @@ interface Props { autostartValue?: boolean; showAutostart?: boolean; - manageActions?: Array<{ label: string; icon: string; onClick?: () => void }>; + manageActions?: Array void }>>; } const _props = withDefaults(defineProps(), { autostartValue: true, showAutostart: true, manageActions: () => [ - { label: 'Edit', icon: 'i-lucide-edit' }, - { label: 'Remove', icon: 'i-lucide-trash-2' }, - { label: 'Restart', icon: 'i-lucide-refresh-cw' }, - { label: 'Force Update', icon: 'i-lucide-download' }, + [ + { label: 'Start', icon: 'i-lucide-play' }, + { label: 'Stop', icon: 'i-lucide-square' }, + { label: 'Pause', icon: 'i-lucide-pause' }, + { label: 'Restart', icon: 'i-lucide-refresh-cw' }, + ], + [ + { label: 'Update', icon: 'i-lucide-download' }, + { label: 'Force Update', icon: 'i-lucide-download-cloud' }, + { label: 'Remove', icon: 'i-lucide-trash-2' }, + ], + [ + { label: 'Docker Allocations', icon: 'i-lucide-hard-drive' }, + ], + [ + { label: 'Project Page', icon: 'i-lucide-external-link' }, + { label: 'Support', icon: 'i-lucide-help-circle' }, + { label: 'More Info', icon: 'i-lucide-info' }, + ], ], }); @@ -33,7 +48,13 @@ const handleManageAction = (action: { label: string; icon: string }) => { - + Manage diff --git a/web/components/LayoutViews/Detail/DetailLeftNavigation.vue b/web/components/LayoutViews/Detail/DetailLeftNavigation.vue index 5483cc6a9..084a42ada 100644 --- a/web/components/LayoutViews/Detail/DetailLeftNavigation.vue +++ b/web/components/LayoutViews/Detail/DetailLeftNavigation.vue @@ -10,7 +10,7 @@ interface Props { selectedItems: string[]; expandedGroups: Record; showHeader?: boolean; - manageActions?: Array<{ label: string; icon: string; onClick?: () => void }>; + manageActions?: Array void }>>; navigationLabel?: string; } @@ -18,10 +18,23 @@ const props = withDefaults(defineProps(), { title: 'Service Name', showHeader: true, manageActions: () => [ - { label: 'Start', icon: 'i-lucide-play' }, - { label: 'Stop', icon: 'i-lucide-square' }, - { label: 'Restart', icon: 'i-lucide-refresh-cw' }, - { label: 'Remove', icon: 'i-lucide-trash-2' }, + [ + { label: 'Sort Alpha Asc', icon: 'i-lucide-arrow-up-a-z' }, + { label: 'Sort Alpha Dec', icon: 'i-lucide-arrow-down-z-a' }, + ], + [ + { label: 'Start Selected', icon: 'i-lucide-play' }, + { label: 'Stop Selected', icon: 'i-lucide-square' }, + { label: 'Pause Selected', icon: 'i-lucide-pause' }, + { label: 'Restart Selected', icon: 'i-lucide-refresh-cw' }, + { label: 'Autostart Selected', icon: 'i-lucide-timer' }, + ], + [ + { label: 'Check for Updates', icon: 'i-lucide-refresh-ccw' }, + { label: 'Update Selected', icon: 'i-lucide-download' }, + { label: 'Remove Selected', icon: 'i-lucide-trash-2' }, + ], + [{ label: 'Add Container', icon: 'i-lucide-plus' }], ], navigationLabel: 'Select Item', }); @@ -164,11 +177,13 @@ const handleManageAction = (action: { label: string; icon: string }) => { }; const dropdownItems = computed(() => - props.manageActions.map((action) => ({ - label: action.label, - icon: action.icon, - onSelect: () => handleManageAction(action), - })) + props.manageActions.map((group) => + group.map((action) => ({ + label: action.label, + icon: action.icon, + onSelect: () => handleManageAction(action), + })) + ) ); @@ -200,7 +215,7 @@ const dropdownItems = computed(() => @click="allItemsSelected ? $emit('clearAll') : $emit('selectAll')" /> - + @click="allItemsSelected ? $emit('clearAll') : $emit('selectAll')" /> - +