fix(admin-ui): ship FontAwesome CSS in bundle to satisfy style-src 'self'

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.
This commit is contained in:
2026-11-08 02:24:47 +00:00
parent 758d7c7020
commit 429edb873d
2 changed files with 45 additions and 40 deletions
+5
View File
@@ -1,3 +1,5 @@
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'
@@ -7,6 +9,9 @@ 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)