Removed analytics window, fixed voiceovers updating

This commit is contained in:
Observer KRypt0n_ 2022-11-02 19:57:18 +02:00
parent f142df075e
commit 1e5c3f9bca
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
23 changed files with 8 additions and 509 deletions

View file

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" lang="sass" href="/src/sass/analytics.sass" />
<link rel="stylesheet" href="/src/css/hint.min.css" />
</head>
<body data-theme="light">
<div id="app"></div>
<script src="neutralino.js"></script>
<script type="module" src="/src/pages/analytics.ts" lang="ts"></script>
</body>
</html>

View file

@ -343,25 +343,6 @@ tos_violation:
cancel: Abbrechen
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, welches mithilfe Ihrer IP-Adresse ermittelt wird, 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
# Screenshots window
screenshots:
heading: Schnappschüsse

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: Cancel
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
# Screenshots window
screenshots:
heading: Screenshots

View file

@ -341,24 +341,6 @@ tos_violation:
cancel: Cancelar
discord: Nuestro servidor de Discord
# Ventana de analíticas
analytics:
title: La comisión de Yanfei...
header: Participar en recolección anónima de datos
body:
- Para poder contar la cantidad de usuarios activos en Linux, Yanfei necesita registrar tu IP cada vez que el juego se actualice
- La dirección IP será cifrada para mayor seguridad
actions:
share_country:
title: Compartir Pais
hint: Permite que Yanfei registre el pais asociado a tu IP para hacer generar estadísticas más detalladas. No se guardará ningún dato más que el pais.
participate: Participar
skip: Saltear
skip_forever: Saltear y no preguntar de nuevo
# Ventana de Screenshots
screenshots:
heading: Screenshots

View file

@ -354,25 +354,6 @@ tos_violation:
cancel: Annuler
discord: Notre serveur discord
# Analytics window
analytics:
title: Commission de Yanfei...
header: Participer à la collecte anonyme de données
body:
- Pour comptabiliser le nombre d'utilisateurs sur Linux, Yanfei aimerait collecter votre adresse IP à chaque mise à jour du jeu
- Votre adresse IP sera hashé pour votre sécurité
actions:
share_country:
title: Partager le pays
hint: Autoriser Yanfei à sauvegarder votre pays avec votre IP pour rendre les statistiques plus détaillées.
Aucune autre donnée que votre pays ne sera sauvegardée
participate: Participer
skip: Passer
skip_forever: Passer et ne plus demander
# Screenshots window
screenshots:
heading: Captures d'écran

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: Mégse
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
# Screenshots window
screenshots:
heading: Screenshotok

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: Batalkan
discord: Peladen Discord kami
# Analytics window
analytics:
title: Komisi Yanfei...
header: Berpartisipasi dalam pengambilan data secara anonim
body:
- Untuk menghitung pengguna aktif di Linux, Yanfei ingin mengumpulkan alamat IP tiap kali Game diperbarui
- Alamat IP akan diacak(hashed) untuk tujuan keamanan
actions:
share_country:
title: Bagikan negara
hint: Memperbolehkan Yanfei untuk menyimpan lokasi negara dimana alamat IP kamu terdaftar untuk membantu melengkapi statistik kami. Tidak ada data lain yang akan disimpan.
participate: Berpartisipasi
skip: Lewati
skip_forever: Lewati dan jangan tanya lagi
# Screenshots window
screenshots:
heading: Screenshots

View file

