mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
FontAwesome injected a style element at runtime. The admin CSP blocks that and logged a console error on every load. The UI now imports the stylesheet and disables auto injection.
24 lines
839 B
TypeScript
24 lines
839 B
TypeScript
import { config } from '@fortawesome/fontawesome-svg-core'
|
|
import '@fortawesome/fontawesome-svg-core/styles.css'
|
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
import { createPinia } from 'pinia'
|
|
import { createApp } from 'vue'
|
|
|
|
import App from '@/App.vue'
|
|
import '@/assets/main.css'
|
|
import { messageOf } from '@/lib/api'
|
|
import { useToastsStore } from '@/stores/toasts'
|
|
|
|
// The admin CSP is style-src 'self': FontAwesome's runtime <style> injection is blocked, so its CSS ships in the bundle instead.
|
|
config.autoAddCss = false
|
|
|
|
const app = createApp(App)
|
|
const pinia = createPinia()
|
|
app.use(pinia)
|
|
app.config.errorHandler = (err) => {
|
|
console.error(err)
|
|
useToastsStore(pinia).push({ kind: 'error', message: `Unexpected error: ${messageOf(err)}` })
|
|
}
|
|
app.component('FontAwesomeIcon', FontAwesomeIcon)
|
|
app.mount('#app')
|