PluginProbe
The Innovative Form Builder – IvyForms / 0.2
The Innovative Form Builder – IvyForms v0.2
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / assets / js / admin / admin.ts

admin.ts in The Innovative Form Builder – IvyForms 0.2, at frontend/src/assets/js/admin/admin.ts

46 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* eslint no-unused-vars: "off" */
2 import { createApp } from 'vue'
3 import { createPinia } from 'pinia'
4 import App from '../../../views/admin/App.vue'
5 import router from '@/router'
6 import 'maz-ui/styles'
7 import 'element-plus/dist/index.css'
8 import { useLabelsStore } from '@/stores/labels'
9 import { useLabels } from '@/composables/useLabels'
10
11 declare global {
12 const wp: {
13 media: () => void
14 open: () => void
15 }
16 const wpIvyApiSettings: {
17 root: string
18 nonce: string
19 namespace: string
20 }
21 const wpIvyUrls: {
22 pluginUrl: string
23 siteURL: string
24 }
25 const wpIvyDateFormat: {
26 dateFormat: string
27 timeFormat: string
28 dateTimeFormat: string
29 locale: string
30 }
31 }
32
33 const app = createApp(App)
34 const pinia = createPinia()
35 app.use(pinia)
36 app.use(router)
37
38 // Initialize the labels store with WordPress data
39 const labelsStore = useLabelsStore()
40 labelsStore.initialize()
41
42 // Make labels globally available to all components
43 app.config.globalProperties.$labels = useLabels()
44
45 app.mount('#ivyforms-app')
46