mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-01-01 22:47:19 +03:00
013c3dce47
- added verification for MangoHud and shaders when you want to select them if they even exist in your system - now statistics also shows amount of minutes - fixed some possible issue with patching process - all classes now are exported as default - improved some inner functions
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
const { ipcRenderer } = require('electron');
|
|
|
|
import $ from 'cash-dom';
|
|
|
|
import LauncherLib from './lib/LauncherLib';
|
|
import LauncherUI from './lib/LauncherUI';
|
|
|
|
$(() => {
|
|
LauncherUI.updateLang(LauncherLib.getConfig('lang.launcher'));
|
|
|
|
$('#participate').on('click', async () => {
|
|
await fetch(`https://an-anime-game-launcher.000webhostapp.com${ !$('#share-country').hasClass('checkbox-active') ? '/?hide-geo' : '' }`);
|
|
|
|
// LauncherLib.version can break this property
|
|
// because analytics can be displayed even with the first
|
|
// launcher's run and then of course uninstalled game's version
|
|
// will be "null", which in analytics means that user don't
|
|
// want to see this dialog anymore
|
|
LauncherLib.updateConfig('analytics', (await LauncherLib.getData()).game.latest.version);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
|
|
$('#skip').on('click', async () => {
|
|
LauncherLib.updateConfig('analytics', (await LauncherLib.getData()).game.latest.version);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
|
|
$('#skip-and-ignore').on('click', () => {
|
|
LauncherLib.updateConfig('analytics', null);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
});
|