1
0
Fork 0
forked from eden-emu/eden

[frontend, web] refactor: web service frontend rewrite (#221)

- Automatic verification based on regex
- Token generation button
- Removed unneeded links
- public lobby creation [android]

Signed-off-by: crueter <swurl@swurl.xyz>
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Co-authored-by: Aleksandr Popovich <alekpopo@proton.me>
Reviewed-on: eden-emu/eden#221
Co-authored-by: crueter <swurl@swurl.xyz>
Co-committed-by: crueter <swurl@swurl.xyz>
This commit is contained in:
crueter 2025-07-01 01:44:12 +00:00 committed by crueter
parent 2fe728766e
commit 94c66f98bf
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: BA8734FD0EE46976
34 changed files with 1985 additions and 327 deletions

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QInputDialog>
#include <QList>
#include <QtConcurrent/QtConcurrentRun>
@ -67,9 +67,9 @@ Lobby::Lobby(QWidget* parent, QStandardItemModel* list,
// Try find the best nickname by default
if (ui->nickname->text().isEmpty() || ui->nickname->text() == QStringLiteral("eden")) {
if (!Settings::values.yuzu_username.GetValue().empty()) {
if (!Settings::values.eden_username.GetValue().empty()) {
ui->nickname->setText(
QString::fromStdString(Settings::values.yuzu_username.GetValue()));
QString::fromStdString(Settings::values.eden_username.GetValue()));
} else if (!GetProfileUsername().empty()) {
ui->nickname->setText(QString::fromStdString(GetProfileUsername()));
} else {
@ -189,11 +189,11 @@ void Lobby::OnJoinRoom(const QModelIndex& source) {
QFuture<void> f = QtConcurrent::run([nickname, ip, port, password, verify_uid] {
std::string token;
#ifdef ENABLE_WEB_SERVICE
if (!Settings::values.yuzu_username.GetValue().empty() &&
!Settings::values.yuzu_token.GetValue().empty()) {
if (!Settings::values.eden_username.GetValue().empty() &&
!Settings::values.eden_token.GetValue().empty()) {
WebService::Client client(Settings::values.web_api_url.GetValue(),
Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
Settings::values.eden_username.GetValue(),
Settings::values.eden_token.GetValue());
token = client.GetExternalJWT(verify_uid).returned_data;
if (token.empty()) {
LOG_ERROR(WebService, "Could not get external JWT, verification may fail");