mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-16 13:22:41 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user