Skip to content

Commit

Permalink
fix: cache icon problem solved
Browse files Browse the repository at this point in the history
  • Loading branch information
YakupAltay committed Sep 25, 2023
1 parent fb7595a commit 5a965bd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const updateHeader = () => {
imgSrc = "assets/default.png";
document.querySelector(".header-menu-ip-list-button-icon").style.display = "none";
} else {
imgSrc = all_projects.find(item => item.project.name == currentIp.icon).project.image;
imgSrc = all_projects.find(item => item.project.name == currentIp.icon).project.image + "?" + new Date().getTime();
document.querySelector(".header-menu-ip-list-button-icon").style.display = "unset";
document.querySelector(".header-menu-ip-list-button-icon").src = imgSrc;
};
Expand Down
2 changes: 1 addition & 1 deletion src/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const installNode = async (project) => {
exception = all_projects.find(item => item.project.name == currentIp.icon)?.project.identifier;

endInstallationButton.style.display = "none";
installationInfoIcon.src = project.image;
installationInfoIcon.src = project.image + "?" + new Date().getTime();
installationInfoTitle.textContent = project.name;
progressBar.className = "progress-bar progress-bar-loading";
progressBarTextLeft.textContent = "Installing...";
Expand Down
4 changes: 2 additions & 2 deletions src/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const loadOnboardingLoginPage = async (project) => {
document.querySelector(".onboarding-page-back-button").addEventListener("click", (e) => {
e.preventDefault();
loadHomePage();
}); document.querySelector(".onboarding-page-project-icon").src = project.project.image;
}); document.querySelector(".onboarding-page-project-icon").src = project.project.image + "?" + new Date().getTime();
document.querySelector(".onboarding-page-project-details-heading").textContent = project.project.name;
document.querySelector(".onboarding-page-project-description").textContent = project.project.description;
const systemRequirements = ["cpu", "ram", "storage", "os"];
Expand Down Expand Up @@ -227,7 +227,7 @@ const setupLoginPage = () => {
});
img = document.createElement("img");
img.setAttribute("class", "each-autocomplete-item-icon");
img.setAttribute("src", all_projects.find(item => item.project.name == ipAddresses[i].icon) ? all_projects.find(item => item.project.name == ipAddresses[i].icon).project.image : "assets/default.png");
img.setAttribute("src", all_projects.find(item => item.project.name == ipAddresses[i].icon) ? all_projects.find(item => item.project.name == ipAddresses[i].icon).project.image + "?" + new Date().getTime() : "assets/default.png");
div1 = document.createElement("div");
div1.textContent = ipAddresses[i].icon;
div2 = document.createElement("div");
Expand Down
2 changes: 1 addition & 1 deletion src/node-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const changePage = async (page, callback) => {
};
};
const updateSidebar = async () => {
document.querySelector(".sidebar-info-icon").setAttribute("src", currentIp.icon ? all_projects.find(item => item.project.name == currentIp.icon).project.image : "assets/default.png");
document.querySelector(".sidebar-info-icon").setAttribute("src", currentIp.icon ? all_projects.find(item => item.project.name == currentIp.icon).project.image + "?" + new Date().getTime() : "assets/default.png");
document.querySelector(".sidebar-info-details-name").textContent = currentIp.icon;
document.querySelector(".sidebar-info-details-chain-id").textContent = await tauri.invoke("get_chain_id").then((res) => { return JSON.parse(res).chain_id; });
document.querySelector(".sidebar-info-details-copy").setAttribute("style", currentIp.validator_addr ? "display: flex;" : "display: none;");
Expand Down

0 comments on commit 5a965bd

Please sign in to comment.