(response)
| 56 | } |
| 57 | |
| 58 | async function applyDynamicCustomization (response) { |
| 59 | let jsonConfig |
| 60 | |
| 61 | if (response?.jsonconfiguration) { |
| 62 | jsonConfig = JSON.parse(response?.jsonconfiguration) |
| 63 | } |
| 64 | |
| 65 | // Sets custom GUI fields only if is not nullish. |
| 66 | vueProps.$config.appTitle = jsonConfig?.appTitle ?? vueProps.$config.appTitle |
| 67 | vueProps.$config.footer = jsonConfig?.footer ?? vueProps.$config.footer |
| 68 | vueProps.$config.loginFooter = jsonConfig?.loginFooter ?? vueProps.$config.loginFooter |
| 69 | vueProps.$config.logo = jsonConfig?.logo ?? vueProps.$config.logo |
| 70 | vueProps.$config.minilogo = jsonConfig?.minilogo ?? vueProps.$config.minilogo |
| 71 | vueProps.$config.banner = jsonConfig?.banner ?? vueProps.$config.banner |
| 72 | |
| 73 | if (jsonConfig?.error) { |
| 74 | vueProps.$config.error[403] = jsonConfig?.error[403] ?? vueProps.$config.error[403] |
| 75 | vueProps.$config.error[404] = jsonConfig?.error[404] ?? vueProps.$config.error[404] |
| 76 | vueProps.$config.error[500] = jsonConfig?.error[500] ?? vueProps.$config.error[500] |
| 77 | } |
| 78 | |
| 79 | if (jsonConfig?.plugins) { |
| 80 | jsonConfig.plugins.forEach(plugin => { |
| 81 | vueProps.$config.plugins.push(plugin) |
| 82 | }) |
| 83 | } |
| 84 | |
| 85 | vueProps.$config.favicon = jsonConfig?.favicon ?? vueProps.$config.favicon |
| 86 | vueProps.$config.css = response?.css ?? null |
| 87 | |
| 88 | await applyStaticCustomization(vueProps.$config.favicon, vueProps.$config.css) |
| 89 | } |
| 90 | |
| 91 | async function applyStaticCustomization (favicon, css) { |
| 92 | document.getElementById('favicon').href = favicon |
no test coverage detected