[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 <chrono>
#include <future>
#include <vector>
@ -13,9 +13,9 @@
#include "common/settings.h"
#include "network/network.h"
#ifdef ENABLE_WEB_SERVICE
//#ifdef ENABLE_WEB_SERVICE
#include "web_service/announce_room_json.h"
#endif
//#endif
namespace Core {
@ -23,13 +23,13 @@ namespace Core {
static constexpr std::chrono::seconds announce_time_interval(15);
AnnounceMultiplayerSession::AnnounceMultiplayerSession() {
#ifdef ENABLE_WEB_SERVICE
//#ifdef ENABLE_WEB_SERVICE
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
#else
backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
#endif
Settings::values.eden_username.GetValue(),
Settings::values.eden_token.GetValue());
//#else
// backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
//#endif
}
WebService::WebResult AnnounceMultiplayerSession::Register() {
@ -156,11 +156,11 @@ bool AnnounceMultiplayerSession::IsRunning() const {
void AnnounceMultiplayerSession::UpdateCredentials() {
ASSERT_MSG(!IsRunning(), "Credentials can only be updated when session is not running");
#ifdef ENABLE_WEB_SERVICE
//#ifdef ENABLE_WEB_SERVICE
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
#endif
Settings::values.eden_username.GetValue(),
Settings::values.eden_token.GetValue());
//#endif
}
} // namespace Core