diff --git a/README.md b/README.md
index a61e695..453b8c0 100644
--- a/README.md
+++ b/README.md
@@ -159,11 +159,11 @@ This is our current roadmap goals. You can find older ones [here](repository/pag
* ToS Violation Window *(2.1.0)*
* Add `latest.log` file generation *(2.1.2)*
* Add an option to show terminal with the wine's log of the game *(7375c743, released in 2.1.3)*
+* Statistics window
* Add Chinese game's version support (due to changes in the Krock's patch)
* Implement manual config flushing functionality from the Empathize's API
* Add analytics window
* Dark progress bar design
-* Statistics window
* Changelog window
* Screenshots explorer
* Add Patch category in settings menu with
diff --git a/analytics.html b/analytics.html
index dfaaf51..3ed10fd 100644
--- a/analytics.html
+++ b/analytics.html
@@ -5,6 +5,7 @@
+
diff --git a/package.json b/package.json
index a1612d9..732ce81 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
- "@empathize/framework": "^1.4.6",
+ "@empathize/framework": "^1.4.8",
"js-md5": "^0.7.3",
"semver": "^7.3.5",
"svelte-i18n": "^3.3.13",
diff --git a/public/locales/de-de.yaml b/public/locales/de-de.yaml
index b770f6e..395f8f3 100644
--- a/public/locales/de-de.yaml
+++ b/public/locales/de-de.yaml
@@ -322,4 +322,23 @@ tos_violation:
title: Ich verstehe das Risiko
tooltip: Sie sollten diesen Text wirklich lesen, Er ist sehr wichtig.
cancel: Abbrechen
- discord: Unser Discord Server
\ No newline at end of file
+ discord: Unser Discord Server
+
+# Analytics window
+analytics:
+ title: Yanfeis Kommission...
+ header: Teilnahme an der anonymen Datenerhebung
+
+ body:
+ - Um die aktive Nutzerbasis für Linux zu zählen, möchte Yanfei bei jedem Update des Spiels Ihre IP-Adresse erfassen
+ - Die IP-Adresse wird zu Sicherheitszwecken gehasht
+
+ actions:
+ share_country:
+ title: Land teilen
+ hint: Erlauben Sie Yanfei das Land zu speichern das Ihre IP-Adresse anzeigt, um die Statistiken detaillierter zu gestalten.
+ Es werden keine anderen Daten als das Land gespeichert
+
+ participate: Teilnehmen
+ skip: Überspringen
+ skip_forever: Überspringen und nicht mehr nach fragen
\ No newline at end of file
diff --git a/public/locales/en-us.yaml b/public/locales/en-us.yaml
index fe485f6..02ae16d 100644
--- a/public/locales/en-us.yaml
+++ b/public/locales/en-us.yaml
@@ -322,4 +322,22 @@ tos_violation:
title: I understand the risk
tooltip: You really should read this text above. It's important
cancel: Cancel
- discord: Our discord server
\ No newline at end of file
+ discord: Our discord server
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/public/locales/es-es.yaml b/public/locales/es-es.yaml
index 4e79f57..509dbbc 100644
--- a/public/locales/es-es.yaml
+++ b/public/locales/es-es.yaml
@@ -320,4 +320,22 @@ tos_violation:
title: Sí, entiendo el riesgo
tooltip: Realmente deberías leer el texto de arriba. Es importante.
cancel: Cancelar
- discord: Nuestro servidor de Discord
\ No newline at end of file
+ discord: Nuestro servidor de Discord
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/public/locales/fr-fr.yaml b/public/locales/fr-fr.yaml
index cefca77..47d82ca 100644
--- a/public/locales/fr-fr.yaml
+++ b/public/locales/fr-fr.yaml
@@ -23,7 +23,7 @@ launcher:
game:
downloading: Téléchargement du jeu...
unpacking: Décompression du jeu...
- applying_changes: Applying changes...
+ applying_changes: Application des changements...
deleting_outdated: Suppression des fichiers non à jour...
# Voice packages installation
@@ -42,12 +42,14 @@ launcher:
update: Mise à jour
apply_changes:
- title: Apply changes
- hint: Apply hdiff changes to the game files
+ # There you may want to do it with a line break "Appliquer" may look better ?
+ title: Appliquer les changements
+ hint: Appliquer le patch hdiff sur les fichiers du jeu
remove_outdated:
- title: Remove outdated
- hint: Remove outdated game files
+ # Same as "Appliquer" to keep a consistency if the previous one has a line break this one should else none but welcome long button I guess.
+ title: Supprimer les obsolètes
+ hint: Supprimer les fichiers du jeu qui sont devenus obsolètes
# When the game should be patched
patching:
@@ -310,8 +312,8 @@ notifications:
# HDiffPatch couldn't successfully apply game files changes
game_changes_applying_error:
- title: An error occurred during game updating
- body: '{files} files couldn''t be updated by the hdiff patch'
+ title: Une erreur a été détectée pendant la mise à jour du jeu
+ body: '{files} fichiers n''ont pas pu être mise à jour avec le patch hdiff'
# ToS violation warning window
tos_violation:
@@ -330,4 +332,23 @@ tos_violation:
title: Je comprends les risques
tooltip: Vous devriez réellement lire le texte ci-dessus, c'est important.
cancel: Annuler
- discord: Notre serveur discord
\ No newline at end of file
+ discord: Notre serveur discord
+
+# Analytics window
+analytics:
+ title: Commission de Yanfei...
+ header: Participer a la collecte des données anonymement
+
+ body:
+ - Pour comptabiliser le nombre d'utilisateurs sur Linux, Yanfei aimerait collecter votre adresse IP à chaque mise à jour du jeu
+ - Votre adresse IP sera cryptée (méthode Hash) pour des raisons de sécurités
+
+ actions:
+ share_country:
+ title: Partage du Pays
+ hint: Autoriser Yanfei a sauvegardé votre Pays avec votre IP pour rendre les statistiques plus détaillées.
+ Aucune autre donnée que votre pays sera sauvegardé
+
+ participate: Participer
+ skip: Passer
+ skip_forever: Passer et ne plus demander
\ No newline at end of file
diff --git a/public/locales/hu-hu.yaml b/public/locales/hu-hu.yaml
index 724e757..c459240 100644
--- a/public/locales/hu-hu.yaml
+++ b/public/locales/hu-hu.yaml
@@ -23,7 +23,7 @@ launcher:
game:
downloading: Játék letöltése folyamatban...
unpacking: Játék kibontása folyamatban...
- applying_changes: Applying changes...
+ applying_changes: Változások alkalmazása...
deleting_outdated: Lejárt fájlok kitörlése...
# Voice packages installation
@@ -42,12 +42,12 @@ launcher:
update: Frissítés
apply_changes:
- title: Apply changes
- hint: Apply hdiff changes to the game files
+ title: Változások alkalmazása
+ hint: Hdiff változások alkalmazása a játékfájlokra
remove_outdated:
- title: Remove outdated
- hint: Remove outdated game files
+ title: Elavultak törlése
+ hint: Elavult játékfájlok törlése
# When the game should be patched
patching:
@@ -302,8 +302,8 @@ notifications:
# HDiffPatch couldn't successfully apply game files changes
game_changes_applying_error:
- title: An error occurred during game updating
- body: '{files} files couldn''t be updated by the hdiff patch'
+ title: Hiba történt a játék frissítése közben
+ body: '{files} fájlt nem lehetett frissíteni a hdiff patch-el'
# ToS violation warning window
tos_violation:
@@ -322,4 +322,22 @@ tos_violation:
title: Megértem
tooltip: A fenti szöveget ajánlott elolvasnod. Tényleg fontos.
cancel: Mégse
- discord: 'Discord szerverünk:'
\ No newline at end of file
+ discord: 'Discord szerverünk:'
+
+# Analytics window
+analytics:
+ title: Yanfei jussa...
+ header: Részvétel anoním adatgyűjtésben
+
+ body:
+ - Hogy számon tartsuk az aktív Linux felhasználók számát, Yanfei szeretné elkérni az IP-det minden játékfrissítésnél
+ - Az IP-d hashelve lesz biztonsági okokból
+
+ actions:
+ share_country:
+ title: Ország megosztása
+ hint: Engedély Yanfei-nek hogy tárolja az IP címed regisztrált országát, hogy részletesebbek lehessenek a statisztikák. Más adat nem lesz tárolva
+
+ participate: Részvétel
+ skip: Átugrás
+ skip_forever: Átugrás és többet ne kérdezd
\ No newline at end of file
diff --git a/public/locales/id-id.yaml b/public/locales/id-id.yaml
index b302ec3..ed99d82 100644
--- a/public/locales/id-id.yaml
+++ b/public/locales/id-id.yaml
@@ -322,4 +322,22 @@ tos_violation:
title: Saya mengerti risikonya
tooltip: Kamu harus benar benar membaca teks diatas. Sangat Penting
cancel: Batalkan
- discord: Peladen Discord kami
\ No newline at end of file
+ discord: Peladen Discord kami
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/public/locales/it-it.yaml b/public/locales/it-it.yaml
index 014e024..10dcb52 100644
--- a/public/locales/it-it.yaml
+++ b/public/locales/it-it.yaml
@@ -321,3 +321,21 @@ tos_violation:
tooltip: Dovresti davvero leggere il testo sopra. È importante
cancel: Annulla
discord: Il nostro server Discord
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/public/locales/nb-no.yaml b/public/locales/nb-no.yaml
index 0a745d8..f59c18d 100644
--- a/public/locales/nb-no.yaml
+++ b/public/locales/nb-no.yaml
@@ -322,4 +322,22 @@ tos_violation:
title: Jeg forstår risikoen
tooltip: Du burde virkelig lese teksten over. Det er viktig
cancel: Avbryt
- discord: Vår discord server
\ No newline at end of file
+ discord: Vår discord server
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/public/locales/ru-ru.yaml b/public/locales/ru-ru.yaml
index cd2f314..27a15c8 100644
--- a/public/locales/ru-ru.yaml
+++ b/public/locales/ru-ru.yaml
@@ -321,4 +321,23 @@ tos_violation:
title: Я осознаю риск
tooltip: Вы действительно должны прочитать этот текст сверху. Это важно
cancel: Отменить
- discord: Наш Discord сервер
\ No newline at end of file
+ discord: Наш Discord сервер
+
+# Analytics window
+analytics:
+ title: Просьба Янь Фэй...
+ header: Примите участие в анонимном сборе данных
+
+ body:
+ - Чтобы посчитать число активных игроков на Linux, Янь Фэй просит их поделиться IP адресом после каждого обновления игры
+ - IP адрес будет хэширован для обеспечения его безопасности
+
+ actions:
+ share_country:
+ title: Поделиться названием страны
+ hint: Разрешить Янь Фэй хранить название страны, к которой привязан ваш IP адрес, чтобы сделать статистику более детальной.
+ Никаких других данных кроме названия страны сохранено не будет
+
+ participate: Участвовать
+ skip: Пропустить
+ skip_forever: Пропустить и больше не спрашивать
\ No newline at end of file
diff --git a/public/locales/uwu.yaml b/public/locales/uwu.yaml
index 0e14123..a8d8b05 100644
--- a/public/locales/uwu.yaml
+++ b/public/locales/uwu.yaml
@@ -321,4 +321,22 @@ tos_violation:
title: I understand the risk
tooltip: You really should read this text above. It's important
cancel: Cancel
- discord: Our discord server
\ No newline at end of file
+ discord: Our discord server
+
+# Analytics window
+analytics:
+ title: Yanfei's commission...
+ header: Participate in anonymous data collection
+
+ body:
+ - To count the active user base for Linux, Yanfei would like to collect your IP address everytime the game updates
+ - The IP address will be hashed for security purpose
+
+ actions:
+ share_country:
+ title: Share country
+ hint: Allow Yanfei to store the country your IP address registered in to make statistics more detailed. No other data than the country will be stored
+
+ participate: Participate
+ skip: Skip
+ skip_forever: Skip and don't ask again
\ No newline at end of file
diff --git a/src/analytics.svelte b/src/analytics.svelte
index 055018d..1797453 100644
--- a/src/analytics.svelte
+++ b/src/analytics.svelte
@@ -6,14 +6,31 @@
import { onMount } from 'svelte';
import { _, locale } from 'svelte-i18n';
- import { Configs, Windows } from './empathize';
+ import { Configs, Windows, fetch, IPC } from './empathize';
+
+ import constants from './ts/Constants';
+
+ import YanfeiIcon from './assets/images/yanfei.png';
+
+ import LeftCheckbox from './components/LeftCheckbox.svelte';
+ import Button from './components/Button.svelte';
onMount(() => {
Windows.current.show();
- Windows.current.center();
+ Windows.current.center(700, 460);
});
- Neutralino.events.on('windowClose', () => {
+ let shareCountry = true;
+
+ const closeWindow = async () => {
+ await Neutralino.filesystem.removeFile(`${await constants.paths.launcherDir}/.analytics`);
+
+ Neutralino.app.exit();
+ };
+
+ Neutralino.events.on('windowClose', async () => {
+ await IPC.write('analytics-close');
+
Neutralino.app.exit();
});
@@ -28,6 +45,56 @@
{#if typeof $locale === 'string'}
-
+