Skip to content

Commit

Permalink
Merge pull request #130 from Lazap-Development/nightly
Browse files Browse the repository at this point in the history
Patch Release Candidiate v0.6.5
  • Loading branch information
p0ryae authored Mar 7, 2023
2 parents 484b3f7 + c551817 commit 34da0c9
Show file tree
Hide file tree
Showing 22 changed files with 708 additions and 1,252 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lazap",
"version": "0.6.4",
"version": "0.6.5",
"private": false,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "lazap"
version = "0.6.4"
version = "0.6.5"
description = "Lazap Launcher"
authors = ["Lazap-Development"]
license = ""
license = "CC BY-NC-SA 4.0"
repository = "https://github.com/Lazap-Development/lazap"
default-run = "lazap"
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "Lazap",
"version": "0.6.4"
"version": "0.6.5"
},
"tauri": {
"systemTray": {
Expand Down Expand Up @@ -116,7 +116,7 @@
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDFDMkMwNDVFQTJENDU3QUEKUldTcVY5U2lYZ1FzSE9FcXUyNzZ2Y1RiSkk1VnhXcEo3Tmg3M1F1aWVFWUV5bUZGUkQ2N2ZSS3gK",
"windows": {
"installMode": "quiet"
"installMode": "passive"
}
},
"windows": [
Expand Down
86 changes: 34 additions & 52 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@
<div class="bg" id="bg">
<div class="homebox" id="home">
<div class="children fadeInUp">
<img
class="head-pic"
src="./assets/img/main-banner.png"
id="head-pic"
/>
<img class="head-pic" src="./assets/img/main-banner.png" id="head-pic" />
</div>
<div class="children fadeInDown">
<div class="jump-back">
<p>Recently Launched</p>
<div
id="recentGamesListMainPage"
class="fadeInDown mainPageGamesList"
>
<div id="recentGamesListMainPage" class="fadeInDown mainPageGamesList">
</div>
</div>
</div>
Expand Down Expand Up @@ -181,19 +174,14 @@ export default {
.catch((err) => {
return console.error(err);
});
const gamesdata = await this.$refs.findGamesMod
.getGames()
.catch((err) => {
return console.error(err);
});
await this.$refs.findGamesMod
.loadGames("recentGamesListMainPage", allGames, gamesdata)
.loadGames("recentGamesListMainPage", allGames)
.catch((err) => {
return console.error(err);
});
await this.$refs.findGamesMod
.loadGames("recentGamesList", allGames, gamesdata)
.loadGames("recentGamesList", allGames)
.catch((err) => {
return console.error(err);
});
Expand All @@ -203,7 +191,7 @@ export default {
return console.error(err);
});
await this.$refs.findGamesMod
.loadGames("favGamesList", allGames, gamesdata)
.loadGames("favGamesList", allGames)
.catch((err) => {
return console.error(err);
});
Expand Down Expand Up @@ -298,9 +286,9 @@ export default {
.remove();
setTimeout(
() =>
(document.getElementById(
"removeGame"
).parentNode.parentNode.style = ""),
(document.getElementById(
"removeGame"
).parentNode.parentNode.style = ""),
200
);
});
Expand Down Expand Up @@ -676,7 +664,7 @@ body {
margin-bottom: 30px;
text-align: center;
display: inline-block;
border-radius: 0 0 10px 10px;
margin-right: 10px;
margin-left: 20px;
height: 280px;
Expand Down Expand Up @@ -710,13 +698,11 @@ body {
border-radius: 12px;
image-rendering: auto;
object-fit: cover;
mask-image: -webkit-gradient(
linear,
left 70%,
left bottom,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0))
);
mask-image: -webkit-gradient(linear,
left 70%,
left bottom,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0)));
content: url("./assets/img/default-game-banner.png");
}
Expand Down Expand Up @@ -778,13 +764,11 @@ body {
opacity: 0.3;
border: solid var(--accentColor) 6px;
background-color: var(--accentColor);
mask-image: -webkit-gradient(
linear,
right 90%,
left top,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0))
);
mask-image: -webkit-gradient(linear,
right 90%,
left top,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0)));
}
.placeholderGames:nth-last-child(-n + 4) {
Expand Down Expand Up @@ -1022,8 +1006,7 @@ img,
height: 25px;
width: 25px;
display: flex;
filter: invert(12%) sepia(78%) saturate(4656%) hue-rotate(1deg)
brightness(108%) contrast(128%);
filter: invert(12%) sepia(78%) saturate(4656%) hue-rotate(1deg) brightness(108%) contrast(128%);
}
.alert-box-cross {
Expand All @@ -1037,8 +1020,7 @@ img,
}
.alert-box-cross:hover {
filter: invert(21%) sepia(70%) saturate(3776%) hue-rotate(255deg)
brightness(97%) contrast(101%);
filter: invert(21%) sepia(70%) saturate(3776%) hue-rotate(255deg) brightness(97%) contrast(101%);
}
.alert-box-divider {
Expand Down Expand Up @@ -1123,14 +1105,14 @@ img,
display: none;
}
.switch input + div {
.switch input+div {
margin-top: -41px;
margin-left: 280px;
position: relative;
}
.switch input + div:before,
.switch input + div:after {
.switch input+div:before,
.switch input+div:after {
--s: 1;
content: "";
position: absolute;
Expand All @@ -1142,26 +1124,26 @@ img,
transition: transform var(--duration) ease;
}
.switch input + div:before {
.switch input+div:before {
--s: 0;
left: 0;
transform-origin: 0 50%;
border-radius: 2px 0 0 2px;
}
.switch input + div:after {
.switch input+div:after {
left: 28px;
transform-origin: 100% 50%;
border-radius: 0 2px 2px 0;
}
.switch input + div span {
.switch input+div span {
padding-left: 56px;
line-height: 24px;
color: var(--text);
}
.switch input + div span:before {
.switch input+div span:before {
--x: 0;
--b: var(--circle);
--s: 4px;
Expand All @@ -1177,19 +1159,19 @@ img,
transition: box-shadow var(--duration) ease, transform var(--duration) ease;
}
.switch input + div span:not(:empty) {
.switch input+div span:not(:empty) {
padding-left: 64px;
}
.switch input:checked + div:before {
.switch input:checked+div:before {
--s: 1;
}
.switch input:checked + div:after {
.switch input:checked+div:after {
--s: 0;
}
.switch input:checked + div span:before {
.switch input:checked+div span:before {
--x: 28px;
--s: 12px;
--b: var(--dot);
Expand All @@ -1202,8 +1184,7 @@ img,
.repeatButton {
height: 40px;
width: 40px;
filter: invert(100%) sepia(6%) saturate(0%) hue-rotate(115deg)
brightness(108%) contrast(108%);
filter: invert(100%) sepia(6%) saturate(0%) hue-rotate(115deg) brightness(108%) contrast(108%);
}
.repeatButton:hover {
Expand Down Expand Up @@ -1315,6 +1296,7 @@ img,
}
@keyframes shake {
10%,
90% {
transform: translate3d(-1px, 0, 0);
Expand Down
Binary file added src/assets/icons/CustomGame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/EpicGames.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Lunar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Lutris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Minecraft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/RiotGames.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Rockstar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Steam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/Uplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/XboxGames.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/icons/icon.png
Binary file not shown.
Binary file removed src/assets/icons/luris.ico
Binary file not shown.
53 changes: 16 additions & 37 deletions src/components/AllGames.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,42 +66,28 @@ export default {
(await path.appDir()) + `cache/games/banners/newcustombanner.png`,
fileContent: [...new Uint8Array(reader.result)],
});
document.getElementById(
"addGameCustomBannerOutput"
).style.backgroundImage =
`url(` +
tauri.convertFileSrc(
(await path.appDir()) + `cache/games/banners/newcustombanner.png`
) +
`?${new Date().getSeconds()}` +
`)`;
document.getElementById("addGameCustomBannerOutput").style.backgroundImage =
`url(${tauri.convertFileSrc((await path.appDir()) + 'cache/games/banners/newcustombanner.png')}?${new Date().getSeconds()})`;
};
document.getElementById("addGameCustomBannerTxt").style.opacity = "0";
reader.readAsArrayBuffer(selectedFile);
},
},
async mounted() {
const appDir = await path.appDir();
let newGameLocation;
let createGameElement = this.$root.$refs.findGamesMod.createGameElement;
document
.getElementById("addGameBtn")
document.getElementById("addGameBtn")
.addEventListener("click", async function () {
if (
window.getComputedStyle(document.getElementById("addGamePopUp"))
.display === "flex"
) {
document.getElementById(
"addGameCustomBannerOutput"
).style.backgroundImage = "url()";
if (window.getComputedStyle(document.getElementById("addGamePopUp")).display === "flex") {
document.getElementById("addGameCustomBannerOutput").style.backgroundImage = "url()";
document.getElementById("addGamePopUp").style.display = "none";
document.getElementById("inputGameName").value = "";
document.getElementById("addGameCustomBannerTxt").style.opacity = "1";
try {
await invoke("remove_file", {
file_path:
(await path.appDir()) +
`cache/games/banners/newcustombanner.png`,
file_path: `${appDir}cache/games/banners/newcustombanner.png`,
});
} catch (e) {
return e;
Expand All @@ -112,13 +98,9 @@ export default {
}
});
document
.getElementById("addGameFinalBtn")
document.getElementById("addGameFinalBtn")
.addEventListener("click", async function () {
if (
document.getElementById("inputGameName").value.trim().length > 0 &&
newGameLocation
) {
if (document.getElementById("inputGameName").value.trim().length > 0 && newGameLocation) {
let scheme = {
DisplayName: document.getElementById("inputGameName").value,
LauncherName: "CustomGame",
Expand All @@ -131,11 +113,9 @@ export default {
try {
await invoke("rename_file", {
from:
(await path.appDir()) +
`cache/games/banners/newcustombanner.png`,
`${appDir}cache/games/banners/newcustombanner.png`,
to:
(await path.appDir()) +
`cache/games/banners/${await invoke("sha256", {
`${appDir}cache/games/banners/${await invoke("sha256", {
content: document
.getElementById("inputGameName")
.value.replaceAll(" ", "_"),
Expand All @@ -144,24 +124,24 @@ export default {
createGameElement(scheme, "allGamesList");
let data = JSON.parse(
await invoke("read_file", {
filePath: (await path.appDir()) + "cache/games/data.json",
filePath: `${appDir}cache/games/data.json`,
})
);
data.push(scheme);
await invoke("write_file", {
filePath: (await path.appDir()) + "cache/games/data.json",
filePath: `${appDir}cache/games/data.json`,
fileContent: JSON.stringify(data),
});
} catch (e) {
createGameElement(scheme, "allGamesList");
let data = JSON.parse(
await invoke("read_file", {
filePath: (await path.appDir()) + "cache/games/data.json",
filePath: `${appDir}cache/games/data.json`,
})
);
data.push(scheme);
await invoke("write_file", {
filePath: (await path.appDir()) + "cache/games/data.json",
filePath: `${appDir}cache/games/data.json`,
fileContent: JSON.stringify(data),
});
}
Expand All @@ -187,8 +167,7 @@ export default {
}
});
document
.getElementById("addGameLocation")
document.getElementById("addGameLocation")
.addEventListener("click", async function () {
const selected = await dialog.open({
multiple: false,
Expand Down
Loading

0 comments on commit 34da0c9

Please sign in to comment.