first commit

This commit is contained in:
sajjadtalkhabi
2026-05-13 01:43:05 +03:30
commit d2a577f254
297 changed files with 36274 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { MutationCache, QueryCache, QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
import Vue3Toastify from 'vue3-toastify'
import App from '@/App.vue'
import router from '@/router'
import { globalComponents } from '@/utils/global-components'
import { handleError } from '@/utils/error-handler'
import { http } from '@/services/api'
import { setupMocks } from '@/services/mock'
import 'vue3-toastify/dist/index.css'
import '@/assets/main.scss'
import '@/utils/yup-locale'
setupMocks(http)
const app = createApp(App)
const pinia = createPinia()
Object.entries(globalComponents).forEach(([name, component]) => app.component(name, component))
const queryClient = new QueryClient({
queryCache: new QueryCache({ onError: (error) => handleError(error) }),
mutationCache: new MutationCache({ onError: (error) => handleError(error) }),
defaultOptions: {
queries: {
retry: false,
staleTime: 5 * 60 * 1000,
refetchInterval: false,
refetchOnMount: false,
refetchOnWindowFocus: false,
gcTime: 5 * 60 * 1000,
},
},
})
app.use(VueQueryPlugin, { queryClient })
app.use(Vue3Toastify, {
theme: 'colored',
type: 'default',
position: 'bottom-right',
autoClose: 1500,
transition: 'slide',
rtl: true,
dangerouslyHTMLString: true,
})
app.use(router).use(pinia).mount('#app')