Skip to content

Commit

Permalink
Unleash the update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobuxstation committed Jul 8, 2023
1 parent 5cfe7c0 commit 609cc06
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 50 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qrocrown",
"version": "1.2.5",
"version": "1.2.6",
"description": "An enhanced Qrodex game launcher",
"homepage": "http://qrodex.2kool4u.net",
"type": "commonjs",
Expand Down
61 changes: 39 additions & 22 deletions script/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ function getGames() {
if (data.games.length === 0) {
gameList.innerHTML = "You do not have any games. Get some games!"
document.getElementById("home-list").innerHTML = "You do not have any games. Get some games!"
document.getElementById("home-list").style.paddingTop = 'calc(180px/2)'
document.getElementById("home-list").style.paddingBottom = 'calc(180px/2)'
document.getElementById("home-list").style.paddingLeft = '10px'
}
else {
data.games.forEach(game => {
Expand Down Expand Up @@ -606,30 +609,9 @@ function recommendGames() {
fetch(data.config.custom)
.then(res => res.json())
.then(data => {
let rec = document.getElementById('recommend-list');
let rec2 = document.getElementById('recommend-2');
rec.innerHTML = '';
rec2.innerHTML = '';
data.items.forEach(items => {
let recommendDisplay = document.createElement('div');
recommendDisplay.className = 'recommend-display';
recommendDisplay.setAttribute('style', `background: url('${items.banner}') no-repeat; background-size: cover;`)
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, 16) + (items.name.length > 16 ? '...' : '')}</div>
`;
let startBtn = document.createElement("button");
startBtn.className = "download";
startBtn.innerHTML = 'Play';
startBtn.onclick = function () {
buttonClick.play();
if (items.preview !== '') spw(items.name, items.banner, items.info, items.developer, items.feed, items.preview)
else notifDisplay('Error 407: Missing link argument in JSON file', 'Failed to launch!')
}
recommendDisplay.appendChild(startBtn)
rec.appendChild(recommendDisplay)
})

data.items.forEach(items => {
let recommendDisplay = document.createElement('div');
recommendDisplay.className = 'recommend-display';
Expand All @@ -650,6 +632,41 @@ function recommendGames() {
recommendDisplay.appendChild(startBtn)
rec2.appendChild(recommendDisplay)
})

async function fetchExternalGames() {
let fetchJSON = await fetch('https://emupedia.net/beta/emuos/assets/data/desktop.json');
let data = await fetchJSON.json();

data.icons.forEach(items => {
if (items.title == "External Website") return 0;

let recommendDisplay = document.createElement('div');
recommendDisplay.className = 'recommend-display';
recommendDisplay.setAttribute('style', `background: url('https://emupedia.net/beta/emuos/${items.icon}.ico') no-repeat; background-size: cover;`)
recommendDisplay.title = items.info;
recommendDisplay.innerHTML = `
<img style="width: 48px !important; height:48px !important; border-radius:15px;" src="https://emupedia.net/beta/emuos/${items.icon}.ico">
<div class="store-title">${items.name.slice(0, 16) + (items.name.length > 16 ? '...' : '')}</div>
`;
let startBtn = document.createElement("button");
startBtn.className = "download";
startBtn.innerHTML = 'Play';
startBtn.onclick = function () {
buttonClick.play();
if (items.link.includes('https')) {
extgameURL = `${items.link}`
} else {
extgameURL = `https://emupedia.net${items.link}`
}
if (items.preview !== '') spw(items.name, `https://emupedia.net/beta/emuos/${items.icon}.ico`, 'Game from third party provider. (emupedia.net)', 'emupedia.net', 'false', extgameURL)
else notifDisplay('Error 407: Missing link argument in JSON file', 'Failed to launch!')
}
recommendDisplay.appendChild(startBtn)
rec2.appendChild(recommendDisplay)
})
}

fetchExternalGames()
}).catch(function (e) {
console.log(e);
document.getElementById('e').style.display = 'block';
Expand Down
2 changes: 1 addition & 1 deletion views/child.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<button class="navbutton" id="back"><img src="../assets/new_icons/ic_fluent_arrow_left_24_regular.svg"></button>
<button class="navbutton" id="forward"><img src="../assets/new_icons/ic_fluent_arrow_right_24_regular.svg"></button>
<button class="navbutton" id="refresh"><img id="ref" src="../assets/new_icons/ic_fluent_arrow_clockwise_24_regular.svg"></button>
<div style="vertical-align: middle; padding-top: 11px;">
<div style="vertical-align: middle; padding-top: 18px;">
<p id="title">Hello world</p>
</div>
<div style="display: flex; -webkit-app-region: drag; flex-grow: 1;"></div>
Expand Down
46 changes: 37 additions & 9 deletions views/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@
}

::-webkit-scrollbar-track {
background: #1d1d1d;
border: 0px none #ffffff;
border-radius: 50px;
}
Expand All @@ -224,6 +223,7 @@ body {
font-family: 'Segoe UI Variable Display', system-ui, 'Noto Sans Arabic';
-webkit-font-smoothing: antialiased;
user-select: none;
background: var(--main-color);
}

reg-head {
Expand Down Expand Up @@ -378,7 +378,7 @@ img {
}

.tab {
padding: 12px;
padding: 10px;
-webkit-appearance: none;
border: none;
outline: var(--main-text);
Expand All @@ -388,7 +388,8 @@ img {
color: var(--main-text);
background: none;
min-height: 47px;
border-radius: 10px 10px 0px 0px;
border-radius: 10px;
margin: 5px;
}

.tab strong {
Expand All @@ -399,6 +400,7 @@ img {
.active {
background-color: var(--main-hover-color);
transition: all 0.3s ease-in-out;
border: var(--main-selected-disabled-color) solid 1px;
}

.container {
Expand All @@ -418,10 +420,14 @@ img {
outline: none;
border: none;
background: none;
/* border-radius: 10px; */
border-radius: 10px !important;
/* margin: 5px; */
/* height: 30px; */
/* width: 30px; */
height: 47px !important;
width: 47px !important;
margin: 5px;
padding-top: 14px;
padding-bottom: 10px;
box-sizing: border-box !important;
}

.navbars-mac {
Expand All @@ -448,11 +454,13 @@ img {
position: relative;
/* align-self: center; */
transform: translateY(30px);
left: calc(350px - 120pt);
left: 25vw;
animation: notif-popup 0.5s ease-out;
padding: 15px;
border-radius: 15px;
display: none;
border: var(--main-selected-disabled-color) solid 1px;
width: 50vw;
}

@keyframes notif-popup {
Expand Down Expand Up @@ -480,6 +488,7 @@ h5 {

.navbutton:hover {
background: var(--main-hover-color) !important;
box-sizing: border-box;
}

.container {
Expand All @@ -489,6 +498,11 @@ h5 {
left: 0;
bottom: 0;
z-index: -1;
margin: 5px;
border-radius: 10px !important;
box-sizing: border-box;
margin-top: 10px;
border: var(--main-selected-disabled-color) solid 1px;
}

object,
Expand All @@ -506,6 +520,7 @@ iframe {
padding: 12px;
font-family: 'Segoe UI Variable Display', system-ui, 'Noto Sans Arabic';
cursor: url('../../assets/pointer.png'), auto;
border: var(--main-selected-disabled-color) solid 1px;
}

.button:hover {
Expand All @@ -523,6 +538,7 @@ iframe {
background-size: cover;
display: inline-block;
border-radius: 25px;
border: var(--main-selected-disabled-color) solid 1px;
}

.game-display p {
Expand All @@ -537,6 +553,8 @@ iframe {
font-size: 15pt;
outline: none;
font-family: 'Segoe UI Variable Small', system-ui;
border: var(--main-selected-disabled-color) solid 1px;
border-radius: 2px;
}

.login {
Expand Down Expand Up @@ -651,6 +669,7 @@ a {
padding: 10px;
display: inline-block;
border-radius: 25px;
border: var(--main-selected-disabled-color) solid 1px;
}

.recommend-display {
Expand All @@ -662,6 +681,7 @@ a {
animation: scale-down-center 0.2s ease-in-out;
display: inline-block;
border-radius: 25px;
border: var(--main-selected-disabled-color) solid 1px;
}

.store-title {
Expand Down Expand Up @@ -690,12 +710,18 @@ a {
}

.game-info {
background-color: rgba(0, 0, 0, 1);
background-color: rgba(0, 0, 0, .8);
background-size: contain;
background-blend-mode: multiply;
animation: slide-in-blurred-right 0.5s ease-in-out both;
display: block;
min-height: 100vh;
overflow-y: scroll;
margin: 5px;
box-sizing: border-box;
margin-top: 0;
border-radius: 10px;
border: var(--main-selected-disabled-color) solid 1px;
}

.info {
Expand Down Expand Up @@ -727,11 +753,13 @@ a {
animation: slide-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
position: absolute;
top: 3%;
left: 40%;
left: 25vw;
padding: 10px;
border-radius: 15px;
z-index: 9;
border: var(--main-selected-disabled-color) solid 1px;
align-items: center;
width: 50vw;
}

select,
Expand Down
29 changes: 12 additions & 17 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ <h1 id="welcome-back">Play HorangHill</h1>
<h1 id="store-text">Store (WIP)</h1>
<button class="button" onclick="fetchStores();" id="refresh-store" style="display: none;">Refresh
Store</button>
<div id="store-list"></div>
<h1 id="rec-for-u">Instant Games</h1>
<div id="recommend-list">
<br>
<div id="e" style="display: none; text-align: center;">
<div id="store-list">
<center>
<img src="../assets/nointernet.svg" style="width: 150px !important;">
<br>
<br>
Expand All @@ -124,9 +121,9 @@ <h1 id="internet-discon">Internet disconnected 😥</h1>
<span id="l2">your internet, then click the button to refresh! 😉</span>
<br>
<br>
<button class="button" onclick="recommendGames(cus)" id="retry-internet">Click me if you are
<button class="button" onclick="fetchStores()" id="retry-internet">Click me if you are
done! 😉</button>
</div>
</center>
</div>
</div>
</div>
Expand Down Expand Up @@ -181,6 +178,9 @@ <h1>Acknowledgements</h1>
<p>Add Game Code taken from <a
href="https://github.com/Bobuxstation/Coal-Launcher/blob/5c9f3a33a5dff4a5b2635e82d5dfe117baaf0ceb/add.html#L44"
target="_blank">coal-Launcher</a> and taken with permission.</p>
<p>Some instant games are obtained from <a
href="https://emupedia.net/beta/emuos/"
target="_blank">emupedia's EmuOS</a>.</p>
</div>
</div>
<div id="minesweeper" class="tabcontent">
Expand Down Expand Up @@ -288,20 +288,15 @@ <h1>Add a game</h1>
<span class="close" id="close-modal-add">&times;</span>
<br>
<div id="add-in-form">
<label for="name">Game name: </label>
<input id="name" type="text" class="text" />
<input id="name" type="text" placeholder="Game Name" class="text" />
<br>
<label for="id">Game ID: </label>
<input id="id" type="text" class="text" />
<input id="id" type="text" placeholder="Game ID" class="text" />
<br>
<label for="icon">Icon: </label>
<input id="icon" type="text" class="text" />
<input id="icon" type="text" placeholder="Icon" class="text" />
<br>
<label for="exec">Game executable: </label>
<input id="exec" type="text" class="text" />
<input id="exec" type="text" placeholder="Game executable" class="text" />
<br>
<label for="env">Environment variables: </label>
<input id="env" type="text" class="text" />
<input id="env" type="text" placeholder="Environment variables" class="text" />
<br>
<input type="checkbox" id="is-wine">
<label for="is-wine"> Is it a Wine game?</label>
Expand Down

0 comments on commit 609cc06

Please sign in to comment.