mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-30 05:28:15 +03:00
Several changes
- changed aur package name and link - removed webkit2gtk from the install commands in readme - added theme auto-switching - fixed dxvk config updating after installation - fixed `fetch()` delaying issues
This commit is contained in:
parent
cec860e69c
commit
ee58e179c3
9 changed files with 106 additions and 97 deletions
|
@ -24,7 +24,7 @@ Download AppImage from [Releases](https://gitlab.com/KRypt0n_/an-anime-game-laun
|
|||
|
||||
### For arch users
|
||||
|
||||
This launcher is also available as the [an-anime-game-launcher](https://aur.archlinux.org/packages/an-anime-game-launcher) AUR repository
|
||||
This launcher is also available as the [an-anime-game-launcher-bin](https://aur.archlinux.org/packages/an-anime-game-launcher-bin) AUR repository
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -62,19 +62,19 @@ To work this launcher requires
|
|||
### apt-get
|
||||
|
||||
```sh
|
||||
sudo apt-get install webkit2gtk unzip tar git curl xdelta3 cabextract notify-send
|
||||
sudo apt-get install unzip tar git curl xdelta3 cabextract notify-send
|
||||
```
|
||||
|
||||
### pacman
|
||||
|
||||
```sh
|
||||
sudo pacman -Syu webkit2gtk unzip tar git curl xdelta3 cabextract notify-send
|
||||
sudo pacman -Syu unzip tar git curl xdelta3 cabextract notify-send
|
||||
```
|
||||
|
||||
### dnf
|
||||
|
||||
```sh
|
||||
sudo dnf install webkit2gtk unzip tar git curl xdelta cabextract notify-send
|
||||
sudo dnf install unzip tar git curl xdelta cabextract notify-send
|
||||
```
|
||||
|
||||
# Additional requirements
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"applicationId": "com.krypt0nn.an-anime-game-linux-launcher",
|
||||
"applicationId": "com.krypt0nn.an-anime-game-launcher",
|
||||
"version": "3.0.0",
|
||||
"defaultMode": "window",
|
||||
"port": 0,
|
||||
|
@ -16,7 +16,7 @@
|
|||
"globalVariables": {},
|
||||
"modes": {
|
||||
"window": {
|
||||
"title": "An Anime Game Linux Launcher",
|
||||
"title": "An Anime Game Launcher",
|
||||
"width": 1280,
|
||||
"height": 700,
|
||||
"fullScreen": false,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "an-anime-game-launcher",
|
||||
"version": "3.0.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"license": "GPL-3.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"neu": "neu",
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
|
||||
applying[dxvk.version] = true;
|
||||
|
||||
DXVK.current(dxvk);
|
||||
|
||||
DXVK.apply(await constants.paths.prefix.current, dxvk).then(() => {
|
||||
applying[dxvk.version] = false;
|
||||
disabledDxvks[dxvk.version] = false;
|
||||
|
|
|
@ -37,12 +37,16 @@
|
|||
settingsButton?.classList.remove('hovered');
|
||||
};
|
||||
});
|
||||
|
||||
// Auto theme switcher
|
||||
// TODO: an option to disable it
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
document.body.setAttribute('data-theme', 'dark');
|
||||
</script>
|
||||
|
||||
<main>
|
||||
{#await Background.get() then uri}
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img class="background" src="{uri}">
|
||||
<img class="background" src="{uri}" alt="Missing Texture"> <!-- Alt: Random GMOD reference -->
|
||||
{/await}
|
||||
|
||||
<div class="downloader-panel" data-theme="light">
|
||||
|
@ -59,17 +63,14 @@
|
|||
|
||||
<div id="launcher-content">
|
||||
{#await launcher.getSocial() then uri}
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<iframe src="{uri}" scrolling="no" style="position: absolute; border: 0; top: 0; left: 0;" width="100%" height="100%"></iframe>
|
||||
<iframe title="Launcher-iframe" src="{uri}" scrolling="no" style="position: absolute; border: 0; top: 0; left: 0;" width="100%" height="100%"></iframe>
|
||||
{/await}
|
||||
</div>
|
||||
|
||||
<div id="settings">
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img src={Gear} class="unactive">
|
||||
<img src={Gear} class="unactive" alt="Settings">
|
||||
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img src={GearActive} class="active">
|
||||
<img src={GearActive} class="active" alt="Settings">
|
||||
</div>
|
||||
|
||||
<button class="button" id="launch">Launch</button>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
@mixin themable($theme-name, $theme-map)
|
||||
body[data-theme=#{$theme-name}]
|
||||
|
||||
background-color: map.get($theme-map, "background")
|
||||
color: map.get($theme-map, "text")
|
||||
|
||||
|
|
|
@ -95,6 +95,11 @@
|
|||
let dxvkRecommendable = true,
|
||||
runnersRecommendable = true;
|
||||
|
||||
// Auto theme switcher
|
||||
// TODO: an option to disable it
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
document.body.setAttribute('data-theme', 'dark');
|
||||
|
||||
// Do some stuff when all the content will be loaded
|
||||
onMount(() => {
|
||||
Window.current.show();
|
||||
|
@ -102,6 +107,7 @@
|
|||
</script>
|
||||
|
||||
{#if typeof $locale === 'string'}
|
||||
<main>
|
||||
<div class="menu">
|
||||
{#each menuItems as item}
|
||||
<div class="menu-item" on:click={changeItem} class:menu-item-active={selectedItem === item} data-anchor={item}>{ $_(`settings.${item}.title`) }</div>
|
||||
|
@ -187,4 +193,5 @@
|
|||
<ShadersSelection />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{/if}
|
||||
|
|
|
@ -124,7 +124,7 @@ class Stream extends AbstractInstaller
|
|||
|
||||
export default class Patch
|
||||
{
|
||||
public static fetchTimeout: number = 3000;
|
||||
public static fetchTimeout: number|null = 3000;
|
||||
|
||||
/**
|
||||
* Get information about latest available patch
|
||||
|
|
|
@ -40,7 +40,7 @@ class Response
|
|||
public body(delay: number|null = null): Promise<string>
|
||||
{
|
||||
return new Promise((resolve) => {
|
||||
Neutralino.os.execCommand(`curl -s -L ${delay !== null ? `-m ${(delay / 1000).toFixed(3)}` : ''} "${this.url}"`)
|
||||
Neutralino.os.execCommand(`curl -s -L ${delay !== null ? `-m ${delay / 1000}` : ''} "${this.url}"`)
|
||||
.then((output) => resolve(output.stdOut));
|
||||
});
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class Response
|
|||
export default function fetch(url: string, delay: number|null = null): Promise<Response>
|
||||
{
|
||||
return new Promise(async (resolve) => {
|
||||
let header = await Neutralino.os.execCommand(`curl -s -I -L ${delay !== null ? `-m ${(delay / 1000).toFixed(3)}` : ''} "${url}"`);
|
||||
let header = await Neutralino.os.execCommand(`curl -s -I -L ${delay !== null ? `-m ${delay / 1000}` : ''} "${url}"`);
|
||||
|
||||
if (header.stdOut == '')
|
||||
header = header.stdErr;
|
||||
|
|
Loading…
Reference in a new issue