Add GitHub update check

This commit is contained in:
2026-03-10 21:40:39 +01:00
parent c93e930286
commit eb923a0c57
7 changed files with 97 additions and 4 deletions

View File

@@ -58,6 +58,10 @@
<!-- Main content -->
<main class="content">
<div class="banner-div" id="banner-div">
<p id="banner-text"></p>
<button class="default-button square-button" onclick="hideBanner()">X</button>
</div>
<h1 id="title">Silk Fly Launcher</h1>
<div class="view" id="view"></div>
<div class="toast-div" id="toast-div"></div>

View File

@@ -739,6 +739,23 @@ function showToast(message, type = "info", duration = 3000) {
electronAPI.onShowToast(showToast);
function showBanner(message) {
const bannerDiv = document.getElementById("banner-div");
const bannerText = document.getElementById("banner-text");
console.log(bannerDiv);
bannerText.innerHTML = message;
bannerDiv.classList.add("show");
}
electronAPI.onShowBanner(showBanner);
function hideBanner() {
const bannerDiv = document.getElementById("banner-div");
bannerDiv.classList.remove("show");
}
function changeModsPage(offsetChange) {
if (oldPage == "mods-installed") {
if (offsetChange == "min") {

View File

@@ -447,3 +447,19 @@ body {
.long-text {
overflow-wrap: anywhere;
}
.banner-div {
display: none;
align-items: center;
justify-content: space-between;
border: 1px solid var(--secondary-color);
background: var(--primary-color);
margin-bottom: 20px;
height: 64px;
border-radius: 12px;
padding: 10px;
}
.banner-div.show {
display: flex;
}