@ -341,25 +341,6 @@ tos_violation:
cancel: Annulla
discord: Il nostro server Discord
# Analytics window
analytics:
title: La commissione di Yanfei...
header: Partecipa nella collezione di dati anonimi
body:
- Per contare il numero di giocatori attivi su Linux, Yanfei vorrebbe collezionare il tuo indirizzo IP ogni volta che il gioco si aggiorna
- L'indirizzo IP sarà hashato per motivi di sicurezza
actions:
share_country:
title: Condividi paese
hint: Permetti a Yanfei di registrare lo stato del tuo indirizzo IP per raccogliere statistiche più dettagliate.
Nessun altro dato oltre al paese verrà registrato.
participate: Partecipa
skip: Rifiuta
skip_forever: Rifiuta e non chiedere più
# Screenshots window
screenshots:
heading: Screenshots

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: キャンセル
discord: 私達の Discord サーバー
# Analytics window
analytics:
title: 煙緋からのお願い...
header: 匿名データ収集に参加する
body:
- アクティブな Linux ユーザーを収集するため、煙緋はゲーム更新の度に IP アドレスを収集したいようです。
- IP アドレスはセキュリティー保護のためハッシュ化されます
actions:
share_country:
title: 国情報を共有する
hint: より詳細な統計を取るために、あなたの IP アドレスが登録された国を収集できるようにします。国以外のデータは保存されません。
participate: 参加
skip: スキップ
skip_forever: スキップして再質問しない
# Screenshots window
screenshots:
heading: スクリーンショット

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: Avbryt
discord: Vår discord server
# Analytics window
analytics:
title: Yanfei sin kommisjon
header: Delta i anonym datainnhenting
body:
- For å telle den aktive brukerbasen for linux, vil Yanfei samle din IP addresse hver gang spillet oppdaterer
- IP adressen vil bli kryptert for sikkerhetsformål
actions:
share_country:
title: Del land
hint: Tillat Yanfei å lagre landet IP adressen din er registrert i for å gjøre statistikkene mer detaljert. Ingen annen data enn landet ditt vil bli lagret
participate: Delta
skip: Skipp
skip_forever: Skipp og ikke spør igjen
# Screenshots window
screenshots:
heading: Skjermbilder

View file

@ -342,25 +342,6 @@ tos_violation:
cancel: Отменить
discord: Наш Discord сервер
# Окно аналитики
analytics:
title: Просьба Янь Фэй...
header: Примите участие в анонимном сборе данных
body:
- Чтобы посчитать число активных игроков на Linux, Янь Фэй просит их поделиться IP адресом после каждого обновления игры
- IP адрес будет хэширован для обеспечения его безопасности
actions:
share_country:
title: Поделиться названием страны
hint: Разрешить Янь Фэй хранить название страны, к которой привязан ваш IP адрес, чтобы сделать статистику более детальной.
Никаких других данных кроме названия страны сохранено не будет
participate: Участвовать
skip: Пропустить
skip_forever: Пропустить и больше не спрашивать
# Окно скриншотов
screenshots:
heading: Скриншоты

View file

@ -334,23 +334,6 @@ tos_violation:
Bu başlatıcıyı kullanıyorsanız oyun hesabınızın {company}/{company_alterego} tarafından Hizmet Şartları ile uyumlu olmadığı belirlenebilir.
Böyle bir durumda, hesabınız TOS'a uymadığı için {company}/{company_alterego} istediklerini yapmakta özgürdür. Yasaklama dahil.
Oyunu gayri resmi olarak oynamaya çalışmanın riskini anlıyorsanız, Tamam'a basın ve Teyvat'ın dünyasını araştırmaya başlayalım!
# Analytics window
analytics:
title: Yanfei'nin şartı...
header: Gizli şekilde data paylaşmaya izin verin
body:
- Linuxda oynayan oyuncuların sayısını tutmak için Yanfei sizden bilgi alışverişi istiyor
- IP adresinizi güvenlik amacıyla hashlenecektir
actions:
share_country:
title: Ülkeni paylaş
hint: Yanfeinin hangi ülkeden geldiği bilgisine erişmesine izin ver
participate: Katıl
skip: Atla
skip_forever: Atla ve Bir daha sorma
# Screenshots window
screenshots:

View file

@ -342,24 +342,6 @@ tos_violation:
cancel: Cancel
discord: Our discord server
# Analytics window
analytics:
title: Yanfei's commission... (≧◡≦)
header: pawticipate in a-anonymous data cowwection
body:
- to count the active u-user base fow winux, yanfei wouwd wike to c-cowwect youw ip addwess evewytime the g-game updates
- the ip addwess will be hashed f-fow secuwity puwpose
actions:
share_country:
title: share countwy
hint: awwow yanfei t-to store the countwy y-youw ip addwess w-wegistewed in to make statistics more detaiwed (* ^ ω ^) n-no other data than the countwy will be stowed
participate: pawticipate
skip: skip
skip_forever: skip and don't ask again
# Screenshots window
screenshots:
heading: scweenshots

