diff --git a/public/images/.gitignore b/public/images/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/public/images/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/src/auth.js b/src/auth.js index e898f09..f170525 100644 --- a/src/auth.js +++ b/src/auth.js @@ -8,7 +8,7 @@ import { i18n, lang } from '@/lang/i18n.js'; import router from '@Router/Auth' import Notify from '@Plugins/Notify' import TailwindScreen from '@Plugins/TailwindScreen' -import { pagePlugin } from '@Services/Page'; +import { defineApp, pagePlugin, reloadApp } from '@Services/Page'; import Auth from '@Holos/Layout/Auth.vue' @@ -22,16 +22,21 @@ window.TwScreen = new TailwindScreen(); async function boot() { try { - const { data } = await axios.get(import.meta.env.VITE_API_URL + '/api/routes'); - + const routes = await axios.get(import.meta.env.VITE_API_URL + '/api/resources/routes'); + const app = await axios.get(import.meta.env.VITE_API_URL + '/api/resources/app'); + // Iniciar rutas - window.Ziggy = data; + window.Ziggy = routes.data; window.route = useRoute(); + + defineApp(app.data); } catch (error) { console.error(error); alert('Failed to load routes'); } + reloadApp(); + createApp(Auth) .use(createPinia()) .use(i18n) diff --git a/src/components/Holos/Layout/App.vue b/src/components/Holos/Layout/App.vue index ea81eec..8aa64dc 100644 --- a/src/components/Holos/Layout/App.vue +++ b/src/components/Holos/Layout/App.vue @@ -1,7 +1,6 @@