escrcpy/src/main.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

import { createApp } from 'vue'
2023-10-23 18:14:41 +08:00
import { createI18n } from 'vue-i18n'
import messages from '@intlify/unplugin-vue-i18n/messages'
import App from './App.vue'
import store from './store/index.js'
import plugins from './plugins/index.js'
import icons from './icons/index.js'
import { replaceIP } from '@/utils/index.js'
import 'virtual:uno.css'
import './styles/index.js'
const app = createApp(App)
app.use(store)
app.use(plugins)
2023-10-23 18:14:41 +08:00
app.use(icons)
2023-10-23 18:14:41 +08:00
const locale = window.electron?.process?.env?.LOCALE
// const locale = 'en_US'
// console.log('locale', locale)
const i18n = createI18n({
locale,
messages,
})
app.use(i18n)
app.config.globalProperties.$electron = window.electron
app.config.globalProperties.$adb = window.adbkit
app.config.globalProperties.$scrcpy = window.scrcpy
app.config.globalProperties.$path = window.nodePath
app.config.globalProperties.$appStore = window.appStore
app.config.globalProperties.$replaceIP = replaceIP
console.log('electron', window.electron)
2023-10-16 17:36:13 +08:00
app.mount('#app').$nextTick(() => {
// Remove Preload scripts loading
postMessage({ payload: 'removeLoading' }, '*')
})