View file

@ -343,24 +343,6 @@ tos_violation:
cancel: 取消
discord: 我们的 discord 服务器
# Analytics window
analytics:
title: 烟绯的委托...
header: 参与匿名数据收集
body:
- 为了统计 Linux 的用户活跃数据,烟绯想在每次游戏更新时收集你的 IP 地址。
- 安全起见, IP 地址将被加密。
actions:
share_country:
title: 分享地区
hint: 为使统计数据更加详细,允许烟绯存储你的 IP 地址注册国家。除了国家之外,没有其他数据会被存储
participate: 加入
skip: 跳过
skip_forever: 跳过并不再询问
# Screenshots window
screenshots:
heading: 截图

View file

@ -1,125 +0,0 @@
<script context="module" lang="ts">
declare const Neutralino;
</script>
<script lang="ts">
import { onMount } from 'svelte';
import { _, locale } from 'svelte-i18n';
import { Configs, Windows, fetch, IPC } from './empathize';
import constants from './ts/Constants';
import Launcher from './ts/Launcher';
import YanfeiIcon from './assets/images/yanfei.png';
import LeftCheckbox from './components/LeftCheckbox.svelte';
import Button from './components/Button.svelte';
let shareCountry = true;
const closeWindow = async () => {
await Neutralino.filesystem.removeFile(`${await constants.paths.launcherDir}/.analytics`);
Neutralino.app.exit();
};
const switchTheme = (theme: string) => {
if (theme === 'system')
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
document.body.setAttribute('data-theme', theme as string);
};
// Auto theme switcher
Configs.get('theme').then((theme) => switchTheme(theme as string));
onMount(async () => {
await Windows.current.show();
if ((!await Launcher.isSteamOs()))
{
await Windows.current.center(700, 460);
// This thing will fix window resizing
// in several cases (wayland + gnome + custom theme)
const resizer = () => {
if (window.innerWidth < 640)
setTimeout(resizer, 10);
else
{
Windows.current.setSize({
width: 700 + (700 - window.innerWidth),
height: 460 + (460 - window.innerHeight),
resizable: false
});
}
}
setTimeout(resizer, 10);
}
});
Neutralino.events.on('windowClose', async () => {
await IPC.write('analytics-close');
Neutralino.app.exit();
});
</script>
{#if typeof $locale === 'string'}
<main>
<div class="header">
<img src={YanfeiIcon} alt="">
<h2>{$_('analytics.header')}</h2>
</div>
<p>{$_('analytics.body.0')}</p>
<p>{$_('analytics.body.1')}</p>
<div class="footer">
<LeftCheckbox
lang="analytics.actions.share_country.title"
tooltip={{
lang: 'analytics.actions.share_country.hint',
direction: 'top',
size: 'large'
}}
valueChanged={(value) => shareCountry = value}
/>
<div class="actions">
<!-- svelte-ignore missing-declaration -->
<Button
lang="analytics.actions.participate"
primary={true}
click={async () => {
await fetch(`${constants.uri.analytics}/${shareCountry ? '' : '?hide-geo'}`);
closeWindow();
}}
/>
<div class="actions-right">
<!-- svelte-ignore missing-declaration -->
<Button
lang="analytics.actions.skip"
click={closeWindow}
/>
<!-- svelte-ignore missing-declaration -->
<Button
lang="analytics.actions.skip_forever"
click={async () => {
await Configs.set('skip_analytics', true);
closeWindow();
}}
/>
</div>
</div>
</div>
</main>
{/if}

View file

@ -231,14 +231,7 @@ export default new Promise<void>(async (resolve) => {
* @default "5d"
*/
launcher: '5d'
},
/**
* Skip analytics window
*
* @default false
*/
skip_analytics: false
}
});
await Configs.flush();

View file

