mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-06 06:13:57 +03:00
Favorite images were cut from the program and fix errors
This commit is contained in:
parent
92f3204572
commit
9949e5a87b
1 changed files with 25 additions and 32 deletions
|
@ -68,13 +68,7 @@ function wallpaperLoad(data) {
|
|||
const title = document.querySelector(".w-modal-title");
|
||||
const button = document.querySelector(".modal-footer");
|
||||
|
||||
button.innerHTML = `<lottie-player id="favorite"
|
||||
src="/static/assets/lottie/lf30_rcvcAS.json"
|
||||
background="transparent"
|
||||
speed="1">
|
||||
</lottie-player>
|
||||
<button type="button" class="btn btn-primary" id="setWallpaper">Download</button>
|
||||
`;
|
||||
button.innerHTML = `<button type="button" class="btn btn-primary" id="setWallpaper">Download</button>`;
|
||||
|
||||
const wallpaper_img = $(`img#${id}.card-img-top`);
|
||||
if (wallpaper_img && wallpaper_img.src === "http://localhost:4000/static/assets/placeholder.png") {
|
||||
|
@ -86,7 +80,6 @@ function wallpaperLoad(data) {
|
|||
}
|
||||
|
||||
const setWallpaper = document.querySelector("#setWallpaper");
|
||||
const favorite = document.querySelector("#favorite");
|
||||
|
||||
title.innerHTML = `<h5 class="modal-title">${ids[card_id]['title']}</h5>`;
|
||||
|
||||
|
@ -123,7 +116,6 @@ function wallpaperLoad(data) {
|
|||
if (ids[card_id]['copyright'] !== undefined) {
|
||||
return modale_window.innerHTML += `<p>© ${ids[card_id]['copyright']}</p>`;
|
||||
}
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if (($(window).scrollTop() > $(document).height() - $(window).height() - 100)) {
|
||||
|
@ -149,6 +141,7 @@ function wallpaperLoad(data) {
|
|||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function updateWallpaper(url) {
|
||||
|
@ -163,7 +156,7 @@ function updateWallpaper(url) {
|
|||
}
|
||||
|
||||
function notify(message) {
|
||||
if (!("Notification" in window)) return;
|
||||
if (!("Notification" in window)) return null;
|
||||
|
||||
else if (Notification.permission === "granted") {
|
||||
new Notification(message);
|
||||
|
@ -174,6 +167,6 @@ function notify(message) {
|
|||
if (permission === "granted") {
|
||||
new Notification(message);
|
||||
}
|
||||
});
|
||||
}).then(r => console.log(r));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue