[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: https://git.eden-emu.dev/eden-emu/eden/pulls/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
No known key found for this signature in database
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 <future>
#include <QColor>
#include <QImage>
@ -59,9 +59,9 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list,
// Restore the settings:
ui->username->setText(
QString::fromStdString(UISettings::values.multiplayer_room_nickname.GetValue()));
if (ui->username->text().isEmpty() && !Settings::values.yuzu_username.GetValue().empty()) {
if (ui->username->text().isEmpty() && !Settings::values.eden_username.GetValue().empty()) {
// Use eden Web Service user name as nickname by default
ui->username->setText(QString::fromStdString(Settings::values.yuzu_username.GetValue()));
ui->username->setText(QString::fromStdString(Settings::values.eden_username.GetValue()));
}
ui->room_name->setText(
QString::fromStdString(UISettings::values.multiplayer_room_name.GetValue()));
@ -167,7 +167,7 @@ void HostRoomWindow::Host() {
const bool created =
room->Create(ui->room_name->text().toStdString(),
ui->room_description->toPlainText().toStdString(), "", port, password,
ui->max_player->value(), Settings::values.yuzu_username.GetValue(),
ui->max_player->value(), Settings::values.eden_username.GetValue(),
game, CreateVerifyBackend(is_public), ban_list);
if (!created) {
NetworkMessage::ErrorManager::ShowError(
@ -206,8 +206,8 @@ void HostRoomWindow::Host() {
#ifdef ENABLE_WEB_SERVICE
if (is_public) {
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());
if (auto room = Network::GetRoom().lock()) {
token = client.GetExternalJWT(room->GetVerifyUID()).returned_data;
}