Upload folder using huggingface_hub
Browse files- Police_Station_Finder.html +1 -1
- README.md +1 -1
- complaints/app.html +1 -1
- complaints/js/app.js +16 -2
- complaints/login.html +1 -1
- server.py +1 -1
Police_Station_Finder.html
CHANGED
|
@@ -844,7 +844,7 @@
|
|
| 844 |
<span>MAT</span>
|
| 845 |
<span style="font-size: 0.8rem; font-weight: 600; color: var(--secondary); background: rgba(0,109,57,0.1); padding: 2px 8px; border-radius: 6px;">ุฏููู ุงูู
ุฑุงูุฒ ุงูุฃู
ููุฉ</span>
|
| 846 |
</h1>
|
| 847 |
-
<p>ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ โ ุชุญุฏูุฏ ุงูู
ูุงูุน ุฌุบุฑุงููุงู <span class="version-tag">ุงูุฅุตุฏุงุฑ 1.
|
| 848 |
</div>
|
| 849 |
</div>
|
| 850 |
<div class="header-actions">
|
|
|
|
| 844 |
<span>MAT</span>
|
| 845 |
<span style="font-size: 0.8rem; font-weight: 600; color: var(--secondary); background: rgba(0,109,57,0.1); padding: 2px 8px; border-radius: 6px;">ุฏููู ุงูู
ุฑุงูุฒ ุงูุฃู
ููุฉ</span>
|
| 846 |
</h1>
|
| 847 |
+
<p>ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ โ ุชุญุฏูุฏ ุงูู
ูุงูุน ุฌุบุฑุงููุงู <span class="version-tag">ุงูุฅุตุฏุงุฑ 1.29.0</span></p>
|
| 848 |
</div>
|
| 849 |
</div>
|
| 850 |
<div class="header-actions">
|
README.md
CHANGED
|
@@ -13,7 +13,7 @@ license: mit
|
|
| 13 |
|
| 14 |
> **Official Arabic Name:** "ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ"
|
| 15 |
> **Full Acronym Definition:** Modular Assistant Toolkit
|
| 16 |
-
> **Project Version:** 1.
|
| 17 |
> **Official Short URL:** [https://abualzait.github.io/MAT](https://abualzait.github.io/MAT)
|
| 18 |
> **Direct Live Deployment:** [https://mat-ee756.containers.snapdeploy.app](https://mat-ee756.containers.snapdeploy.app)
|
| 19 |
> **Cloud Secret Key:** `mat_secret_key_2026_prod`
|
|
|
|
| 13 |
|
| 14 |
> **Official Arabic Name:** "ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ"
|
| 15 |
> **Full Acronym Definition:** Modular Assistant Toolkit
|
| 16 |
+
> **Project Version:** 1.29.0
|
| 17 |
> **Official Short URL:** [https://abualzait.github.io/MAT](https://abualzait.github.io/MAT)
|
| 18 |
> **Direct Live Deployment:** [https://mat-ee756.containers.snapdeploy.app](https://mat-ee756.containers.snapdeploy.app)
|
| 19 |
> **Cloud Secret Key:** `mat_secret_key_2026_prod`
|
complaints/app.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
| 36 |
<h1 class="header-main-title">ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ</h1>
|
| 37 |
<p class="header-jurisdiction">
|
| 38 |
<span>ู
ุญุงูุธุฉ ุงูุนุงุตู
ุฉ</span>
|
| 39 |
-
<span class="badge badge-purple" style="font-size:0.62rem; padding:1px 5px; border-radius:4px;">v1.
|
| 40 |
</p>
|
| 41 |
</div>
|
| 42 |
<button class="sidebar-close-btn" onclick="closeSidebarDrawer()" title="ุฅุบูุงู ุงููุงุฆู
ุฉ" aria-label="ุฅุบูุงู ุงููุงุฆู
ุฉ">
|
|
|
|
| 36 |
<h1 class="header-main-title">ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ</h1>
|
| 37 |
<p class="header-jurisdiction">
|
| 38 |
<span>ู
ุญุงูุธุฉ ุงูุนุงุตู
ุฉ</span>
|
| 39 |
+
<span class="badge badge-purple" style="font-size:0.62rem; padding:1px 5px; border-radius:4px;">v1.29.0</span>
|
| 40 |
</p>
|
| 41 |
</div>
|
| 42 |
<button class="sidebar-close-btn" onclick="closeSidebarDrawer()" title="ุฅุบูุงู ุงููุงุฆู
ุฉ" aria-label="ุฅุบูุงู ุงููุงุฆู
ุฉ">
|
complaints/js/app.js
CHANGED
|
@@ -3,7 +3,7 @@ const matConfig = {
|
|
| 3 |
name: 'MAT',
|
| 4 |
arabicName: 'ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ',
|
| 5 |
fullName: 'Modular Assistant Toolkit',
|
| 6 |
-
apiPrefix: '/api/v1/mat
|
| 7 |
};
|
| 8 |
/**
|
| 9 |
* ูุธุงู
ุฏููู ุงูู
ุฑุงูุฒ ุงูุฃู
ููุฉ ูุฌุฏููุฉ ุงูู
ูุงุนูุฏ โ JS
|
|
@@ -11,9 +11,20 @@ const matConfig = {
|
|
| 11 |
|
| 12 |
let currentUser = null;
|
| 13 |
|
| 14 |
-
// โโ CSRF Setup โโโโโโโโโโโโโโโโโโโโ
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
const originalFetch = window.fetch;
|
| 16 |
window.fetch = async function(resource, config = {}) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
const csrfMatch = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]*)/);
|
| 18 |
if (csrfMatch && csrfMatch[1]) {
|
| 19 |
config.headers = {
|
|
@@ -21,6 +32,9 @@ window.fetch = async function(resource, config = {}) {
|
|
| 21 |
'X-CSRF-Token': csrfMatch[1]
|
| 22 |
};
|
| 23 |
}
|
|
|
|
|
|
|
|
|
|
| 24 |
return originalFetch(resource, config);
|
| 25 |
};
|
| 26 |
|
|
|
|
| 3 |
name: 'MAT',
|
| 4 |
arabicName: 'ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ',
|
| 5 |
fullName: 'Modular Assistant Toolkit',
|
| 6 |
+
apiPrefix: '/api/v1/mat'
|
| 7 |
};
|
| 8 |
/**
|
| 9 |
* ูุธุงู
ุฏููู ุงูู
ุฑุงูุฒ ุงูุฃู
ููุฉ ูุฌุฏููุฉ ุงูู
ูุงุนูุฏ โ JS
|
|
|
|
| 11 |
|
| 12 |
let currentUser = null;
|
| 13 |
|
| 14 |
+
// โโ Smart API Backend Routing & CSRF Setup โโโโโโโโโโโโโโโโโโโโ
|
| 15 |
+
const BACKEND_HOST = (typeof window !== 'undefined' && (window.location.hostname.includes('hf.space') || window.location.hostname.includes('github.io')))
|
| 16 |
+
? 'https://mat-ee756.containers.snapdeploy.app'
|
| 17 |
+
: '';
|
| 18 |
+
|
| 19 |
const originalFetch = window.fetch;
|
| 20 |
window.fetch = async function(resource, config = {}) {
|
| 21 |
+
let targetUrl = typeof resource === 'string' ? resource : (resource ? resource.url : '');
|
| 22 |
+
if (targetUrl.startsWith('/api/')) {
|
| 23 |
+
targetUrl = BACKEND_HOST + targetUrl;
|
| 24 |
+
if (typeof resource === 'string') {
|
| 25 |
+
resource = targetUrl;
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
const csrfMatch = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]*)/);
|
| 29 |
if (csrfMatch && csrfMatch[1]) {
|
| 30 |
config.headers = {
|
|
|
|
| 32 |
'X-CSRF-Token': csrfMatch[1]
|
| 33 |
};
|
| 34 |
}
|
| 35 |
+
if (BACKEND_HOST) {
|
| 36 |
+
config.credentials = 'include';
|
| 37 |
+
}
|
| 38 |
return originalFetch(resource, config);
|
| 39 |
};
|
| 40 |
|
complaints/login.html
CHANGED
|
@@ -224,7 +224,7 @@
|
|
| 224 |
|
| 225 |
<div style="margin-top: 2rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border-color); padding-top: 1rem;">
|
| 226 |
<p style="font-weight: 700; color: var(--accent-primary);">ุงูู
ู
ููุฉ ุงูุฃุฑุฏููุฉ ุงููุงุดู
ูุฉ โ ูุฒุงุฑุฉ ุงูุฏุงุฎููุฉ</p>
|
| 227 |
-
<p style="margin-top: 0.25rem;">MAT (Modular Assistant Toolkit) โ ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ โ ุงูุฅุตุฏุงุฑ 1.
|
| 228 |
</div>
|
| 229 |
</div>
|
| 230 |
</div>
|
|
|
|
| 224 |
|
| 225 |
<div style="margin-top: 2rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border-color); padding-top: 1rem;">
|
| 226 |
<p style="font-weight: 700; color: var(--accent-primary);">ุงูู
ู
ููุฉ ุงูุฃุฑุฏููุฉ ุงููุงุดู
ูุฉ โ ูุฒุงุฑุฉ ุงูุฏุงุฎููุฉ</p>
|
| 227 |
+
<p style="margin-top: 0.25rem;">MAT (Modular Assistant Toolkit) โ ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ โ ุงูุฅุตุฏุงุฑ 1.29.0</p>
|
| 228 |
</div>
|
| 229 |
</div>
|
| 230 |
</div>
|
server.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
"""
|
| 4 |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 5 |
-
โ MAT (Modular Assistant Toolkit) โ ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ (1.
|
| 6 |
โ โ
|
| 7 |
โ ูุนู
ู ุจุฏูู ุฅูุชุฑูุช ุนูู ุงูุดุจูุฉ ุงูู
ุญููุฉ โ
|
| 8 |
โ ูุง ูุญุชุงุฌ ุชุซุจูุช ุฃู ู
ูุชุจุงุช ุฅุถุงููุฉ โ
|
|
|
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
"""
|
| 4 |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 5 |
+
โ MAT (Modular Assistant Toolkit) โ ุญููุจุฉ ุงูุฃุฏูุงุช ุงูู
ุณุงุนุฏุฉ (1.29.0) โ
|
| 6 |
โ โ
|
| 7 |
โ ูุนู
ู ุจุฏูู ุฅูุชุฑูุช ุนูู ุงูุดุจูุฉ ุงูู
ุญููุฉ โ
|
| 8 |
โ ูุง ูุญุชุงุฌ ุชุซุจูุช ุฃู ู
ูุชุจุงุช ุฅุถุงููุฉ โ
|