an-anime-game-launcher/src/components/WineVDSettings.svelte

62 lines
1.8 KiB
Svelte
Raw Normal View History

2022-01-30 18:49:01 +03:00
<script lang="ts">
import { _ } from 'svelte-i18n';
import { Configs } from '../empathize';
export let visible: boolean = false;
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
export let valueChanged: (field: 'width' | 'height', value: string) => void = () => {};
2022-01-30 18:49:01 +03:00
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
let virtual_desktop = {
width: 0,
height: 0
};
Configs.get('wine.virtual_desktop').then((desktop) => virtual_desktop = desktop as typeof virtual_desktop);
2022-01-30 18:49:01 +03:00
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
const inputHandler = (event: KeyboardEvent, field: 'width' | 'height') => {
const input = event.srcElement as HTMLInputElement;
2022-01-30 18:49:01 +03:00
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
const content = input.value
2022-01-30 18:49:01 +03:00
.replace(/\b0+/g, '')
.replace(/[^0-9.]/g, '')
.replace(/(\..*?)\..*/g, '$1')
.replace(/([0-9]{0,6}(\.[0-9]{0,2})?).*/g, '$1');
valueChanged(field, content);
};
</script>
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
2022-01-30 18:49:01 +03:00
<div style="display: {visible ? 'block' : 'none'}">
<h3>{$_('settings.enhancements.wine.items.winevd.settings.title')}</h3>
2022-01-30 18:49:01 +03:00
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
<table class="table" style="margin: 16px 0">
2022-01-30 18:49:01 +03:00
<tr>
<td>
<span>{$_('settings.enhancements.wine.items.winevd.settings.items.width')}</span>
2022-01-30 18:49:01 +03:00
</td>
<td>
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
<input value={virtual_desktop.width} on:keyup={(e) => inputHandler(e, 'width')} />
2022-01-30 18:49:01 +03:00
</td>
</tr>
<tr>
<td>
<span>{$_('settings.enhancements.wine.items.winevd.settings.items.height')}</span>
2022-01-30 18:49:01 +03:00
</td>
<td>
2.1.0 - changed application id - implemented !28 - changed a bit config file structure From previous commits: - ping command check before telemetry check (!23) - updated empathize version; due to it was removed `Launcher.isPackageAvailable()` method which now included in empathize as `Package.exists()` - `Game.isTelemetryDisabled()` now rejects an Error object when `iputils` package (`ping` command) is not installed - due to the change above was slightly rewritten `Launch.ts` script - added automatic default language selection - added `Locales.system()` method to get launcher-supported locale based on the `$LANG` env variable - use polkit/pkexec instead of removing sudo section (!26) - blured everything that should be blured in the launcher pics - added blank analytics window - removed `components.sass` file; its content was moved to `settings.sass` - improved `Button` component - added `constants.uri.discord` and `constants.placeholders.uppercase.company_alterego` fields - added proper windows centering - added Hungarian - added `wine-ge 7.1-1` and `proton-ge 7.1-(1/2)` to the runners list - `wine-ge 7.1-1` now is the default runner to install during the game's installation - small conspiracy changes - fixed actions execution issues in the launcher's core libraries - added virtual desktop option (!28) - added ToS violation warning window - added additional IPC pull purging during the start of the launcher From 2.1.0-beta1: - moved launcher on empathize - added some links to the end of the settings menu - updated notahuman's shaders to v4 - added localizations for notifications - fixed possible errors in `Locales.bind()` method - added `Locales.translate()` method to translate something - added DXVK 1.9.4 and made it default; DXVK 1.8 and 1.8.1 now aren't recommended - added Indonesian - added Wine synchronization option in settings that can accept None, ESync or FSync - added `xdelta3` package existing checking before patch applying; also added an error notification when patch repos are not available - `cache.json` file was renamed to `.cache.json` - `Patch.fetchTimeout` was increased up to 5 seconds from 3 seconds - fixed *possible* issue with `Locales.default()` method: before, if you've been passing there a language to set as default, it wasn't returning properly - added notification when all the patch repos are not available
2022-01-30 23:48:34 +03:00
<input value={virtual_desktop.height} on:keyup={(e) => inputHandler(e, 'height')} />
2022-01-30 18:49:01 +03:00
</td>
</tr>
</table>
</div>
<style lang="sass">
table.table
td:last-child
display: inline-flex
align-items: center
width: 100%
</style>