Skip to content

Commit

Permalink
Fixed not-found image
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSzymkowicz committed Jun 16, 2022
1 parent 52e3e62 commit 4912a27
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ QBCore.Functions.CreateCallback('mdt:server:SearchVehicles', function(source, cb

value.code = false
value.stolen = false
value.image = "img/not-found.jpg"
value.image = "img/not-found.webp"
local info = GetVehicleInformation(value.plate)
if info then
value.code = info['code5']
Expand Down Expand Up @@ -757,7 +757,7 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate)
vehicle[1]['stolen'] = info['stolen']
end

if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.jpg" end -- Image
if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.webp" end -- Image
end

TriggerClientEvent('mdt:client:getVehicleData', src, vehicle)
Expand Down
20 changes: 10 additions & 10 deletions ui/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ $(document).ready(() => {
if (gallery && gallery.length > 0) {
galleryHTML = '';
gallery.forEach(value => {
galleryHTML += `<img src="${value}" class="gallery-img" onerror="this.src='img/not-found.jpg'">`;
galleryHTML += `<img src="${value}" class="gallery-img" onerror="this.src='img/not-found.webp'">`;
})
}

Expand Down Expand Up @@ -386,7 +386,7 @@ $(document).ready(() => {
if (URL !== "") {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".gallery-inner-container").prepend(
`<img src="${URL}" class="gallery-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${URL}" class="gallery-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
$("#gallery-upload-input").val("");
$(".gallery-upload-input").slideUp(250);
Expand Down Expand Up @@ -436,7 +436,7 @@ $(document).ready(() => {
let pfp = $(".manage-profile-pic").attr("src");
let newpfp = $(".manage-profile-url-input").val();
if (newpfp.includes("base64")) {
newpfp = "img/not-found.jpg";
newpfp = "img/not-found.webp";
} else {
pfp = newpfp;
}
Expand Down Expand Up @@ -1227,7 +1227,7 @@ $(document).ready(() => {
if (URL !== "") {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".manage-incidents-evidence-holder").prepend(
`<img src="${URL}" class="incidents-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${URL}" class="incidents-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
$("#incidents-upload-input").val("");
$(".incidents-upload-input").slideUp(250);
Expand Down Expand Up @@ -1499,7 +1499,7 @@ $(document).ready(() => {
if (URL !== "") {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".bolo-gallery-inner-container").prepend(
`<img src="${URL}" class="bolo-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${URL}" class="bolo-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
$("#bolo-gallery-upload-input").val("");
$(".bolo-gallery-upload-input").slideUp(250);
Expand Down Expand Up @@ -2200,7 +2200,7 @@ $(document).ready(() => {
if (URL !== "") {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".reports-gallery-inner-container").prepend(
`<img src="${URL}" class="reports-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${URL}" class="reports-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
$("#reports-gallery-upload-input").val("");
$(".reports-gallery-upload-input").slideUp(250);
Expand Down Expand Up @@ -2611,7 +2611,7 @@ $(document).ready(() => {
let imageurl = $(".vehicle-info-image").attr("src");
let newImageurl = $(".vehicle-info-imageurl-input").val();
if (newImageurl.includes("base64")) {
imageurl = "img/not-found.jpg";
imageurl = "img/not-found.webp";
} else {
imageurl = newImageurl;
}
Expand Down Expand Up @@ -4520,7 +4520,7 @@ $(document).ready(() => {
$.each(table["gallery"], function (index, value) {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".bolo-gallery-inner-container").prepend(
`<img src="${value}" class="bolo-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${value}" class="bolo-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
});

Expand Down Expand Up @@ -4635,7 +4635,7 @@ $(document).ready(() => {
$.each(table["gallery"], function (index, value) {
let randomNum = Math.ceil(Math.random() * 10).toString();
$(".reports-gallery-inner-container").append(
`<img src="${value}" class="reports-img ${randomNum}" onerror="this.src='img/not-found.jpg'">`
`<img src="${value}" class="reports-img ${randomNum}" onerror="this.src='img/not-found.webp'">`
);
});

Expand Down Expand Up @@ -5002,7 +5002,7 @@ function searchProfilesResults(result) {
}

if (value.pp == '') {
value.pp = 'img/not-found.jpg'
value.pp = 'img/not-found.webp'
}

profileHTML += `
Expand Down
4 changes: 2 additions & 2 deletions ui/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<div class="manage-profile-save">Save</div>
</div>
<div class="manage-profile-info-container">
<img src="img/male.png" class="manage-profile-pic" onerror="this.src='img/not-found.jpg'">
<img src="img/male.png" class="manage-profile-pic" onerror="this.src='img/not-found.webp'">
<div class="manage-profile-info-inner-container">
<div class="manage-profile-citizenid">Citizen ID</div>
<div><span class="fas fa-address-card manage-cid-pic"></span><input type="text" readonly class="manage-profile-citizenid-input"></div>
Expand Down Expand Up @@ -679,7 +679,7 @@
<div class="vehicle-information-save">Save</div>
</div>
<div class="vehicle-info-stuff">
<img src="https://pbs.twimg.com/media/EYF7l2GXYAAuDZI?format=jpg&name=large" class="vehicle-info-image" onerror="this.src='img/not-found.jpg'">
<img src="https://pbs.twimg.com/media/EYF7l2GXYAAuDZI?format=jpg&name=large" class="vehicle-info-image" onerror="this.src='img/not-found.webp'">
<div class="vehicle-info-inner-container">
<div class="vehicle-info-plate">Registration Plate</div>
<div><span class="fas fa-address-card vehicle-info-icon"></span><input type="text" readonly class="vehicle-info-plate-input"></div>
Expand Down

0 comments on commit 4912a27

Please sign in to comment.