Several changes (I LOVE SVELTE!!!)

- updated readme
- removed es-es locale because no one use it
- updated German, French and uwu languages
- fixed old launcher logs deletion
- added environmental variables manager
- fixed `Domain.getInfo()` method work in some specific cases(?)
This commit is contained in:
Observer KRypt0n_ 2022-01-10 15:14:03 +02:00
parent 016f6abe88
commit d7162e85a4
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
15 changed files with 196 additions and 393 deletions

View file

@ -165,8 +165,7 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md)
* <s>Checkbox</s>
* <s>Selectbox</s>
* <s>SelectionList</s>
* SelectableCheckbox
* PropertiesEditor
* <s>PropertiesEditor</s>
* <s>Add `svelte-i18n`</s>
* <s>Telemetry checking</s>
* <s>Tooltips for some options</s>
@ -179,8 +178,8 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md)
* <s>Proper wine process monitoring</s>
* <s>Ability to hide some runners families</s>
* <s>Ability to change the temp directory where the launcher should download some files</s>
* <s>Shaders menu</s>
* Dark progress bar design
* Shaders menu
* Statistics window
* Launcher auto-updates
* Changelog window
@ -189,8 +188,8 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md)
### Features
* <s>Use `LauncherLib.getGameVersion` function instead of the `config.json`'s `version` property</s> *(deprecated due to the new core functions)*
* <s>Fix button flickering at start when the launcher's state updates</s> *(fixed due to the new framework usage and proper state updating)*
* Add downloading pause button
* Fix button flickering at start when the launcher's state updates
* Screenshots explorer
* Add Patch category in settings menu with
- Always participate in patches testing

View file

@ -5,12 +5,12 @@ splash:
- Bruder, lass uns Genshin Impact spielen...
- Paimon am ärgern...
- Versuche Yae zu ziehen...
- Farming materials...
- Passing Abyss...
- Collecting achievements...
- Building phys Qiqi...
- Making sacrifices for 5*...
- Finding friends for co-op...
- Materialien farmen...
- Abyss bewältigen...
- Errungenschaften sammeln...
- Phys Qiqi erstellen...
- Opfer für 5* bringen...
- Freunde für Koop finden...
# Launcher window
launcher:
@ -60,7 +60,6 @@ settings:
ru-ru: Russisch
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
@ -171,4 +170,18 @@ settings:
custom: Custom
author: 'Autor: {author}'
no_images: Keine Bilder verfügbar
no_images: Keine Bilder verfügbar
# Environmantal variables manager
environment:
title: Umgebungsvariablen
items:
# Table rows
table:
name: Name
value: Wert
# Table buttons
buttons:
add: Hinzufügen
delete: Löschen

View file

@ -60,7 +60,6 @@ settings:
ru-ru: Русский
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
@ -176,3 +175,12 @@ settings:
environment:
title: Environment
items:
# Table rows
table:
name: Name
value: Value
# Table buttons
buttons:
add: Add
delete: Delete

View file

