🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 01:19

This commit is contained in:
Hamza-Ayed
2026-05-03 01:19:24 +03:00
parent 6e241c6379
commit 3ced45c9cd
2 changed files with 43 additions and 4 deletions

View File

@@ -88,10 +88,11 @@
<script type="module">
import API from './assets/js/api.js';
window.appRouter = () => ({
isLoggedIn: !!localStorage.getItem('access_token'),
pageHtml: 'جاري التحميل...',
async init() {
document.addEventListener('alpine:init', () => {
Alpine.data('appRouter', () => ({
isLoggedIn: !!localStorage.getItem('access_token'),
pageHtml: 'جاري التحميل...',
async init() {
console.log('App Initialized');
await this.navigate(window.location.pathname);
window.onpopstate = () => this.navigate(window.location.pathname);
@@ -206,6 +207,7 @@
`;
return '<div>الصفحة قيد الإنشاء</div>';
}
}));
});
</script>
</body>