AdminForthConfigCustomization
Extends
Omit<AdminForthInputConfigCustomization,"loginPageInjections"|"globalInjections">
Properties
announcementBadge()?
optionalannouncementBadge: (user) =>AnnouncementBadgeResponse
Function to return custom badge in side bar for users. Can return text or html If function is not passed or returns null, badge will not be shown. Execution is done on admin app load.
Parameters
| Parameter | Type |
|---|---|
user | AdminUser |
Returns
Inherited from
Omit.announcementBadge
brandLogo?
optionalbrandLogo:string
Path to your app logo
Example:
Place file logo.svg to ./custom folder and set this option:
brandLogo: '@@/logo.svg',
Inherited from
Omit.brandLogo
brandName
brandName:
string
Your app name
Overrides
Omit.brandName
brandNameSlug
brandNameSlug:
string
Slug which will be used on tech side e.g. to store cookies separately. Created automatically from brandName if not set.
customComponentsDir?
optionalcustomComponentsDir:string
Relative or absolute path to custom components directory
By default equals ./custom.
Custom .vue files, images, and any other assets placed in this directory can be accessed in AdminForth components and configs with @@/.
For example if file path is ./custom/comp/my.vue, you can use it in AdminForth config like this:
components: {
show: '@@/comp/my.vue',
}
Inherited from
Omit.customComponentsDir
customHeadItems?
optionalcustomHeadItems:object[]
Allows adding custom elements (e.g., <link>, <script>, <meta>) to the <head> of the HTML document. Each item must include a tag name and a set of attributes.
attributes
attributes:
Record<string,string|boolean>
innerCode?
optionalinnerCode:string
tagName
tagName:
string
Overrides
Omit.customHeadItems
customPages
customPages:
AdminForthPageDeclaration[]
Description of custom pages which will let register custom pages for custom routes in AdminForth.
Overrides
Omit.customPages
dateFormats
dateFormats:
string
datesFormat?
optionaldatesFormat:string
DayJS format string for all dates in the app. Defaulted to 'MMM D, YYYY'
Inherited from
Omit.datesFormat
emptyFieldPlaceholder?
optionalemptyFieldPlaceholder:string| {list?:string;show?:string; }
Placeholder for empty fields in lists and show views, by default empty string ''
Inherited from
Omit.emptyFieldPlaceholder
favicon?
optionalfavicon:string
Path to your app favicon
Example:
Place file favicon.png to ./custom folder and set this option:
favicon: '@@/favicon.png',
Inherited from
Omit.favicon
globalInjections
globalInjections:
object
everyPageBottom
everyPageBottom:
AdminForthComponentDeclarationFull[]
header
header:
AdminForthComponentDeclarationFull[]
sidebar
sidebar:
AdminForthComponentDeclarationFull[]
sidebarTop
sidebarTop:
AdminForthComponentDeclarationFull[]
userMenu
userMenu:
AdminForthComponentDeclarationFull[]
iconOnlySidebar?
optionaliconOnlySidebar:object
Path to your app logo for icon only sidebar
Example:
Place file logo.svg to ./custom folder and set this option:
enabled?
optionalenabled:boolean
logo?
optionallogo:string
Inherited from
Omit.iconOnlySidebar
loginPageInjections
loginPageInjections:
object
panelHeader
panelHeader:
AdminForthComponentDeclarationFull[]
underInputs
underInputs:
AdminForthComponentDeclarationFull[]
underLoginButton?
optionalunderLoginButton:AdminForthComponentDeclaration|AdminForthComponentDeclaration[]
showBrandLogoInSidebar?
optionalshowBrandLogoInSidebar:boolean
Whether to show brand logo in sidebar default is true
Inherited from
Omit.showBrandLogoInSidebar
showBrandNameInSidebar
showBrandNameInSidebar:
boolean
Whether to show brand name in sidebar default is true
Overrides
Omit.showBrandNameInSidebar
singleTheme?
optionalsingleTheme:"light"|"dark"
Whether to use single theme for the app
Inherited from
Omit.singleTheme
styles?
optionalstyles:Object
Object to redefine default styles for AdminForth components. Use this file as reference for all possible adjustments https://github.com/devforth/adminforth/blob/main/adminforth/modules/styles.ts
Inherited from
Omit.styles
timeFormat
timeFormat:
string
DayJS format string for all datetimes in the app. Defaulted to 'HH:mm:ss'
Overrides
Omit.timeFormat
title?
optionaltitle:string
HTML title tag value, defaults to brandName
Inherited from
Omit.title
vueUsesFile?
optionalvueUsesFile:string
Path to custom .ts file which allows to inject custom Vue uses in SPA or add custom imports.
Example: Create file: ./custom/vue-uses.ts with next content:
import HighchartsVue from 'highcharts-vue';
// import '@@/custom.scss'; // here is how you can import custom styles
export default function (app) {
app.use(HighchartsVue);
}
Install HighCharts into custom folder:
cd custom
npm init -y
npm install highcharts highcharts-vue
And specify vueUsesFile in AdminForth config:
vueUsesFile: '@@/vue-uses.ts',
Inherited from
Omit.vueUsesFile