PluginProbe
The Innovative Form Builder – IvyForms / 0.3
The Innovative Form Builder – IvyForms v0.3
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.3, at frontend/src/assets/js/admin/admin.ts

54 lines 1.2 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 interface Window {
13 wp: {
14 media: () => void
15 open: () => void
16 }
17 wpIvyApiSettings: {
18 root: string
19 nonce: string
20 namespace?: string
21 }
22 wpIvySettings: {
23 general: {
24 fullscreen: boolean
25 version: string
26 }
27 }
28 wpIvyUrls: {
29 pluginURL: string
30 siteURL: string
31 }
32 wpIvyDateFormat?: {
33 dateFormat: string
34 timeFormat: string
35 dateTimeFormat: string
36 locale: string
37 }
38 }
39 }
40
41 const app = createApp(App)
42 const pinia = createPinia()
43 app.use(pinia)
44 app.use(router)
45
46 // Initialize the labels store with WordPress data
47 const labelsStore = useLabelsStore()
48 labelsStore.initialize()
49
50 // Make labels globally available to all components
51 app.config.globalProperties.$labels = useLabels()
52
53 app.mount('#ivyforms-app')
54