Skip to content

Customization

Samuel Weirich edited this page Aug 11, 2022 · 15 revisions

General info

Currently it is possible to adjust the images and locales of the application. After adding the customized files the following command must be run to rebuild the application and apply the customizations:

npm run ENVIRONMENT (e.g. dev or prod)

The folders for the customization files are ignored by git and doesn't gets overwritten by pulling a new release.

Images

To customize the images of the applications (e.g. logo) put the custom image with same name as the original image under the path resources/custom/images.

Custom theme (added in v2)

  1. Copy the content of resources/sass/theme/default to resources/sass/theme/custom
  2. Adjust values in _variables.scss.
  3. Change the MIX_THEME option in the .env file to 'custom'.
  4. Recompile the frontend with: npm run ENVIRONMENT (e.g. dev or prod)

Locales

To customize the locales put a JavaScript file in the following folder resources/custom/js which makes the wanted adjustments, for example:

import i18n from '../../js/i18n'

i18n.mergeLocaleMessage('en', {
  auth: {
    ldap: {
      usernameHelp: 'Test',
    }
  }
})

It is also possible to adjust the available locales that can be selected by the user by setting the environment variable MIX_AVAILABLE_LOCALES in your .env file. By default all locales for which a localization file exists can be selected.

Clone this wiki locally