2021-10-28 16:24:55 +03:00
|
|
|
const { ipcRenderer } = require('electron');
|
|
|
|
|
|
|
|
import $ from 'cash-dom';
|
2021-11-01 14:01:28 +03:00
|
|
|
import { LauncherLib } from './lib/LauncherLib';
|
2021-10-28 16:24:55 +03:00
|
|
|
import { LauncherUI } from './lib/LauncherUI';
|
|
|
|
|
|
|
|
$(() => {
|
2021-11-01 14:01:28 +03:00
|
|
|
LauncherUI.updateLang(LauncherLib.getConfig('lang.launcher'));
|
2021-10-28 16:24:55 +03:00
|
|
|
|
|
|
|
$('#participate').on('click', async () => {
|
|
|
|
await fetch(`https://an-anime-game-launcher.000webhostapp.com${ !$('#share-country').hasClass('checkbox-active') ? '/?hide-geo' : '' }`);
|
|
|
|
|
2021-11-01 14:01:28 +03:00
|
|
|
LauncherLib.updateConfig('analytics', LauncherLib.version);
|
2021-10-28 16:24:55 +03:00
|
|
|
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#skip').on('click', () => {
|
2021-11-01 14:01:28 +03:00
|
|
|
LauncherLib.updateConfig('analytics', LauncherLib.version);
|
2021-10-28 16:24:55 +03:00
|
|
|
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#skip-and-ignore').on('click', () => {
|
2021-11-01 14:01:28 +03:00
|
|
|
LauncherLib.updateConfig('analytics', null);
|
2021-10-28 16:24:55 +03:00
|
|
|
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
|
|
});
|
|
|
|
});
|