Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/adminjs-v7' into beta-v7
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Apr 17, 2023
2 parents 8f639b4 + 729997e commit 6f747dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/frontend/login-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import createStore, {
import ViewHelpers from '../backend/utils/view-helpers/view-helpers.js'
import { initializeAssets, initializeBranding, initializeLocale } from './store/index.js'
import AdminJS from '../adminjs.js'
import { getAssets, getBranding, getFaviconFromBranding } from '../backend/utils/options-parser/options-parser.js'
import { getAssets, getBranding, getFaviconFromBranding, getLocales } from '../backend/utils/options-parser/options-parser.js'
import { defaultLocale } from '../locale/index.js'

type LoginTemplateAttributes = {
/**
Expand All @@ -32,6 +33,7 @@ const html = async (
const branding = await getBranding(admin)
const assets = await getAssets(admin)
const faviconTag = getFaviconFromBranding(branding)
const locales = await getLocales(admin || defaultLocale)

const scripts = ((assets && assets.scripts) || [])
.map((s) => `<script src="${s}"></script>`)
Expand All @@ -40,7 +42,7 @@ const html = async (

store.dispatch(initializeBranding(branding))
store.dispatch(initializeAssets(assets))
store.dispatch(initializeLocale(admin.locale))
store.dispatch(initializeLocale(locales))

const theme = combineStyles(branding.theme)
const reduxState = store.getState()
Expand Down

0 comments on commit 6f747dc

Please sign in to comment.