@ -1,173 +0,0 @@
# Splash window
splash:
title: Loading launcher
phrases:
- Doing some important stuff...
- Bullying Paimon...
- Pulling for Yae...
- Farming materials...
- Passing Abyss...
- Collecting achievements...
- Building phys Qiqi...
- Making sacrifices for 5*...
- Finding friends for co-op...
# Launcher window
launcher:
states:
# When the game should be installed or updated
installation:
install_wine: Install Wine
install_dxvk: Install DXVK
install: Install
update: Update
# When the game should be patched
patching:
# Patch unavailable
unavailable:
title: Patch unavailable
hint: This game version has no anti-cheat patch.
Please, wait a few days before there will be a test or stable version
# Patch is in testing
test:
title: Apply test patch
hint: This game version has an experimental anti-cheat patch.
You can wait a few days until it is stable or apply it at your own risk
# Patch is stable
stable: Apply patch
# When the game is ready for playing
ready:
launch: Launch
predownload: Pre-download update
# Settings window
settings:
# General
general:
title: General
items:
# Language selection
lang:
# Launcher language
launcher:
title: Launcher
items:
en-us: English (US)
ru-ru: Русский
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
# Game voice pack language
voice:
title: Voice pack
tooltip: You will have to manually select the new voice pack in the game
items:
en-us: English (US)
ja-jp: Japanese
ko-kr: Korean
zn-cn: Chinese
# Launcher theme
theme:
title: Theme
items:
system: System
light: Light
dark: Dark
# Discord RPC
discord:
title: Discord RPC
settings:
title: Discord RPC settings
items:
timer: Display spent time
in-launcher: In-launcher text
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
items:
# HUD
hud:
title: HUD
items:
none: None
dxvk: DXVK
mangohud: MangoHUD
# GameMode
gamemode:
title: Use GameMode
tooltip: It is a software that can improve the game performance
# Unlock FPS
fps_unlocker:
title: Unlock FPS
tooltip: This option will unlock maximum of the 60 fps limitation
# Delete logs
purge_logs:
# Game logs (DXVK)
game:
title: Delete DXVK logs
tooltip: With this option enabled your launcher will automatically
delete DXVK log files
# Launcher logs
launcher:
title: Delete launcher logs
tooltip: Amount of time after which launcher will delete its old log files
items:
1d: 1 day
3d: 3 days
5d: 5 days
7d: 1 week
14d: 2 weeks
never: Never
# Runners
runners:
title: Wine version
items:
recommended:
title: Show recommended only
tooltip: This option will hide unplayable wine versions
# DXVKs
dxvks:
title: DXVK
items:
recommended:
title: Show recommended only
tooltip: This option will hide old DXVK versions
# Shaders
shaders:
title: Shaders
items:
shaders:
title: Shaders
tooltip: Use Home button to toggle shaders in the game
items:
none: None
custom: Custom
author: 'Author: {author}'
no_images: No images added

View file

@ -5,12 +5,12 @@ splash:
- En train de faire des choses importantes...
- Cuisson de Paimon en cours...
- Invocation en masse pour Yae...
- Farming materials...
- Passing Abyss...
- Collecting achievements...
- Building phys Qiqi...
- Making sacrifices for 5*...
- Finding friends for co-op...
- Collecte des matériaux...
- Passage de l'Abysse..
- Collecte des succès...
- Équipage de Qiqi qu'en DGT...
- Préparation de sacrifices pour un 5*...
- Recherche d'amis pour de la Co-op...
# Launcher window
launcher:
@ -61,7 +61,6 @@ settings:
ru-ru: Русский
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
@ -177,4 +176,18 @@ settings:
custom: Custom
author: 'Auteur: {author}'
no_images: Aucune image ajoutée
no_images: Aucune image ajoutée
# Environmantal variables manager
environment:
title: Environnement
items:
# Table rows
table:
name: Nom
value: Valeur
# Table buttons
buttons:
add: Ajouter
delete: Supprimer

View file

@ -168,4 +168,18 @@ settings:
custom: Custom
author: 'Autore: {author}'
no_images: Nessuna immagine aggiunta
no_images: Nessuna immagine aggiunta
# Environmantal variables manager
environment:
title: Environment
items:
# Table rows
table:
name: Name
value: Value
# Table buttons
buttons:
add: Add
delete: Delete

View file

@ -1,4 +1,4 @@
# Сплэш хуйня
# Окно загрузки
splash:
title: Загрузка лаунчера
phrases:
@ -60,7 +60,6 @@ settings:
ru-ru: Русский
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
@ -169,4 +168,18 @@ settings:
custom: Кастомные
author: 'Автор: {author}'
no_images: Нет добавленных изображений
no_images: Нет добавленных изображений
# Менеджер переменных среды
environment:
title: Переменные среды
items:
# Столбцы таблицы
table:
name: Имя
value: Значение
# Кнопки таблицы
buttons:
add: Добавить
delete: Удалить

View file

