Quick and dirty telemetry removal to buy us time to fix #53

This commit is contained in:
OpenSauce04 2024-04-11 23:05:10 +01:00
parent 2e4f53ec2b
commit 1c5154dc60
32 changed files with 9 additions and 443 deletions

View File

@ -3893,11 +3893,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonym data bliver indsamlet&lt;/a&gt;for at hjælpe med at forbedre Citra.&lt;br/&gt;&lt;br/&gt;Har du lyst til at dele din brugsdata med os?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3895,11 +3895,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>Möchten Sie &lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;anonyme Nutzungsdaten&lt;/a&gt; an das Citra Team senden und so helfen, Citra weiter zu verbessern?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3894,11 +3894,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Συλλέγονται ανώνυμα δεδομένα&lt;/a&gt; για τη βελτίωση του Citra. &lt;br/&gt;&lt;br/&gt;Θέλετε να μοιραστείτε τα δεδομένα χρήσης σας με εμάς;</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Por favor, compruebe la instalación de FFmpeg usada para la compilación.</tran
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Se recogen datos anónimos&lt;/a&gt; para ayudar a mejorar Citra. &lt;br/&gt;&lt;br/&gt;¿Quieres compartir tus datos de uso con nosotros?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3893,11 +3893,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonyymiä tietoa kerätään&lt;/a&gt;parantaaksemme Citraa. &lt;br/&gt;&lt;br/&gt;Haluaisitko jakaa käyttötetoa meidän kanssa?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Veuillez vérifier votre installation FFmpeg utilisée pour la compilation.</tra
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Des données anonymes sont collectées&lt;/a&gt; afin d&apos;aider à l&apos;amélioration de Citra. &lt;br/&gt;&lt;br/&gt;Souhaitez vous communiquer vos données avec nous ?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3892,11 +3892,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3895,11 +3895,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Data anonim dikumpulkan&lt;/a&gt;untuk membantu Citra menjadi lebih baik. &lt;br/&gt;&lt;br/&gt;Apakah Anda ingin membagikan penggunaan data Anda dengan kami?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Verifica l&apos;installazione di FFmpeg usata per la compilazione.</translation>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Vengono raccolti dati anonimi &lt;/a&gt; per aiutare lo sviluppo di Citra. &lt;br/&gt;&lt;br/&gt;Vuoi condividere i tuoi dati di utilizzo con noi?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3897,11 +3897,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;匿名のデータ&lt;/a&gt;がCitraの改善のために収集されます&lt;br/&gt;&lt;br/&gt;利用状況データの提供に同意しますか?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>Citra를 &lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;익명데이터가 수집됩니다&lt;/a&gt;. &lt;br/&gt;&lt;br/&gt;사용 데이터를 공유하시겠습니까?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3891,11 +3891,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anoniminiai duomenys yra renkami &lt;/a&gt; kad padėtumėte Citra komandai. &lt;br/&gt;&lt;br/&gt;Ar norite pasidalinti savo duomenimis su mumis?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3894,11 +3894,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonym data samles inn&lt;/a&gt; for å forbedre Citra. &lt;br/&gt;&lt;br/&gt;Vil du dele dine brukerdata med oss?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Controleer de FFmpeg-installatie die wordt gebruikt voor de compilatie.</transla
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonieme gegevens worden verzameld&lt;/a&gt; om Citra te helpen verbeteren. &lt;br/&gt;&lt;br/&gt; Wilt u uw gebruiksgegevens met ons delen?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3893,11 +3893,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonimowe dane są zbierane&lt;/a&gt; w celu wsparcia rozwoju Citry. &lt;br/&gt;&lt;br/&gt;Czy chciałbyś się z nami podzielić danymi użytkowania?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3895,11 +3895,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Dados anônimos são recolhidos&lt;/a&gt; para ajudar a melhorar o Citra. &lt;br/&gt;&lt;br/&gt;Gostaria de compartilhar os seus dados de utilização conosco?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3894,11 +3894,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Date anonime sunt colectate&lt;/a&gt; pentru a ajuta îmbunătățirea lui Citra. &lt;br/&gt;&lt;br/&gt; Doriți să partajați uzul de datele cu noi?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3898,11 +3898,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>Для оказания помощи в улучшении приложения Citra &lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;проводится сбор анонимных данных&lt;/a&gt;. &lt;br/&gt;&lt;br/&gt;Поделиться данными об использовании?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3893,11 +3893,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Citrayı geliştirmeye yardımcı olmak için&lt;/a&gt; anonim veri toplandı. &lt;br/&gt;&lt;br/&gt;Kullanım verinizi bizimle paylaşmak ister misiniz?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3893,11 +3893,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Dữ liệu ẩn danh được thu thập&lt;/a&gt; để giúp cải thiện Citra. &lt;br/&gt;&lt;br/&gt;Bạn có muốn chia sẻ dữ liệu của bạn với chúng tôi?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3896,11 +3896,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;我们收集匿名数据&lt;/a&gt;来帮助改进 Citra 。&lt;br/&gt;&lt;br/&gt;您愿意和我们分享你的使用数据吗?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -3894,11 +3894,6 @@ Please check your FFmpeg installation used for compilation.</source>
</context>
<context>
<name>GMainWindow</name>
<message>
<location filename="../../src/lime_qt/main.cpp" line="144"/>
<source>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;Anonymous data is collected&lt;/a&gt; to help improve Citra. &lt;br/&gt;&lt;br/&gt;Would you like to share your usage data with us?</source>
<translation>&lt;a href=&apos;https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/&apos;&gt;收集匿名的使用資料&lt;/a&gt;可以用來改善 Citra。&lt;br/&gt;&lt;br/&gt;您同意將您的使用資料分享給 Citra 嗎?</translation>
</message>
<message>
<location filename="../../src/lime_qt/main.cpp" line="147"/>
<source>Telemetry</source>