@ -1,11 +0,0 @@
import '../i18n';
import App from '../analytics.svelte';
declare const Neutralino;
Neutralino.init();
export default new App({
target: document.getElementById('app')!
});

View file

@ -1,57 +0,0 @@
@use "sass:map"
@import "basic"
@import "components/button"
@import "components/checkbox"
@mixin themable($theme-name, $theme-map)
body[data-theme=#{$theme-name}]
padding: 32px 64px
background-color: map.get($theme-map, "background")
color: map.get($theme-map, "text")
p, span, div
color: map.get($theme-map, "text")
main
.header
display: inline-flex
img
width: 96px
height: 96px
margin-right: 32px
.footer
position: absolute
bottom: 0
margin-bottom: 32px
width: calc(100% - 128px)
> div
width: 100%
div.checkbox
font-size: medium
.actions
display: inline-flex
margin-top: 48px
.actions-right
margin-left: auto
.button:not(:last-child)
margin-right: 12px
@import "themes/light"
@import "themes/dark"
@include themable(light, $light)
@include themable(dark, $dark)

View file

@ -270,7 +270,6 @@ export default class constants
},
launcher: 'https://github.com/an-anime-team/an-anime-game-launcher',
discord: 'https://discord.gg/ck37X6UWBp',
analytics: 'https://aagl.launcher.moe/stat/',
dxvk_list: 'https://github.com/an-anime-team/an-anime-game-launcher/raw/main/public/dxvks.yaml',
runners_list: 'https://github.com/an-anime-team/an-anime-game-launcher/raw/main/public/runners.yaml'
};

View file

@ -22,10 +22,14 @@ class Stream extends AbstractInstaller
/**
* List of voiceover sizes
*
* 2.8.0 sizes are predicted and can be incorrect
*/
const VOICE_PACKAGES_SIZES = {
'3.2.0': {
'en-us': 8636001252,
'ja-jp': 11644175924,
'ko-kr': 8956792496,
'zh-cn': 7563358032
},
'3.1.0': {
'en-us': 10160526140,
'ja-jp': 11223463952,
@ -37,12 +41,6 @@ const VOICE_PACKAGES_SIZES = {
'ja-jp': 10314955860,
'ko-kr': 7991164050,
'zh-cn': 8103030886
},
'2.8.0': {
'en-us': 8621891855,
'ja-jp': 9479988966,
'ko-kr': 7361278235,
'zh-cn': 7464327416
}
};
@ -125,7 +123,7 @@ export default class Voice
{
let t = {};
t[data.game.latest.version] = wma_predict(Object.values(sizes));
t[data.game.latest.version] = wma_predict(Object.values(sizes).reverse());
sizes = Object.assign(t, sizes);
}

View file

@ -159,46 +159,6 @@ export default class State
});
}
// If there's analytics window waits for its time
else if (await fs.exists(path.join(await constants.paths.launcherDir, '.analytics')))
{
Windows.open('analytics', {
title: Locales.translate<string>('analytics.title'),
width: 700,
height: 460,
exitProcessOnClose: false
});
await new Promise<void>((resolve) => {
const analyticsWaiter = async () => {
let closed = false;
for (const record of await IPC.read())
if (record.data == 'analytics-close')
{
closed = true;
record.pop();
break;
}
if (closed)
resolve();
else
{
if (await fs.exists(path.join(await constants.paths.launcherDir, '.analytics')))
setTimeout(analyticsWaiter, 1000);
else resolve();
}
};
setTimeout(analyticsWaiter, 1000);
});
}
// Show launcher's window
await Windows.current.show();
await Windows.current.center(1280, 700);

View file

@ -106,9 +106,6 @@ export default (launcher: Launcher): Promise<void> => {
]
});
if (!await Configs.get('skip_analytics'))
await Neutralino.filesystem.writeFile(`${await constants.paths.launcherDir}/.analytics`, '');
// Download voice package when the game itself has been installed
import('./InstallVoice').then((module) => {
module.default(launcher).then(() => resolve());

View file

@ -16,7 +16,6 @@ export default defineConfig({
'index.html',
'settings.html',
'splash.html',
'analytics.html',
'tos-violation.html',
'screenshots.html'
]