Merge remote-tracking branch 'original/main' into term

This commit is contained in:
Maroxy 2021-10-17 23:56:16 +02:00
commit 5cb94c81e1
9 changed files with 27 additions and 61 deletions

View file

@ -6,9 +6,9 @@
# Status
| Game version | Launcher version |
| :---: | :---: |
| 2.2.0 | 2.2.0-beta3 ⚠️ |
| Game version | Launcher version | Patch version |
| :---: | :---: | :---: |
| 2.2.0 | 2.2.0-beta3 ⚠️ | 2.2.0-stable ✅ |
Download from [Releases](https://notabug.org/nobody/an-anime-game-launcher/releases)
@ -42,7 +42,7 @@ npm start
To 2.2.0-release1
* <s>Fix AppImage builds</s>
* <s>Parse background banners from the game's API</s>
* <s>Parse background banners from the game's API ([issue #1](https://notabug.org/nobody/an-anime-game-launcher/issues/1), [pull request #2](https://notabug.org/nobody/an-anime-game-launcher/pulls/2))</s>
* Make Proton-GE default compatibility tool and fix game input issues
* Add additional telemetry checking
* Add preferences menu

View file

@ -20,8 +20,6 @@ function createWindow ()
width: 1280,
height: 728,
webPreferences: {
// Is not safety
// Use it to have access to the node modules inside html files
nodeIntegration: true,
contextIsolation: false
},
@ -64,4 +62,4 @@ app.whenReady().then(() => {
app.on('window-all-closed', () => {
if (process.platform !== 'darwin')
app.quit();
});
});

View file

@ -1,6 +1,6 @@
{
"name": "an-anime-game-linux-launcher",
"version": "2.2.0-beta2",
"version": "2.2.0-beta3",
"description": "An Anime Game Linux Launcher",
"author": "Nikita Podvirnyy",
"license": "GPL-3.0",
@ -8,8 +8,7 @@
"scripts": {
"dev": "tsc && sass src/sass:public/css -s compressed --no-source-map",
"start": "npm run dev && electron .",
"build:win": "npm run dev && electron-builder --win",
"build:linux": "npm run dev && electron-builder --linux"
"build": "npm run dev && electron-builder --linux"
},
"build": {
"productName": "An Anime Game Linux Launcher",
@ -22,25 +21,6 @@
"public/**/*",
"entry.js"
],
"win": {
"icon": "public/images/icon512.png",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
},
{
"target": "portable",
"arch": [
"x64",
"ia32"
]
}
]
},
"linux": {
"icon": "public/images/icon512.png",
"category": "Utility",
@ -53,13 +33,6 @@
]
}
]
},
"nsis": {
"oneClick": false,
"perMachine": true,
"artifactName": "${productName}-${os}-${version}-setup.${ext}",
"deleteAppDataOnUninstall": true,
"allowToChangeInstallationDirectory": true
}
},
"devDependencies": {

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,6 @@
<!-- CSS styles -->
<link rel="stylesheet" href="../css/index.css">
<link rel="stylesheet" href="../css/layout.min.css">
<link rel="stylesheet" href="../css/hint.min.css">
<!-- JS scripts -->
@ -29,9 +28,7 @@
</div>
</div>
<div id="launchcontent">
</div>
<div id="launchcontent"></div>
<button class="button" id="launch">Launch</button>
</body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -90,10 +90,10 @@ export class Genshinlib
{
let bg = '';
await fetch(`https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=true&launcher_id=10&language=${ this.lang.launcher }`)
.then((res) => res.json())
.then((resdone) => { bg = resdone.data.adv.background });
await fetch(`https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=true&launcher_id=10&language=${this.lang.launcher}`)
.then(res => res.json())
.then(resdone => bg = resdone.data.adv.background);
return bg;
}

View file

@ -15,24 +15,22 @@ $(() => {
if (Genshinlib.version !== null)
document.title = 'Genshin Impact Linux Launcher - ' + Genshinlib.version;
Genshinlib.getBackgroundUri().then( uri => $('body').css('background-image', `url(${ uri })`) );
Genshinlib.getBackgroundUri().then(uri => $('body').css('background-image', `url(${ uri })`));
fetch(`https://genshin.mihoyo.com/launcher/10/${ Genshinlib.getConfig().lang.launcher }?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
.then((res) => res.text())
.then((body) => {
// Get the element which should have the launchers content.
let container = document.getElementById('launchcontent');
// Don't really think we need this, but maybe in future~~
// Parse the HTML and append the HTML from the site to the div.
let parser = new DOMParser();
let converted = parser.parseFromString(body, 'text/html');
container!.appendChild(converted.getElementById('__layout')!);
/*fetch(`https://genshin.mihoyo.com/launcher/10/${ Genshinlib.getConfig().lang.launcher }?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
.then(res => res.text())
.then(body => {
$(body).appendTo('#launchcontent');
// Get the home container to remove the functions that don't work currently.
let home = container!.getElementsByClassName('home__main')[0];
home.removeChild(home.getElementsByClassName('home-swiper-wrap')[0]);
home.removeChild(home.getElementsByClassName('home-news')[0]);
});
// $('.home__main').detach('.home-swiper-wrap')
// Get the home container to remove the functions that don't work currently.
// let home = container!.getElementsByClassName('home__main')[0];
// home.removeChild(home.getElementsByClassName('home-swiper-wrap')[0]);
// home.removeChild(home.getElementsByClassName('home-news')[0]);
});*/
Genshinlib.getData().then(data => {
// Update available
@ -237,9 +235,10 @@ $(() => {
Genshinlib.patchGame(data.game.latest.version, () => {
LauncherUI.setState('game-launch-available');
ipcRenderer.send('notification', {
title: document.title,
content: 'Game is ready to be played'
content: 'Game was succesfully installed'
});
}, (data) => console.log(data.toString()));
}