Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zeankundev committed Nov 9, 2022
1 parent a93cc14 commit 950434c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graycrown",
"version": "1.1.65",
"version": "1.1.66",
"description": "a simple game launcher",
"homepage": "https://gray-crown.web.app",
"type": "commonjs",
Expand Down
17 changes: 9 additions & 8 deletions script/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ const minimizeWin = () => {
const maximizeWin = () => {
const win = getWin();
win.isMaximized() ? win.unmaximize() : win.maximize();
if (win.isMaximized() == false) imageToggle.setAttribute("src", "../assets/maximize_1024.png");
else imageToggle.setAttribute("src", "../assets/restore_down_1024.png")
win.isMaximized() ? imageToggle.setAttribute("src", "../assets/restore_down_1024.png") : imageToggle.setAttribute("src", "../assets/maximize_1024.png")
}
minimize.addEventListener('click', minimizeWin);
maximize.addEventListener('click', maximizeWin);
Expand Down Expand Up @@ -254,7 +253,7 @@ openMenu(event, 'home')
gameDisplay.className = "game-display";
gameDisplay.innerHTML = `
<img style="width: 48px !important; height:48px !important; border-radius:15px;" src="${game.icon}">
<div class="game-title">${game.name.slice(0, 16) + (game.name.length > 18 ? '...' : '')}</div>
<div class="game-title">${game.name.slice(0, 15) + (game.name.length > 15 ? '...' : '')}</div>
`;
let secElapsed = document.createElement("p")
secElapsed.style.display = 'none';
Expand Down Expand Up @@ -324,7 +323,7 @@ openMenu(event, 'home')
});
})
.catch((e) => {
throw new Error("GRAYCROWN_JSON_DAEMON: Hey! You can't do that! You are deleting the core of Graycrown! Reinstall Graycrown to fix this problem, or restart Graycrown.")
throw new Error("GRAYCROWN_JSON_DAEMON: Hey! You can't do that! You are deleting the core of Graycrown! Reinstall Graycrown to fix this problem, or restart Graycrown.");
notifDisplay("You are deleting the core data of Graycrown! Reinstall or restart the entire app to fully fix this problem.", "That's illegal!")
})
}
Expand Down Expand Up @@ -376,7 +375,7 @@ openMenu(event, 'home')
recommendDisplay.title = items.info;
recommendDisplay.innerHTML = `
<img style="width: 48px !important; height:48px !important; border-radius:15px;" src="${items.banner}">
<div class="store-title">${items.name.slice(0, 18) + (items.name.length > 18 ? '...' : '')}</div>
<div class="store-title">${items.name.slice(0, 16) + (items.name.length > 16 ? '...' : '')}</div>
`;
let startBtn = document.createElement("button");
startBtn.className = "download";
Expand All @@ -395,7 +394,7 @@ openMenu(event, 'home')
})
}
function fetchStores() {
fetch('../test/Store.json')
fetch('https://zeankundev.github.io/cdn/Store.json')
.then(response => response.json())
.then(data => {
let storeList = document.getElementById("store-list");
Expand All @@ -405,7 +404,7 @@ openMenu(event, 'home')
storeDisplay.className = "store-display";
storeDisplay.innerHTML = `
<div class="store-title">${store.name}</div>
<div class="store-description">${store.summary}</div>
<div class="store-description">${store.summary.slice(0, 25) + (store.summary.length > 25 ? '...' : '')}</div>
`;
let downButton = document.createElement("button");
downButton.className = "download";
Expand Down Expand Up @@ -460,7 +459,9 @@ openMenu(event, 'home')
storeDisplay.appendChild(downButton);
storeList.appendChild(storeDisplay);
});
});
}).catch((e) => {
notifDisplay('Cannot fetch store JSON file. Maybe the server is down or check your internet connection', e)
})
}
function spawnWine(processType) {
const spawn = require('child_process').spawn;
Expand Down
2 changes: 2 additions & 0 deletions views/css/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* {
margin: 0;
overflow: hidden;
cursor: url('../../assets/default.png'), default;
}
@-webkit-keyframes slide-bottom {
0% {
Expand Down Expand Up @@ -115,6 +116,7 @@ reg-head {
display: flex;
flex-direction: row;
background: var(--main-color);
cursor: url('../../assets/default.png'), default;
color: var(--main-text);
/*-webkit-app-region: drag;*/
}
Expand Down
4 changes: 2 additions & 2 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<button class="tab" onclick="openMenu(event, 'store'); fetchStores()" id="store-tab"><img src="../assets/news_1024.png"></button>
<button class="tab" onclick="openMenu(event, 'settings')" id="settings-tab"><img src="../assets/settings_1024.png"></button>
<button class="tab" style="display: none;" onclick="openMenu(event, 'minesweeper')" id="minesweeper-tab"><img src="../assets/minesweeper_1024.png"></button>
<div style="display: flex; -webkit-app-region: drag; flex-grow: 1;"></div>
<div style="display: flex; -webkit-app-region: drag; flex-grow: 1; cursor: url('../assets/default.png'), default !important;"></div>
<ul class="navbars">
<button class="navbutton" id="secret"></button>
<button class="navbutton" id="add"><img src="../assets/close_1024.png" style="transform: rotate(45deg);"></button>
Expand Down Expand Up @@ -162,4 +162,4 @@ <h1>Add a game</h1>
<script src="../script/main.js"></script>
<script src="../script/minesweeper.js"></script>
</body>
</html>
</html>

0 comments on commit 950434c

Please sign in to comment.