mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
[frontend-next] Refactored fronted
This commit is contained in:
parent
2f91918f54
commit
2fff1f5181
193 changed files with 3920 additions and 26548 deletions
24
frontend/src/main.ts
Normal file
24
frontend/src/main.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import {createApp} from 'vue'
|
||||
import {createPinia} from 'pinia'
|
||||
import gettext from './gettext'
|
||||
import App from './App.vue'
|
||||
import router from './routes'
|
||||
import 'ant-design-vue/dist/antd.less'
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
import {useSettingsStore} from '@/pinia'
|
||||
|
||||
|
||||
const pinia = createPinia()
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
app.use(pinia)
|
||||
app.use(gettext)
|
||||
// after pinia created
|
||||
const settings = useSettingsStore()
|
||||
gettext.current = settings.language || 'en'
|
||||
|
||||
app.use(router).mount('#app')
|
||||
|
||||
export default app
|
Loading…
Add table
Add a link
Reference in a new issue