View File

@ -266,8 +266,7 @@ void Config::ReadValues() {
// Web Service
NetSettings::values.enable_telemetry =
sdl2_config->GetBoolean("WebService", "enable_telemetry", false);
NetSettings::values.web_api_url =
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
NetSettings::values.web_api_url = sdl2_config->GetString("WebService", "web_api_url", "");
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
NetSettings::values.citra_token = sdl2_config->GetString("WebService", "citra_token", "");
}

View File

@ -357,7 +357,7 @@ gdbstub_port=24689
# 0 (default): No, 1: Yes
enable_telemetry =
# URL for Web API
web_api_url = https://api.citra-emu.org
web_api_url =
# Username and token for Citra Web Service
# See https://profile.citra-emu.org/ for more info
citra_username =

View File

@ -328,8 +328,7 @@ void Config::ReadValues() {
// Web Service
NetSettings::values.enable_telemetry =
sdl2_config->GetBoolean("WebService", "enable_telemetry", false);
NetSettings::values.web_api_url =
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
NetSettings::values.web_api_url = sdl2_config->GetString("WebService", "web_api_url", "");
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
NetSettings::values.citra_token = sdl2_config->GetString("WebService", "citra_token", "");

View File

@ -365,7 +365,7 @@ renderer_debug =
# 0 (default): No, 1: Yes
enable_telemetry =
# URL for Web API
web_api_url = https://api.citra-emu.org
web_api_url =
# Username and token for Citra Web Service
# See https://profile.citra-emu.org/ for more info
citra_username =

View File

@ -839,9 +839,7 @@ void Config::ReadWebServiceValues() {
NetSettings::values.enable_telemetry =
ReadSetting(QStringLiteral("enable_telemetry"), false).toBool();
NetSettings::values.web_api_url =
ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("https://api.citra-emu.org"))
.toString()
.toStdString();
ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("")).toString().toStdString();
NetSettings::values.citra_username =
ReadSetting(QStringLiteral("citra_username")).toString().toStdString();
NetSettings::values.citra_token =
@ -1319,8 +1317,7 @@ void Config::SaveWebServiceValues() {
WriteSetting(QStringLiteral("enable_telemetry"), NetSettings::values.enable_telemetry, false);
WriteSetting(QStringLiteral("web_api_url"),
QString::fromStdString(NetSettings::values.web_api_url),
QStringLiteral("https://api.citra-emu.org"));
QString::fromStdString(NetSettings::values.web_api_url), QStringLiteral(""));
WriteSetting(QStringLiteral("citra_username"),
QString::fromStdString(NetSettings::values.citra_username));
WriteSetting(QStringLiteral("citra_token"),

View File

@ -57,7 +57,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, Cor
ui->tabWidget->addTab(ui_tab.get(), tr("UI"));
hotkeys_tab->Populate(registry);
web_tab->SetWebServiceConfigEnabled(enable_web_config);
PopulateSelectionList();

View File

@ -11,41 +11,12 @@
#include "network/network_settings.h"
#include "ui_configure_web.h"
static constexpr char token_delimiter{':'};
static std::string GenerateDisplayToken(const std::string& username, const std::string& token) {
if (username.empty() || token.empty()) {
return {};
}
const std::string unencoded_display_token{username + token_delimiter + token};
QByteArray b{unencoded_display_token.c_str()};
QByteArray b64 = b.toBase64();
return b64.toStdString();
}
static std::string UsernameFromDisplayToken(const std::string& display_token) {
const std::string unencoded_display_token{
QByteArray::fromBase64(display_token.c_str()).toStdString()};
return unencoded_display_token.substr(0, unencoded_display_token.find(token_delimiter));
}
static std::string TokenFromDisplayToken(const std::string& display_token) {
const std::string unencoded_display_token{
QByteArray::fromBase64(display_token.c_str()).toStdString()};
return unencoded_display_token.substr(unencoded_display_token.find(token_delimiter) + 1);
}
ConfigureWeb::ConfigureWeb(QWidget* parent)
: QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()) {
ui->setupUi(this);
connect(ui->button_regenerate_telemetry_id, &QPushButton::clicked, this,
&ConfigureWeb::RefreshTelemetryID);
connect(ui->button_verify_login, &QPushButton::clicked, this, &ConfigureWeb::VerifyLogin);
connect(&verify_watcher, &QFutureWatcher<bool>::finished, this, &ConfigureWeb::OnLoginVerified);
#ifndef USE_DISCORD_PRESENCE
ui->discord_group->setVisible(false);
ui->discord_group->setEnabled(false);
#endif
SetConfiguration();
}
@ -53,113 +24,13 @@ ConfigureWeb::ConfigureWeb(QWidget* parent)
ConfigureWeb::~ConfigureWeb() = default;
void ConfigureWeb::SetConfiguration() {
ui->web_credentials_disclaimer->setWordWrap(true);
ui->telemetry_learn_more->setOpenExternalLinks(true);
ui->telemetry_learn_more->setText(tr("<a "
"href='https://citra-emu.org/entry/"
"telemetry-and-why-thats-a-good-thing/'><span "
"style=\"text-decoration: underline; "
"color:#039be5;\">Learn more</span></a>"));
ui->web_signup_link->setOpenExternalLinks(true);
ui->web_signup_link->setText(
tr("<a href='https://profile.citra-emu.org/'><span style=\"text-decoration: underline; "
"color:#039be5;\">Sign up</span></a>"));
ui->web_token_info_link->setOpenExternalLinks(true);
ui->web_token_info_link->setText(
tr("<a href='https://citra-emu.org/wiki/citra-web-service/'><span style=\"text-decoration: "
"underline; color:#039be5;\">What is my token?</span></a>"));
ui->toggle_telemetry->setChecked(NetSettings::values.enable_telemetry);
if (NetSettings::values.citra_username.empty()) {
ui->username->setText(tr("Unspecified"));
} else {
ui->username->setText(QString::fromStdString(NetSettings::values.citra_username));
}
ui->edit_token->setText(QString::fromStdString(
GenerateDisplayToken(NetSettings::values.citra_username, NetSettings::values.citra_token)));
// Connect after setting the values, to avoid calling OnLoginChanged now
connect(ui->edit_token, &QLineEdit::textChanged, this, &ConfigureWeb::OnLoginChanged);
ui->label_telemetry_id->setText(
tr("Telemetry ID: 0x%1").arg(QString::number(Core::GetTelemetryId(), 16).toUpper()));
user_verified = true;
ui->toggle_discordrpc->setChecked(UISettings::values.enable_discord_presence.GetValue());
}
void ConfigureWeb::ApplyConfiguration() {
NetSettings::values.enable_telemetry = ui->toggle_telemetry->isChecked();
UISettings::values.enable_discord_presence = ui->toggle_discordrpc->isChecked();
if (user_verified) {
NetSettings::values.citra_username =
UsernameFromDisplayToken(ui->edit_token->text().toStdString());
NetSettings::values.citra_token =
TokenFromDisplayToken(ui->edit_token->text().toStdString());
} else {
QMessageBox::warning(
this, tr("Token not verified"),
tr("Token was not verified. The change to your token has not been saved."));
}
}
void ConfigureWeb::RefreshTelemetryID() {
const u64 new_telemetry_id{Core::RegenerateTelemetryId()};
ui->label_telemetry_id->setText(
tr("Telemetry ID: 0x%1").arg(QString::number(new_telemetry_id, 16).toUpper()));
}
void ConfigureWeb::OnLoginChanged() {
if (ui->edit_token->text().isEmpty()) {
user_verified = true;
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16);
ui->label_token_verified->setPixmap(pixmap);
} else {
user_verified = false;
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16);
ui->label_token_verified->setPixmap(pixmap);
}
}
void ConfigureWeb::VerifyLogin() {
ui->button_verify_login->setDisabled(true);
ui->button_verify_login->setText(tr("Verifying..."));
verify_watcher.setFuture(QtConcurrent::run(
[username = UsernameFromDisplayToken(ui->edit_token->text().toStdString()),
token = TokenFromDisplayToken(ui->edit_token->text().toStdString())] {
return Core::VerifyLogin(username, token);
}));
}
void ConfigureWeb::OnLoginVerified() {
ui->button_verify_login->setEnabled(true);
ui->button_verify_login->setText(tr("Verify"));
if (verify_watcher.result()) {
user_verified = true;
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16);
ui->label_token_verified->setPixmap(pixmap);
ui->username->setText(
QString::fromStdString(UsernameFromDisplayToken(ui->edit_token->text().toStdString())));
} else {
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16);
ui->label_token_verified->setPixmap(pixmap);
ui->username->setText(tr("Unspecified"));
QMessageBox::critical(this, tr("Verification failed"),
tr("Verification failed. Check that you have entered your token "
"correctly, and that your internet connection is working."));
}
}
void ConfigureWeb::RetranslateUI() {
ui->retranslateUi(this);
}
void ConfigureWeb::SetWebServiceConfigEnabled(bool enabled) {
ui->label_disable_info->setVisible(!enabled);
ui->groupBoxWebConfig->setEnabled(enabled);
}

