mirror of
https://github.com/Gabi-Zar/Silk-Fly-Launcher.git
synced 2026-04-17 05:26:04 +02:00
Add GitHub update check
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user