Compare commits
No commits in common. "65358394020c601ca92bea2055701308f42064ea" and "d6e7b75354d6396c881e823af391400cd06f6788" have entirely different histories.
6535839402
...
d6e7b75354
@ -28,7 +28,6 @@ files {
|
|||||||
'nui/script.js',
|
'nui/script.js',
|
||||||
'nui/vue.js',
|
'nui/vue.js',
|
||||||
'nui/fonts/*.*',
|
'nui/fonts/*.*',
|
||||||
'nui/vehicle_images.js',
|
|
||||||
'nui/images/*.*',
|
'nui/images/*.*',
|
||||||
'nui/images/logo/*.*',
|
'nui/images/logo/*.*',
|
||||||
'nui/images/cars/*.*',
|
'nui/images/cars/*.*',
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@ -314,50 +314,7 @@
|
|||||||
|
|
||||||
</div><!-- /#app -->
|
</div><!-- /#app -->
|
||||||
|
|
||||||
<script>
|
<script src="vehicle_images.js"></script>
|
||||||
// ═══════════════════════════════════════════════════════════════
|
|
||||||
// MercyV Garage – Fahrzeugbilder Konfiguration
|
|
||||||
// Modellname → Bild-URL (lokal oder extern)
|
|
||||||
//
|
|
||||||
// Beispiele:
|
|
||||||
// 'police3': 'images/cars/police3.png' (lokale Datei)
|
|
||||||
// 'ambulance': 'https://example.com/amb.png' (externe URL)
|
|
||||||
// 'gbpolbisonhf': 'images/cars/gbpolbisonhf.png'
|
|
||||||
// ═══════════════════════════════════════════════════════════════
|
|
||||||
|
|
||||||
const VehicleImages = {
|
|
||||||
// ── Polizei ───────────────────────────────────────────────
|
|
||||||
'police': 'images/cars/police.png',
|
|
||||||
'police2': 'images/cars/police2.png',
|
|
||||||
'police3': 'images/cars/police3.png',
|
|
||||||
'police4': 'images/cars/police4.png',
|
|
||||||
'gbpolbisonhf': 'images/cars/gbpolbisonhf.png',
|
|
||||||
'gbpolbisonstx': 'images/cars/gbpolbisonstx.png',
|
|
||||||
|
|
||||||
// ── Ambulanz ──────────────────────────────────────────────
|
|
||||||
'ambulance': 'images/cars/ambulance.png',
|
|
||||||
'frogger': 'images/cars/frogger.png',
|
|
||||||
|
|
||||||
// ── Eigene Fahrzeuge (hier ergänzen) ──────────────────────
|
|
||||||
// 'meinauto': 'images/cars/meinauto.png',
|
|
||||||
};
|
|
||||||
|
|
||||||
// Standardbild wenn kein Eintrag gefunden
|
|
||||||
const DefaultVehicleImage = 'images/defaultimage.png';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gibt die Bild-URL für ein Fahrzeugmodell zurück.
|
|
||||||
* Sucht zuerst nach dem Modellnamen, dann nach dem Anzeigenamen (displayName).
|
|
||||||
*/
|
|
||||||
function getVehicleImage(modelname, displayName) {
|
|
||||||
const model = (modelname || '').toLowerCase().trim();
|
|
||||||
const display = (displayName || '').toLowerCase().trim();
|
|
||||||
return VehicleImages[model]
|
|
||||||
|| VehicleImages[display]
|
|
||||||
|| DefaultVehicleImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script src="script.js"></script>
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -67,15 +67,6 @@ const app = new Vue({
|
|||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
getVehicleImage(modelname, carimage) {
|
|
||||||
if (typeof VehicleImages !== 'undefined') {
|
|
||||||
return getVehicleImage(modelname, carimage);
|
|
||||||
}
|
|
||||||
var model = (modelname || '').toLowerCase().trim();
|
|
||||||
var display = (carimage || '').toLowerCase().trim();
|
|
||||||
return 'images/cars/' + (model || display || 'default') + '.png';
|
|
||||||
},
|
|
||||||
|
|
||||||
parkFromPanel() {
|
parkFromPanel() {
|
||||||
if (!this.selectedVehicle || !this.selectedVehicle.nearby) return;
|
if (!this.selectedVehicle || !this.selectedVehicle.nearby) return;
|
||||||
$.post(`https://${GetParentResourceName()}/parkFromPanel`, JSON.stringify({ plate: this.selectedVehicle.plate }));
|
$.post(`https://${GetParentResourceName()}/parkFromPanel`, JSON.stringify({ plate: this.selectedVehicle.plate }));
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
[mercyv]
2
[mercyv]
@ -1 +1 @@
|
|||||||
Subproject commit 8ab63766763c990d41a5b38d4b21638ca45aff80
|
Subproject commit fb58059168cf0013f488088909c6c805af3ddbfa
|
||||||
Loading…
x
Reference in New Issue
Block a user