mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
36 lines
923 B
TypeScript
36 lines
923 B
TypeScript
import { useSettingsStore } from '@/pinia'
|
|
import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
|
|
import { createPinia } from 'pinia'
|
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
import { createApp } from 'vue'
|
|
import VueDOMPurifyHTML from 'vue-dompurify-html'
|
|
import App from './App.vue'
|
|
import gettext from './gettext'
|
|
import router from './routes'
|
|
import 'virtual:uno.css'
|
|
|
|
const pinia = createPinia()
|
|
|
|
const app = createApp(App)
|
|
|
|
pinia.use(piniaPluginPersistedstate)
|
|
app.use(pinia)
|
|
app.use(gettext)
|
|
app.use(VueDOMPurifyHTML, {
|
|
hooks: {
|
|
uponSanitizeElement: (node, data) => {
|
|
if (node.tagName && node.tagName.toLowerCase() === 'think') {
|
|
data.allowedTags.think = true
|
|
}
|
|
},
|
|
},
|
|
})
|
|
|
|
// after pinia created
|
|
const settings = useSettingsStore()
|
|
|
|
gettext.current = settings.language || 'en'
|
|
|
|
app.use(router).use(autoAnimatePlugin).mount('#app')
|
|
|
|
export default app
|