add frontend angular
This commit is contained in:
parent
f34a5f0a83
commit
070e8435d8
36 changed files with 10209 additions and 6 deletions
|
@ -1020,7 +1020,7 @@ class DemoMainResource:
|
|||
const userInfoPanel = document.getElementById('user-info-panel');
|
||||
|
||||
// Only show the panel if the user has a username or points
|
||||
if (username || points) {
|
||||
if ((username || points) && userInfoPanel) {
|
||||
userInfoPanel.style.display = 'block';
|
||||
|
||||
// Update username display
|
||||
|
|
|
@ -94,7 +94,7 @@ window.EVENT_TYPES = {
|
|||
description: 'Fermeture partielle de voie'
|
||||
},
|
||||
'traffic.roadwork': {
|
||||
emoji: '⛑️',
|
||||
emoji: '<img src="static/cone.png" class="icone cone" />',
|
||||
label: 'Travaux routiers',
|
||||
category: 'Circulation',
|
||||
description: 'Travaux sur la chaussée'
|
||||
|
@ -117,6 +117,7 @@ window.EVENT_TYPES = {
|
|||
category: 'Danger',
|
||||
description: 'Des pirana attaquent dans cette piscine'
|
||||
}
|
||||
// ici ajouter d'autres catégories d'évènements à suggérer
|
||||
};
|
||||
|
||||
// Fonction pour obtenir les suggestions d'autocomplétion
|
||||
|
|
|
@ -3,7 +3,7 @@ const map = new maplibregl.Map({
|
|||
container: 'map',
|
||||
style: 'https://tiles.openfreemap.org/styles/liberty',
|
||||
center: [2.3522, 48.8566], // Default center (Paris)
|
||||
zoom: 4
|
||||
zoom: 3
|
||||
});
|
||||
|
||||
// Add navigation controls
|
||||
|
|
|
@ -676,6 +676,13 @@ function fillForm(issueType) {
|
|||
typeSelect.value = 'unscheduled';
|
||||
break;
|
||||
|
||||
case 'traffic_mammoth':
|
||||
whatInput.value = 'traffic.mammoth';
|
||||
labelInput.value = 'Obstacle';
|
||||
descriptionInput.value = 'Circulation dense, mammouth laineux en obstacle';
|
||||
typeSelect.value = 'unscheduled';
|
||||
break;
|
||||
|
||||
// === RAIL TAB ===
|
||||
case 'rail_delay':
|
||||
whatInput.value = 'transport.rail.delay';
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
zoom: 4
|
||||
});
|
||||
map.addControl(new maplibregl.NavigationControl());
|
||||
fetch('/event?what={{ selected_what }}&limit=500')
|
||||
fetch('https://api.openeventdatabase.org/event?what={{ selected_what }}&limit=500')
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (!data.features || !data.features.length) return;
|
||||
|
|
|
@ -109,6 +109,10 @@
|
|||
<i class="fas fa-traffic-light"></i>
|
||||
Embouteillage
|
||||
</div>
|
||||
<div class="issue-button road traffic-jam" onclick="fillForm('traffic_mammoth')">
|
||||
<i class="fas fa-traffic-light"></i>
|
||||
Mammouth
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue