Skip to content

Commit

Permalink
Merge pull request #26 from Lazap-Development/nightly
Browse files Browse the repository at this point in the history
Release v0.2 (Bug Fixes, New Feature introduction & massive changes)
  • Loading branch information
p0ryae authored Feb 7, 2022
2 parents 1833e9b + fc1c682 commit 6a68691
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 82 deletions.
1 change: 1 addition & 0 deletions Constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"disableHardwareAcceleration": false,
"skipLogin": false,
"trayMinLaunch": true,
"trayMinQuit": true,
"checkForUpdates": true
},
"defaultUserprofileData": {
Expand Down
Binary file removed img/EAappInstaller.exe
Binary file not shown.
Binary file removed img/gta-3-definitive-edition-wallpaper.jpg
Binary file not shown.
61 changes: 37 additions & 24 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ rpcClient.login({ clientId: '932504287337148417' });
handleHardwareAcceleration();

let tray = null;

app.on('before-quit', () => {
if (tray) tray.destroy();
});
app.on('ready', () => {
const mainWindow = new electron.BrowserWindow({
width: 1150,
width: 1360,
height: 630,
minWidth: 950,
minWidth: 1150,
minHeight: 550,
resizable: true,
frame: false,
Expand All @@ -52,6 +54,25 @@ app.on('ready', () => {
);

mainWindow.once('ready-to-show', async () => {
tray = new Tray(__dirname + '/icon.ico');
tray.setToolTip('Lazap');

const contextMenu = Menu.buildFromTemplate([
{
label: 'Show', type: 'normal', click: () => {
mainWindow.show();
tray.destroy();
},
},
{ label: 'Exit', type: 'normal', click: () => mainWindow.close() },
]);
tray.setContextMenu(contextMenu);

tray.on('click', () => {
if (!mainWindow.isVisible()) {
mainWindow.show();
}
});
mainWindow.show();
});

Expand Down Expand Up @@ -95,7 +116,13 @@ app.on('ready', () => {
mainWindow.loadFile('src/index.html');
});
ipcMain.on('close-window', () => {
mainWindow.close();
if (JSON.parse(fs.readFileSync('./storage/Settings/LauncherData.json').toString())?.trayMinQuit === true) {
mainWindow.hide();
}
else {
tray.destroy();
mainWindow.close();
}
});
ipcMain.on('max-window', () => {
mainWindow.isMaximized() ? mainWindow.unmaximize() : mainWindow.maximize();
Expand All @@ -105,28 +132,14 @@ app.on('ready', () => {
});
ipcMain.on('min-tray', () => {
if (JSON.parse(fs.readFileSync('./storage/Settings/LauncherData.json').toString())?.trayMinLaunch === true) {
tray = new Tray(__dirname + '/icon.ico');
tray.setToolTip('Lazap');

const contextMenu = Menu.buildFromTemplate([
{ label: 'Show', type: 'normal', click: () => {
mainWindow.show()
tray.destroy()
} },
{ label: 'Exit', type: 'normal', click: () => mainWindow.close() }
])
tray.setContextMenu(contextMenu)

tray.on('click', () => {
if (!mainWindow.isVisible()) {
mainWindow.show();
tray.destroy();
}
});

mainWindow.hide();
}
});
ipcMain.on('show-window', () => {
if (JSON.parse(fs.readFileSync('./storage/Settings/LauncherData.json').toString())?.trayMinLaunch === true) {
mainWindow.show();
}
});
ipcMain.on('update-profile', (e, data) => {
editLocalStorage(data);
});
Expand Down Expand Up @@ -240,7 +253,7 @@ function fetch_banner(data) {
break;
}
case 'Steam': {
resolve(`https://cdn.akamai.steamstatic.com/steam/apps/${data[i].GameID}/header.jpg`);
resolve(`https://cdn.akamai.steamstatic.com/steam/apps/${data[i].GameID}/library_600x900.jpg`);
break;
}
case 'RiotGames': {
Expand Down
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.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lazap",
"version": "0.1.1-nightly",
"description": "A cross platform launcher - All your games at one library",
"version": "0.2.0",
"description": "Lazap, All your games at one library with a modernish look and experience",
"main": "./index.js",
"scripts": {
"start": "electron .",
Expand All @@ -24,7 +24,7 @@
"!src/js/launchers/LinuxGames.js",
"!src/js/launchers/RockstarGames.js"
],
"productName": "Lazap Beta",
"productName": "Lazap",
"forceCodeSigning": false,
"nsis": {
"license": "./LICENSE.md",
Expand Down
7 changes: 4 additions & 3 deletions src/css/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ body {
}

.titlebar-exit:hover {
filter: invert(29%) sepia(93%) saturate(6374%) hue-rotate(353deg) brightness(92%) contrast(94%);
background: #c80000;
background-size: cover;
}

.titlebar-max {
Expand All @@ -106,7 +107,7 @@ body {
}

.titlebar-max:hover {
filter: invert(80%) sepia(51%) saturate(2452%) hue-rotate(348deg) brightness(102%) contrast(110%);
background: #ffc400;
}

.titlebar-min {
Expand All @@ -121,7 +122,7 @@ body {
}

.titlebar-min:hover {
filter: invert(58%) sepia(76%) saturate(543%) hue-rotate(81deg) brightness(92%) contrast(97%);
background: #22ff00;
}

h1 {
Expand Down
98 changes: 80 additions & 18 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ body {
height: 18px;
width: 18px;
background-color: rgb(70, 70, 70);

-webkit-app-region: no-drag;
display: block;
}

.titlebar-exit:hover {
filter: invert(29%) sepia(93%) saturate(6374%) hue-rotate(353deg) brightness(92%) contrast(94%);
background: #c80000;
background-size: cover;
}

.titlebar-max {
Expand All @@ -161,12 +163,13 @@ body {
height: 18px;
width: 18px;
background-color: rgb(70, 70, 70);

-webkit-app-region: no-drag;
display: block;
}

.titlebar-max:hover {
filter: invert(80%) sepia(51%) saturate(2452%) hue-rotate(348deg) brightness(102%) contrast(110%);
background: #ffc400;
}

.titlebar-min {
Expand All @@ -178,11 +181,10 @@ body {
background-color: rgb(70, 70, 70);
-webkit-app-region: no-drag;
display: block;

}

.titlebar-min:hover {
filter: invert(58%) sepia(76%) saturate(543%) hue-rotate(81deg) brightness(92%) contrast(97%);
background: #22ff00;
}

.titlebar-settings {
Expand Down Expand Up @@ -349,7 +351,7 @@ body {
.user-pfp {
position: relative;
margin-top: 50px;
width: 100px;
width: 80px;
margin-left: auto;
margin-right: auto;
}
Expand All @@ -363,11 +365,12 @@ body {
border-radius: 18px;
image-rendering: auto;
object-fit: cover;
box-shadow: 0 3px 16px -7px rgb(17 18 24 / 70%);
}

.user-pfp:hover img {
transition: border-radius 0.2s ease-in-out;
border-radius: 6px;
border-radius: 10px;
}

.user-pfp label {
Expand All @@ -379,7 +382,7 @@ body {

.username {
margin-top: 10px;
margin-bottom: 40px;
margin-bottom: 35px;
text-align: center;
font-size: 22px;
font-family: Comfortaa;
Expand All @@ -392,7 +395,7 @@ body {
.side-tabs {
margin-left: 20px;
position: absolute;
height: calc(100% - 230px);
height: calc(100% - 220px);
overflow-y: auto;
}

Expand Down Expand Up @@ -446,7 +449,7 @@ foot {
}

#indicator {
transition: 0.35s;
transition: 0.3s;
position: absolute;
margin-top: 5.8px;
margin-left: 2px;
Expand Down Expand Up @@ -481,8 +484,8 @@ foot {
transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
margin-right: 10px;
margin-left: 20px;
height: 280px;
width: 200px;

}

.gamebox:hover {
Expand All @@ -495,16 +498,22 @@ foot {
border-radius: 12px;
image-rendering: auto;
object-fit: cover;
-webkit-mask-image: -webkit-gradient(linear,
left top,
left bottom,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0)));
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
-webkit-mask-image: -webkit-gradient(linear, left 20%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
mask-image: -webkit-gradient(linear, left 20%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));


}

.gamebox img:hover {
cursor: pointer;
-webkit-mask-image: -webkit-gradient(linear, left 30%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
mask-image: -webkit-gradient(linear, left 30%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
opacity: 1;
-webkit-transition: all 0.5s ease-in;
-moz-transition: all 0.5s ease-in;
-o-transition: all 0.5s ease-in;
transition: all 0.5s ease-in;
box-shadow: inset 0 0 0 0 rgba(0,0,0,0.6), 0 0 10px rgba(0,0,0,0.3);
}

.gamebox span {
Expand All @@ -516,6 +525,59 @@ foot {
display: block;
}

.mainPageGamesList {
position: absolute;
width: 99%;
height: 82%;
margin-top: 35px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
align-items: center;
justify-content: flex-start;
margin-left: 2.5%;

}

.mainPageGamebox {
position: relative;
margin-bottom: 50px;
text-align: center;
display: inline-block;
border-radius: 12px;
transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
margin-left: 26px;
height: 180px;
width: 130px;
object-fit: contain;
}

.mainPageGamebox:hover {
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.mainPageGamebox img {
height: 180px;
width: 130px;
object-fit: contain;
border-radius: 8px;
image-rendering: auto;
object-fit: cover;
}

.mainPageGamebox img:hover {
cursor: pointer;
}

.mainPageGamebox span {
position: absolute;
margin-top: -28px;
margin-left: 10px;
font-size: 14px;
color: #d3d3d3;
display: block;
}

.star {
position: absolute;
margin-top: -270px;
Expand All @@ -539,11 +601,11 @@ foot {
color: #d3d3d3;
display: block;
z-index: 10000000;
content: url("../../img/star-solid.svg");
content: url("../../img/star-solid.svg") !important;
height: 25px;
width: 25px;
cursor: pointer;
filter: invert(77%) sepia(68%) saturate(616%) hue-rotate(358deg) brightness(100%) contrast(104%);
filter: invert(77%) sepia(68%) saturate(616%) hue-rotate(358deg) brightness(100%) contrast(104%) !important;
}

.fade {
Expand Down
Loading

0 comments on commit 6a68691

Please sign in to comment.