View File

@ -22,7 +22,6 @@ public:
void ApplyConfiguration();
void RetranslateUI();
void SetConfiguration();
void SetWebServiceConfigEnabled(bool enabled);
private:
void RefreshTelemetryID();

View File

@ -14,163 +14,6 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBoxWebConfig">
<property name="title">
<string>Lime3DS Web Service</string>
</property>
<layout class="QVBoxLayout" name="verticalLayoutCitraWebService">
<item>
<widget class="QLabel" name="web_credentials_disclaimer">
<property name="text">
<string>Currently not supported by Lime. By providing your username and token, you agree to allow Citra to collect additional usage data, which may include user identifying information.</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayoutCitraUsername">
<item row="2" column="3">
<widget class="QPushButton" name="button_verify_login">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Verify</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="web_signup_link">
<property name="text">
<string>Sign up</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="3">
<widget class="QLabel" name="username"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_token">
<property name="text">
<string>Token: </string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_token_verified"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_username">
<property name="text">
<string>Username: </string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="QLineEdit" name="edit_token">
<property name="maxLength">
<number>80</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="web_token_info_link">
<property name="text">
<string>What is my token?</string>
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label_disable_info">
<property name="text">
<string>Web Service configuration can only be changed when a public room isn't being hosted.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Telemetry</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="toggle_telemetry">
<property name="text">
<string>Share anonymous usage data with the Lime3DS team</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="telemetry_learn_more">
<property name="text">
<string>Learn more</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayoutTelemetryId">
<item row="0" column="0">
<widget class="QLabel" name="label_telemetry_id">
<property name="text">
<string>Telemetry ID:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="button_regenerate_telemetry_id">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Regenerate</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="discord_group">
<property name="title">
@ -203,10 +46,6 @@
</layout>
</widget>
<tabstops>
<tabstop>edit_token</tabstop>
<tabstop>button_verify_login</tabstop>
<tabstop>toggle_telemetry</tabstop>
<tabstop>button_regenerate_telemetry_id</tabstop>
<tabstop>toggle_discordrpc</tabstop>
</tabstops>
<resources/>

