mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-03-14 20:20:09 +03:00
2.0.0 beta 9
- added some buttons to settings menu + winetricks + winecfg + launcher folder + game folder - made `Button` component - fixed textarea and input background in dark theme in tables From previous commits: - made outdated files deletion - reworked runners selection list - removed `purge_dxvk_logs` config - added `purge_logs.game` and `purge_logs.launcher` configs - now launcher can delete its own old log files - made DXVK logs deletion option works - `Patch/Stream`'s `patchFinish()` callback now have `result: boolean` argument which indicates whether the patch was successfully applied - `Patch/Stream` now also logs patch script output - if the patch wasn't successfully applied - then `ApplyPatch` script will show user a notification about it - also was fixed notification icon in telemetry checking - fixed typo in notahuman's shaders
This commit is contained in:
parent
df0b3cf8cd
commit
f7cb1e7d24
15 changed files with 152 additions and 35 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"applicationId": "com.krypt0nn.an-anime-game-launcher",
|
||||
"version": "2.0.0-beta-8",
|
||||
"version": "2.0.0-beta-9",
|
||||
"defaultMode": "window",
|
||||
"port": 0,
|
||||
"documentRoot": "/bundle/",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "an-anime-game-launcher",
|
||||
"version": "2.0.0-beta-8",
|
||||
"version": "2.0.0-beta-9",
|
||||
"license": "GPL-3.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
@ -59,6 +59,13 @@ settings:
|
|||
in-game: im Spiel text
|
||||
selectIcon: Icon auswählen
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: Launcher Ordner öffnen
|
||||
game: Spiel Ordner öffnen
|
||||
|
||||
# Verberssungen
|
||||
enhancements:
|
||||
title: Verbesserungen
|
||||
|
|
|
@ -59,6 +59,13 @@ settings:
|
|||
in-game: In-game text
|
||||
selectIcon: Select icon
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: launcher folder
|
||||
game: game folder
|
||||
|
||||
# Enhancements
|
||||
enhancements:
|
||||
title: Enhancements
|
||||
|
|
|
@ -59,6 +59,13 @@ settings:
|
|||
in-game: In-game text
|
||||
selectIcon: Select icon
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: launcher folder
|
||||
game: game folder
|
||||
|
||||
# Enhancements
|
||||
enhancements:
|
||||
title: Enhancements
|
||||
|
|
|
@ -60,6 +60,13 @@ settings:
|
|||
in-game: Texte dans le jeu
|
||||
selectIcon: Sélection d'icone
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: Dossier du Launcher
|
||||
game: Dossier du jeu
|
||||
|
||||
# Enhancements
|
||||
enhancements:
|
||||
title: Améliorations
|
||||
|
|
|
@ -58,6 +58,13 @@ settings:
|
|||
in-launcher: Testo nel launcher
|
||||
in-game: Testo in gioco
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: launcher folder
|
||||
game: game folder
|
||||
|
||||
# Enhancements
|
||||
enhancements:
|
||||
title: Miglioramenti
|
||||
|
|
|
@ -59,6 +59,13 @@ settings:
|
|||
in-game: Текст в игре
|
||||
selectIcon: Выберите иконку
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: папка лаунчера
|
||||
game: папка игры
|
||||
|
||||
# Улучшения
|
||||
enhancements:
|
||||
title: Улучшения
|
||||
|
|
|
@ -59,6 +59,13 @@ settings:
|
|||
in-game: In-game text
|
||||
selectIcon: Select icon
|
||||
|
||||
# Some buttons
|
||||
buttons:
|
||||
winetricks: winetricks
|
||||
winecfg: winecfg
|
||||
launcher: launcher folder
|
||||
game: game folder
|
||||
|
||||
# Enhancements
|
||||
enhancements:
|
||||
title: Enhancements
|
||||
|
|
|
@ -39,7 +39,7 @@ const bundler = new Bundler({
|
|||
output: path.join(__dirname, '../dist/An Anime Game Launcher.AppImage'),
|
||||
|
||||
// Application version
|
||||
version: '2.0.0-beta-8'
|
||||
version: '2.0.0-beta-9'
|
||||
});
|
||||
|
||||
// Bundle project
|
||||
|
|
9
src/components/Button.svelte
Normal file
9
src/components/Button.svelte
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n';
|
||||
|
||||
export let lang: string = '';
|
||||
|
||||
export let click: () => void = () => {};
|
||||
</script>
|
||||
|
||||
<button class="button" on:click={click}>{$_(lang)}</button>
|
|
@ -1,5 +1,6 @@
|
|||
@use "sass:map"
|
||||
|
||||
@import "components/button"
|
||||
@import "components/checkbox"
|
||||
@import "components/selectionBox"
|
||||
@import "components/dropdownCheckboxes"
|
||||
|
@ -147,33 +148,6 @@
|
|||
.button:not(:last-child)
|
||||
margin-right: 8px
|
||||
|
||||
/* Buttons */
|
||||
|
||||
.button
|
||||
background-color: map.get($theme-map, "background1")
|
||||
border-radius: 16px
|
||||
border: none
|
||||
|
||||
cursor: pointer
|
||||
font-size: 16px
|
||||
|
||||
padding: 8px 20px
|
||||
|
||||
color: map.get($theme-map, "text")
|
||||
|
||||
&:hover:not([disabled])
|
||||
background-color: map.get($theme-map, "background2")
|
||||
|
||||
&[disabled]
|
||||
cursor: default
|
||||
|
||||
.button-primary
|
||||
background-color: map.get($theme-map, "background2")
|
||||
|
||||
&:hover
|
||||
background-color: map.get($theme-map, "primary")
|
||||
color: white
|
||||
|
||||
@import "themes/light"
|
||||
@import "themes/dark"
|
||||
|
||||
|
|
34
src/sass/components/button.sass
Normal file
34
src/sass/components/button.sass
Normal file
|
@ -0,0 +1,34 @@
|
|||
@use "sass:map"
|
||||
|
||||
@mixin themable($theme-name, $theme-map)
|
||||
body[data-theme=#{$theme-name}]
|
||||
.button
|
||||
background-color: map.get($theme-map, "background1")
|
||||
border-radius: 16px
|
||||
border: none
|
||||
|
||||
cursor: pointer
|
||||
font-size: 14px
|
||||
|
||||
padding: 8px 20px
|
||||
|
||||
color: map.get($theme-map, "text")
|
||||
|
||||
&:hover:not([disabled])
|
||||
background-color: map.get($theme-map, "background2")
|
||||
|
||||
&[disabled]
|
||||
cursor: default
|
||||
|
||||
.button-primary
|
||||
background-color: map.get($theme-map, "background2")
|
||||
|
||||
&:hover
|
||||
background-color: map.get($theme-map, "primary")
|
||||
color: white
|
||||
|
||||
@import "src/sass/themes/light"
|
||||
@import "src/sass/themes/dark"
|
||||
|
||||
@include themable(light, $light)
|
||||
@include themable(dark, $dark)
|
|
@ -21,20 +21,20 @@
|
|||
&:hover
|
||||
background-color: map.get($theme-map, "background1")
|
||||
|
||||
td input, textarea
|
||||
background-color: map.get($theme-map, "background1")
|
||||
td
|
||||
input, textarea
|
||||
background-color: map.get($theme-map, "background1")
|
||||
|
||||
td:nth-of-type(1),
|
||||
th:nth-of-type(1)
|
||||
width: 40%
|
||||
|
||||
th,
|
||||
td
|
||||
th, td
|
||||
border-bottom: 1px solid map.get($theme-map, "background1")
|
||||
|
||||
&:not(:last-child)
|
||||
border-right: 1px solid map.get($theme-map, "background1")
|
||||
|
||||
|
||||
td
|
||||
span
|
||||
display: block
|
||||
|
@ -52,6 +52,9 @@
|
|||
|
||||
color: map.get($theme-map, "text")
|
||||
|
||||
@if $theme-name == "dark"
|
||||
background-color: #434c5e
|
||||
|
||||
font-size: 15px
|
||||
|
||||
margin: auto
|
||||
|
|
|
@ -6,12 +6,16 @@
|
|||
import { onMount } from 'svelte';
|
||||
import { _, locale, locales } from 'svelte-i18n';
|
||||
|
||||
import constants from './ts/Constants';
|
||||
import Configs from './ts/Configs';
|
||||
import FPSUnlock from './ts/FPSUnlock';
|
||||
import Window from './ts/neutralino/Window';
|
||||
import Debug from './ts/core/Debug';
|
||||
import IPC from './ts/core/IPC';
|
||||
import Process from './ts/neutralino/Process';
|
||||
import Runners from './ts/core/Runners';
|
||||
|
||||
import Button from './components/Button.svelte';
|
||||
import Checkbox from './components/Checkbox.svelte';
|
||||
import SelectionBox from './components/SelectionBox.svelte';
|
||||
import DropdownCheckboxes from './components/DropdownCheckboxes.svelte';
|
||||
|
@ -228,6 +232,50 @@
|
|||
/>
|
||||
|
||||
<DiscordSettings visible={discordSettings['enabled']} valueChanged={handleDiscordRpcText} iconChanged={handleDiscordRpcIcon} />
|
||||
|
||||
<div style="margin-top: 24px">
|
||||
<Button lang="settings.general.items.buttons.winetricks" click={async () => {
|
||||
const runner = await Runners.current();
|
||||
|
||||
const runnersDir = await constants.paths.runnersDir;
|
||||
|
||||
Process.run(`"${Process.addSlashes(await constants.paths.launcherDir)}/winetricks.sh"`, {
|
||||
env: {
|
||||
WINE: runner ? `${runnersDir}/${runner.name}/${runner.files.wine}` : 'wine',
|
||||
WINESERVER: runner ? `${runnersDir}/${runner.name}/${runner.files.wineserver}` : 'wineserver',
|
||||
WINEPREFIX: await constants.paths.prefix.current
|
||||
}
|
||||
});
|
||||
}} />
|
||||
|
||||
<Button lang="settings.general.items.buttons.winecfg" click={async () => {
|
||||
const runner = await Runners.current();
|
||||
|
||||
const runnerDir = runner ? `${await constants.paths.runnersDir}/${runner.name}` : '';
|
||||
|
||||
Process.run(runner ? `"${Process.addSlashes(`${runnerDir}/${runner.files.wine}`)}" "${Process.addSlashes(`${runnerDir}/${runner.files.winecfg}`)}"` : 'winecfg', {
|
||||
env: {
|
||||
WINE: runner ? `${runnerDir}/${runner.files.wine}` : 'wine',
|
||||
WINESERVER: runner ? `${runnerDir}/${runner.files.wineserver}` : 'wineserver',
|
||||
WINEPREFIX: await constants.paths.prefix.current
|
||||
}
|
||||
});
|
||||
}} />
|
||||
|
||||
<!-- svelte-ignore missing-declaration -->
|
||||
<Button lang="settings.general.items.buttons.launcher" click={async () => {
|
||||
Neutralino.os.execCommand(`xdg-open "${Process.addSlashes(await constants.paths.launcherDir)}"`, {
|
||||
background: true
|
||||
});
|
||||
}} />
|
||||
|
||||
<!-- svelte-ignore missing-declaration -->
|
||||
<Button lang="settings.general.items.buttons.game" click={async () => {
|
||||
Neutralino.os.execCommand(`xdg-open "${Process.addSlashes(await constants.paths.gameDir)}"`, {
|
||||
background: true
|
||||
});
|
||||
}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-item" id="enhancements">
|
||||
|
|
Loading…
Add table
Reference in a new issue