File tree Expand file tree Collapse file tree 2 files changed +29
-11
lines changed
Expand file tree Collapse file tree 2 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,16 @@ class CodeInjector implements ICodeInjector {
365365 }
366366 } ) ;
367367
368+ this . adminforth . config . resources . forEach ( ( resource ) => {
369+ if ( resource . options ?. actions ) {
370+ resource . options . actions . forEach ( ( action ) => {
371+ if ( action . icon ) {
372+ icons . push ( action . icon ) ;
373+ }
374+ } ) ;
375+ }
376+ } ) ;
377+
368378 const uniqueIcons = Array . from ( new Set ( icons ) ) ;
369379
370380 // icons are collectionName:iconName. Get list of all unique collection names:
Original file line number Diff line number Diff line change @@ -721,20 +721,28 @@ interface AdminForthInputConfigCustomization {
721721}
722722
723723export interface AdminForthActionInput {
724- name : string ,
724+ name : string ;
725+ showIn ?: {
726+ list ?: boolean ,
727+ showButton ?: boolean ,
728+ showThreeDotsMenu ?: boolean ,
729+ } ;
725730 action : ( params : {
726- adminforth : IAdminForth ,
727- resource : AdminForthResource ,
728- recordId : string ,
729- adminUser : AdminUser ,
730- extra ?: HttpExtra ,
731- tr : Function ,
732- } ) => Promise < { ok : boolean , error ?: string } > ,
733- icon ?: string ,
734- id ?: string ,
731+ adminforth : IAdminForth ;
732+ resource : AdminForthResource ;
733+ recordId : string ;
734+ adminUser : AdminUser ;
735+ extra ?: HttpExtra ;
736+ tr : Function ;
737+ } ) => Promise < {
738+ ok : boolean ;
739+ error ?: string ;
740+ message ?: string ;
741+ } > ;
742+ icon ?: string ;
743+ id ?: string ;
735744}
736745
737-
738746export interface AdminForthResourceInput extends Omit < AdminForthResourceInputCommon , 'columns' | 'hooks' | 'options' > {
739747
740748 /**
You can’t perform that action at this time.
0 commit comments