@@ -13,7 +13,7 @@ import {
13
13
IAdminForthAndOrFilter ,
14
14
} from "../types/Back.js" ;
15
15
16
- import { ADMINFORTH_VERSION , listify , md5hash } from './utils.js' ;
16
+ import { ADMINFORTH_VERSION , listify , md5hash , getLoginPromptHTML } from './utils.js' ;
17
17
18
18
import AdminForthAuth from "../auth.js" ;
19
19
import { ActionCheckSource , AdminForthConfigMenuItem , AdminForthDataTypes , AdminForthFilterOperators , AdminForthResourceCommon , AdminForthResourcePages ,
@@ -210,6 +210,8 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
210
210
const resource = this . adminforth . config . resources . find ( ( res ) => res . resourceId === this . adminforth . config . auth . usersResourceId ) ;
211
211
const usernameColumn = resource . columns . find ( ( col ) => col . name === usernameField ) ;
212
212
213
+ const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
214
+
213
215
return {
214
216
brandName : this . adminforth . config . customization . brandName ,
215
217
usernameFieldName : usernameColumn . label ,
@@ -218,7 +220,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
218
220
removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
219
221
title : this . adminforth . config . customization ?. title ,
220
222
demoCredentials : this . adminforth . config . auth . demoCredentials ,
221
- loginPromptHTML : await tr ( this . adminforth . config . auth . loginPromptHTML , 'system.loginPromptHTML' ) ,
223
+ loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
222
224
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
223
225
globalInjections : {
224
226
everyPageBottom : this . adminforth . config . customization . globalInjections . everyPageBottom ,
@@ -230,7 +232,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
230
232
} ,
231
233
} ) ;
232
234
233
-
234
235
server . endpoint ( {
235
236
method : 'GET' ,
236
237
path : '/get_base_config' ,
@@ -293,6 +294,9 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
293
294
}
294
295
295
296
const announcementBadge : AnnouncementBadgeResponse = this . adminforth . config . customization . announcementBadge ?.( adminUser ) ;
297
+
298
+ const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
299
+
296
300
297
301
const publicPart = {
298
302
brandName : this . adminforth . config . customization . brandName ,
@@ -302,7 +306,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
302
306
removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
303
307
title : this . adminforth . config . customization ?. title ,
304
308
demoCredentials : this . adminforth . config . auth . demoCredentials ,
305
- loginPromptHTML : await tr ( this . adminforth . config . auth . loginPromptHTML , 'system.loginPromptHTML' ) ,
309
+ loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
306
310
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
307
311
rememberMeDays : this . adminforth . config . auth . rememberMeDays ,
308
312
singleTheme : this . adminforth . config . customization . singleTheme ,
0 commit comments