@@ -51,7 +51,7 @@ Further documentation can be found in the
5151## Content Structure
5252
5353| Component | Description | Accessible by |
54- | ----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------- |
54+ | --------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
5555| Slide | A slide is the visible content on a screen. | Admin, editor |
5656| Media | Media is either images or videos used as content for slides. | Admin, editor |
5757| Theme | A theme has css, that can override the slide css. | Admin |
@@ -318,7 +318,7 @@ See the `docker-compose.override.yml` playwright entry and the version imported
318318
319319This project includes a test script that handles building assets, running
320320Playwright tests, and stops and starts the node container. This script tests the
321- * built * files. This is the approach the GitHub Action uses.
321+ _ built _ files. This is the approach the GitHub Action uses.
322322
323323``` shell
324324task test:frontend-built
@@ -404,6 +404,7 @@ TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS=300
404404 The format of the interval should follow < https://www.php.net/manual/en/dateinterval.construct.php > .
405405
406406 ** Default** : 2 days.
407+
407408- APP_KEY_VAULT_SOURCE: Source of key-value pair for ` src/Service/KeyVaultService ` . Atm. "ENVIRONMENT" is the only
408409 option.
409410- APP_KEY_VAULT_JSON: A json object formatted as a string. Contains key-value pairs that can be accessed by through
@@ -431,23 +432,26 @@ ADMIN_ENHANCED_PREVIEW=false
431432 See [ https://labs.rejseplanen.dk/ ] ( https://labs.rejseplanen.dk/ ) for information about acquiring an API key.
432433
433434 ** Default** : Not set.
435+
434436- ADMIN_SHOW_SCREEN_STATUS: Should the status of the screen be shown in the Admin (true|false)?
435437
436438 ** Default** : Disabled.
439+
437440- ADMIN_TOUCH_BUTTON_REGIONS: Should the option of setting a button name for a slide be enabled in the Admin?
438441 This option is used by the Client if a region is configured to be a "touch-buttons" region.
439442
440443 ** Default** : Disabled.
444+
441445- ADMIN_LOGIN_METHODS: Which login methods should be displayed in the admin (array of objects as json string)?
442446
443447 Available types: "oidc" | "username-password".
444448
445449 ``` json
446450 {
447- "type" : " oidc" ,
448- "provider" : " internal" ,
449- "label" : " Button text" ,
450- "icon" : " faCity"
451+ "type" : " oidc" ,
452+ "provider" : " internal" ,
453+ "label" : " Button text" ,
454+ "icon" : " faCity"
451455 }
452456 ```
453457
@@ -456,17 +460,18 @@ ADMIN_ENHANCED_PREVIEW=false
456460 - icon: Name of the fontawesome icon to use for the button or "mitID" for MitID logo.
457461
458462 ``` json
459- {
460- "type" : " username-password" ,
461- "provider" : " username-password" ,
462- "label" : " "
463- }
463+ {
464+ "type" : " username-password" ,
465+ "provider" : " username-password" ,
466+ "label" : " "
467+ }
464468 ```
465469
466470 - provider: "username-password"
467471 - label: Label for the username password login section
468472
469473 ** Default** : Username and password login option is enabled.
474+
470475- ADMIN_ENHANCED_PREVIEW: Should the enhanced preview mode be active (true|false)? When enabled, previews will be
471476 handled by iFraming in the Client app. This will allow the option of previewing playlists and screens.
472477 If disabled, only slides can be previewed. This will be with the "live" method. This preview is not as precise.
@@ -494,18 +499,23 @@ CLIENT_DEBUG=false
494499 waiting for being activated in the administration.
495500
496501 ** Default** : 20 s.
502+
497503- CLIENT_REFRESH_TOKEN_TIMEOUT: How often (milliseconds) should it be checked whether the token needs to be refreshed?
498504
499505 ** Default** : 30 s.
506+
500507- CLIENT_REFRESH_TOKEN_TIMEOUT: How often (milliseconds) should it be checked whether the token needs to be refreshed?
501508
502509 ** Default** : 60 s.
510+
503511- CLIENT_SCHEDULING_INTERVAL: How often (milliseconds) should the scheduling be run for the logged in screen?
504512
505513 ** Default** : 60 s.
514+
506515- CLIENT_PULL_STRATEGY_INTERVAL: How often (milliseconds) should data be pulled from the API?
507516
508517 ** Default** : 1 m. and 30 s.
518+
509519- CLIENT_COLOR_SCHEME: Which colour scheme should be enabled? Should be a json object as string.
510520 This is used to signal how changes to darkmode are handled.
511521 Options are:
@@ -514,6 +524,7 @@ CLIENT_DEBUG=false
514524 activates darkmode according to sunrise/sunset of the location given by the longitude/latitude (lat/lng).
515525
516526 ** Default** : Library mode with a lat/lng set in Denmark.
527+
517528- CLIENT_DEBUG: Should the Client be in debug mode (true|false). When not in debug mode the mouse pointer is hidden.
518529
519530 ** Default** : Disabled.
@@ -654,7 +665,7 @@ actual "machine" running the screen data.
654665This status can be:
655666
656667- "+ Tilkobl": The screen is not connected to a machine.
657- - ✓ (green): The machine is connected and running the latest code.
668+ - ✓ (green): The machine is connected and running the latest code.
658669- i (yellow circle): The machine is not running the newest released code.
659670- ! (red triangle): The machine has not called the API within the last hour or the access token is expired.
660671
@@ -828,7 +839,32 @@ The slide is responsible for signaling that it is done executing.
828839This is done by calling the slideDone() function. If the slide should just run for X milliseconds then you can use the
829840BaseSlideExecution class to handle this. See the example for this approach.
830841
831- ##### Admin Form
842+ #### custom-template-name.json
843+
844+ The ` .json ` should include:
845+
846+ ```
847+ {
848+ "title": "Billede og tekst",
849+ "id": "01FP2SNGFN0BZQH03KCBXHKYHG", // ULID, https://ulidgenerator.com/
850+ "options": {} // Optional, can contain extra options such as `disableLivePreview` that disables live preview in the admin UI
851+ "adminForm": {} // Optional, described below
852+ }
853+ ```
854+
855+ ##### Admin Form not set in json
856+
857+ It is possible to create an interactive admin form in a ` .jsx ` -file. As described above with renderSlide, when a template has a custom ` .jsx ` admin form, it needs to implement a ` renderAdminForm ` function in the base file.
858+
859+ - renderAdminForm(formStateObject, onChange, handleMedia, mediaData) - Should return the JSX for the admin form.
860+ - slideContent: The slide data object from the admin, could e.g. contain a title ` slideContent["title"] `
861+ - onSlideContentChange: A callback for changes on the slide content.
862+ - handleMedia: A function that handles saving media (only necessary if the slide has media)
863+ - mediaData: An object that can contain already saved media (only necessary if the slide has media)
864+
865+ For an example of a custom template see ` assets/shared/custom-templates-example/ ` .
866+
867+ ##### Admin Form set in json
832868
833869To get content into the slide the config.adminForm field should be set. This should be an array of objects with the
834870following attributes:
0 commit comments