| [ Web Proxy ] |
| Viewing: https://adminforth.dev/docs/api/Back/interfaces/AdminForthConfigCustomization/ | [Back] [Original] |
Omit<AdminForthInputConfigCustomization, "loginPage" | "loginPageInjections" | "globalInjections">
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.
| Parameter | Type |
|---|---|
user | AdminUser |
Omit.announcementBadge
optionalbrandLogo?:string
Path to your app logo
Example:
Place file logo.svg to ./custom folder and set this option:
brandLogo: '@@/logo.svg',
Omit.brandLogo
brandName:
string
Your app name
Omit.brandName
brandNameSlug:
string
Slug which will be used on tech side e.g. to store cookies separately. Created automatically from brandName if not set.
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',
}
Omit.customComponentsDir
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:
Record<string,string|boolean>
optionalinnerCode?:string
tagName:
string
Omit.customHeadItems
customPages:
AdminForthPageDeclaration[]
Description of custom pages which will let register custom pages for custom routes in AdminForth.
Omit.customPages
dateFormats:
string
optionaldatesFormat?:string
DayJS format string for all dates in the app. Defaulted to 'MMM D, YYYY'
Omit.datesFormat
optionalemptyFieldPlaceholder?:string| {list?:string;show?:string; }
Placeholder for empty fields in lists and show views, by default empty string ''
Omit.emptyFieldPlaceholder
optionalfavicon?:string
Path to your app favicon
Example:
Place file favicon.png to ./custom folder and set this option:
favicon: '@@/favicon.png',
Omit.favicon
globalInjections:
object
everyPageBottom:
AdminForthComponentDeclarationFull[]
header:
AdminForthComponentDeclarationFull[]
sidebar:
AdminForthComponentDeclarationFull[]
sidebarTop:
AdminForthComponentDeclarationFull[]
userMenu:
AdminForthComponentDeclarationFull[]
optionaliconOnlySidebar?:object
Path to your app logo for icon only sidebar
Example:
Place file logo.svg to ./custom folder and set this option:
optionalenabled?:boolean
optionalexpandedSidebarWidth?:string
Width of expanded sidebar (default: '16.5rem')
optionallogo?:string
Omit.iconOnlySidebar
optionalloginPage?:AdminForthComponentDeclarationFull
loginPageInjections:
object
panelHeader:
AdminForthComponentDeclarationFull[]
underInputs:
AdminForthComponentDeclarationFull[]
underLoginButton:
AdminForthComponentDeclarationFull[]
optionalshowBrandLogoInSidebar?:boolean
Whether to show brand logo in sidebar default is true
Omit.showBrandLogoInSidebar
showBrandNameInSidebar:
boolean
Whether to show brand name in sidebar default is true
Omit.showBrandNameInSidebar
optionalsingleTheme?:"light"|"dark"
Whether to use single theme for the app
Omit.singleTheme
optionalspaBuildDir?:string
Relative or absolute path to directory where AdminForth prepares SPA sources, installs SPA dependencies and builds SPA.
AdminForth creates spa_tmp folder inside of it.
By default equals <os.tmpdir()>/adminforth/<brandNameSlug>.
Keep it writable at runtime as well: on start bundleNow() prepares sources here to compare them with build in spaServeDir.
It may be empty at runtime: SPA dependencies are installed here only when build in spaServeDir is outdated.
Omit.spaBuildDir
optionalspaServeDir?:string
Relative or absolute path to directory from which built SPA is served.
By default equals dist folder inside of installed AdminForth package.
Use dedicated directory: its content is removed on every rebuild. AdminForth refuses to use non-empty directory which it did not create.
Omit.spaServeDir
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
Omit.styles
timeFormat:
string
DayJS format string for all datetimes in the app. Defaulted to 'HH:mm:ss'
Omit.timeFormat
optionaltitle?:string
HTML title tag value, defaults to brandName
Omit.title
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
pnpm init -y
pnpm install highcharts highcharts-vue
And specify vueUsesFile in AdminForth config:
vueUsesFile: '@@/vue-uses.ts',
Omit.vueUsesFile
| Web Proxy Viewer | New URL | Original Page |