@ -5,12 +5,12 @@ splash:
- d-doing some i-impowtant s-stuff.. (≧◡≦)
- buwwying p-paimon.. xD
- p-puwwing fow yae.. (o^▽^o)
- Farming materials...
- Passing Abyss...
- Collecting achievements...
- Building phys Qiqi...
- Making sacrifices for 5*...
- Finding friends for co-op...
- fawming matewiaws.. uguu..
- passing abyss.. (o^▽^o)
- cowwecting achievements...
- buiwding phys qiqi.. (* ^ ω ^)
- making sacwifices fow 5*...
- finding fwiends fow co-op.. (≧◡≦)
# Launcher window
launcher:
@ -60,7 +60,6 @@ settings:
ru-ru: Русский
de-de: Deutsch
fr-fr: Français
es-es: Español
it-it: Italiano
uwu: Engwish
@ -170,4 +169,18 @@ settings:
custom: custom
author: 'a-authow: {author}'
no_images: no images avaiwable
no_images: no images avaiwable
# Environmantal variables manager
environment:
title: enviwonment
items:
# Table rows
table:
name: name
value: vawue
# Table buttons
buttons:
add: add
delete: dewete

View file

@ -1,37 +1,64 @@
<script lang="ts">
import { _ } from 'svelte-i18n';
import Configs from '../ts/Configs';
import Button from './Button.svelte';
let last_id = 0, variables = {}, selected;
Configs.get('env').then((env) => {
for (const key of Object.keys(env as object))
{
variables[last_id++] = {
key: key,
value: env![key]
};
}
});
const updateEnv = () => {
let env = {};
for (const key of Object.keys(variables))
if (variables[key].key && variables[key].value)
env[variables[key].key] = variables[key].value;
Configs.set('env', env);
};
</script>
<table class="table" style="margin-top: 16px">
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>
<input value="DXVK_ASYNC" />
</td>
<div>
<table class="table" style="margin-top: 16px">
<tr>
<th>{$_('settings.environment.items.table.name')}</th>
<th>{$_('settings.environment.items.table.value')}</th>
</tr>
<td>
<input value="1" />
</td>
</tr>
<tr>
<td>
<input value="DXVK_ASYNC" />
</td>
{#each Object.keys(variables) as key}
<tr on:click={() => selected = key} class:selected={selected === key}>
<td>
<span>{variables[key].key}</span>
<input bind:value={variables[key].key} on:change={updateEnv} />
</td>
<td>
<span>{variables[key].value}</span>
<input bind:value={variables[key].value} on:change={updateEnv} />
</td>
</tr>
{/each}
</table>
<td>
<input value="1" />
</td>
</tr>
<tr>
<td>
<input value="DXVK_ASYNC" />
</td>
<div style="margin-top: 16px">
<Button lang="settings.environment.items.buttons.add" click={() => variables[last_id++] = { key: '', value: '' }} />
<Button lang="settings.environment.items.buttons.delete" click={() => {
delete variables[selected];
<td>
<input value="1" />
</td>
</tr>
</table>
selected = undefined;
updateEnv();
}} />
</div>
</div>

View file

@ -6,9 +6,7 @@ register('en-us', () => Locales.get('en-us'));
register('ru-ru', () => Locales.get('ru-ru'));
register('de-de', () => Locales.get('de-de'));
register('fr-fr', () => Locales.get('fr-fr'));
register('es-es', () => Locales.get('es-es'));
register('it-it', () => Locales.get('it-it'));
register('vi-vn', () => Locales.get('vi-vn'));
register('uwu', () => Locales.get('uwu'));
Locales.default().then((locale) => {

View file

@ -66,7 +66,7 @@
const purge_logs = await Configs.get('purge_logs.launcher') as string|null;
if (purge_logs !== null && purge_logs[purge_logs.length - 1] == 'd')
await Neutralino.os.execCommand(`find "${Process.addSlashes(launcherDir)}/logs" -maxdepth 1 -mtime +${purge_logs.substring(0, purge_logs.length - 1)} -delete`);
await Neutralino.os.execCommand(`find "${Process.addSlashes(launcherDir)}/logs" -maxdepth 1 -mtime ${purge_logs.substring(0, purge_logs.length - 1)} -delete`);
// Save logs
const log = Debug.get().join('\r\n');

View file

@ -1,155 +1,7 @@
@use "sass:map"
@import "components/button"
@import "components/checkbox"
@import "components/selectionBox"
@import "components/dropdownCheckboxes"
@import "components/selectionList"
@import "components/table"
@mixin themable($theme-name, $theme-map)
body[data-theme=#{$theme-name}]
background-color: map.get($theme-map, "background")
color: map.get($theme-map, "text")
p, span, div
color: map.get($theme-map, "text")
/* Text Field
.text-field
width: calc(100% - 28px)
border-radius: 16px
padding: 8px
background-color: map.get($theme-map, "background2")
color: map.get($theme-map, "text")
border: unset
outline: none
font-size: 15px
/* Directory selector
.directory-selector
display: inline-flex
width: calc(100% - 28px)
border-radius: 16px
padding: 8px
background-color: map.get($theme-map, "background2")
> span
align-self: center
margin: 0 12px
font-weight: 600
> input
width: 100%
height: 24px
align-self: center
background-color: transparent
font-size: 15px
color: map.get($theme-map, "text")
border: unset
outline: none
> div
width: 120px
margin-left: 8px
button
padding: 4px 8px
&:nth-child(1) svg
width: 20px
height: 20px
&:nth-child(2) svg
width: 18px
height: 18px
&:hover
background-color: map.get($theme-map, "background1") !important
/* Editable list of properties */
.properties-list
table
width: 100%
border-spacing: 0
$cell-height: 40px
$padding-v: 4px
$padding-h: 8px
tr
height: $cell-height
cursor: pointer
&:hover
background-color: map.get($theme-map, "background1")
td:nth-of-type(1),
th:nth-of-type(1)
width: 60%
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
width: calc(100% - 2 * $padding-h)
height: calc($cell-height - 2 * $padding-h)
margin: auto
input
display: none
width: calc(100% - 2 * $padding-h)
height: calc($cell-height - 2 * $padding-h)
background-color: map.get($theme-map, "background2")
color: map.get($theme-map, "text")
font-size: 15px
margin: auto
border: unset
outline: none
.selected
background-color: map.get($theme-map, "background2") !important
input
display: block
span
display: none
.properties-list-buttons
width: 100%
margin-top: 16px
display: inline-flex
justify-content: flex-end
.button:not(:last-child)
margin-right: 8px
@import "themes/light"
@import "themes/dark"
@include themable(light, $light)
@include themable(dark, $dark)
@import "components/environmentTable"

View file

@ -0,0 +1,29 @@
@use "sass:map"
@mixin themable($theme-name, $theme-map)
body[data-theme=#{$theme-name}]
table.table
td, th
width: auto
tr
td input
display: none
&.selected
td
background-color: map.get($theme-map, "background2")
span
display: none
input
display: block
background-color: map.get($theme-map, "background2")
@import "../themes/light"
@import "../themes/dark"
@include themable(light, $light)
@include themable(dark, $dark)

View file

@ -10,7 +10,7 @@ export default class Domain
const debugThread = new DebugThread('Domain.getInfo', `Getting info about uri: ${uri}`);
return new Promise(async (resolve) => {
const process = await Process.run(`ping -n 1 -w 1 -B "${Process.addSlashes(uri)}"`);
const process = await Process.run(`ping -n -4 -w 1 -B "${Process.addSlashes(uri)}"`);
// If something will be wrong - at least we'll have
// to wait 1.5 seconds instread of 2

View file

@ -11,9 +11,7 @@ type AvailableLocales =
| 'ru-ru'
| 'de-de'
| 'fr-fr'
| 'es-es'
| 'it-it'
| 'vi-vn'
| 'uwu';
declare const Neutralino;
@ -24,8 +22,7 @@ export default class Locales
* List of locales supported by the game's API
*/
public static readonly supportedLocales: AvailableLocales[] = [
'en-us', 'ru-ru', 'de-de',
'fr-fr', 'es-es', 'vi-vn'
'en-us', 'ru-ru', 'de-de', 'fr-fr'
];
/**