diff --git a/adminforth/modules/configValidator.ts b/adminforth/modules/configValidator.ts index e2d7f629..626cc595 100644 --- a/adminforth/modules/configValidator.ts +++ b/adminforth/modules/configValidator.ts @@ -37,7 +37,7 @@ export default class ConfigValidator implements IConfigValidator { private static readonly LOGIN_INJECTION_KEYS = ['underInputs', 'underLoginButton', 'panelHeader']; private static readonly GLOBAL_INJECTION_KEYS = ['userMenu', 'header', 'sidebar', 'sidebarTop', 'everyPageBottom']; - private static readonly PAGE_INJECTION_KEYS = ['beforeBreadcrumbs', 'beforeActionButtons', 'afterBreadcrumbs', 'bottom', 'threeDotsDropdownItems', 'customActionIcons']; + private static readonly PAGE_INJECTION_KEYS = ['beforeBreadcrumbs', 'beforeActionButtons', 'afterBreadcrumbs', 'bottom', 'threeDotsDropdownItems', 'customActionIcons', 'customActionIconsThreeDotsMenuItems']; constructor(private adminforth: IAdminForth, private inputConfig: AdminForthInputConfig) { this.adminforth = adminforth; @@ -408,12 +408,14 @@ export default class ConfigValidator implements IConfigValidator { } if (!action.showIn) { action.showIn = { - list: true, + listQuickIcon: true, + listThreeDotsMenu: false, showButton: false, showThreeDotsMenu: false, } } else { - action.showIn.list = action.showIn.list ?? true; + action.showIn.listQuickIcon = action.showIn.listQuickIcon ?? true; + action.showIn.listThreeDotsMenu = action.showIn.listThreeDotsMenu ?? false; action.showIn.showButton = action.showIn.showButton ?? false; action.showIn.showThreeDotsMenu = action.showIn.showThreeDotsMenu ?? false; } diff --git a/adminforth/spa/src/components/ListActionsThreeDots.vue b/adminforth/spa/src/components/ListActionsThreeDots.vue new file mode 100644 index 00000000..dd2990da --- /dev/null +++ b/adminforth/spa/src/components/ListActionsThreeDots.vue @@ -0,0 +1,220 @@ + + + \ No newline at end of file diff --git a/adminforth/spa/src/components/ResourceListTable.vue b/adminforth/spa/src/components/ResourceListTable.vue index 903f3d91..9b6f4e5e 100644 --- a/adminforth/spa/src/components/ResourceListTable.vue +++ b/adminforth/spa/src/components/ResourceListTable.vue @@ -113,7 +113,7 @@
- +
@@ -332,6 +339,7 @@ import { Tooltip } from '@/afcl'; import type { AdminForthResourceCommon, AdminForthResourceColumnInputCommon, AdminForthResourceColumnCommon } from '@/types/Common'; import adminforth from '@/adminforth'; import Checkbox from '@/afcl/Checkbox.vue'; +import ListActionsThreeDots from '@/components/ListActionsThreeDots.vue'; const coreStore = useCoreStore(); const { t } = useI18n(); @@ -346,6 +354,7 @@ const props = defineProps<{ noRoundings?: boolean, customActionsInjection?: any[], tableBodyStartInjection?: any[], + customActionIconsThreeDotsMenuItems?: any[] }>(); // emits, update page diff --git a/adminforth/spa/src/components/ResourceListTableVirtual.vue b/adminforth/spa/src/components/ResourceListTableVirtual.vue index de13018e..edf53864 100644 --- a/adminforth/spa/src/components/ResourceListTableVirtual.vue +++ b/adminforth/spa/src/components/ResourceListTableVirtual.vue @@ -123,7 +123,7 @@
- + - + - - + - + - - + - - + - -