| 69 | vueApp.use(directives) |
| 70 | |
| 71 | const renderError = (err) => { |
| 72 | console.error('Fatal error during app initialization: ', err) |
| 73 | const ErrorComponent = { |
| 74 | render: () => h( |
| 75 | 'div', |
| 76 | { style: 'font-family: sans-serif; text-align: center; padding: 2rem;' }, |
| 77 | [ |
| 78 | h('h2', { style: 'color: #ff4d4f;' }, 'We\'re experiencing a problem'), |
| 79 | h('p', 'The application could not be loaded due to a configuration issue. Please try again later.'), |
| 80 | h('details', { style: 'margin-top: 20px;' }, [ |
| 81 | h('summary', { style: 'cursor: pointer;' }, 'Technical details'), |
| 82 | h('pre', { |
| 83 | style: 'text-align: left; display: inline-block; margin-top: 10px;' |
| 84 | }, 'Missing or malformed config.json. Please ensure the file is present, accessible, and contains valid JSON. Check the browser console for more information.') |
| 85 | ]) |
| 86 | ] |
| 87 | ) |
| 88 | } |
| 89 | createApp(ErrorComponent).mount('#app') |
| 90 | } |
| 91 | |
| 92 | fetch('config.json?ts=' + Date.now()) |
| 93 | .then(response => { |