View File

@ -123,33 +123,6 @@ __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
constexpr int default_mouse_timeout = 2500;
/**
* "Callouts" are one-time instructional messages shown to the user. In the config settings, there
* is a bitfield "callout_flags" options, used to track if a message has already been shown to the
* user. This is 32-bits - if we have more than 32 callouts, we should retire and recycle old ones.
*/
enum class CalloutFlag : uint32_t {
Telemetry = 0x1,
};
void GMainWindow::ShowTelemetryCallout() {
if (UISettings::values.callout_flags.GetValue() &
static_cast<uint32_t>(CalloutFlag::Telemetry)) {
return;
}
UISettings::values.callout_flags =
UISettings::values.callout_flags.GetValue() | static_cast<uint32_t>(CalloutFlag::Telemetry);
const QString telemetry_message =
tr("<a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous "
"data is collected</a> to help improve Citra. "
"<br/><br/>Would you like to share your usage data with us?");
if (QMessageBox::question(this, tr("Telemetry"), telemetry_message) == QMessageBox::Yes) {
NetSettings::values.enable_telemetry = true;
system.ApplySettings();
}
}
const int GMainWindow::max_recent_files_item;
static QString PrettyProductName() {
@ -263,8 +236,8 @@ GMainWindow::GMainWindow(Core::System& system_)
game_list->LoadCompatibilityList();
game_list->PopulateAsync(UISettings::values.game_dirs);
// Show one-time "callout" messages to the user
ShowTelemetryCallout();
NetSettings::values.enable_telemetry = false;
system.ApplySettings();
mouse_hide_timer.setInterval(default_mouse_timeout);
connect(&mouse_hide_timer, &QTimer::timeout, this, &GMainWindow::HideMouseCursor);