Allow offline Replays tab (#5519)

This commit is contained in:
RickyRister 2025-01-24 21:44:48 -08:00 committed by GitHub
parent ec6a23de56
commit 19b758591b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 17 deletions

View file

@ -1,8 +1,10 @@
#ifndef TAB_REPLAYS_H
#define TAB_REPLAYS_H
#include "../game_logic/abstract_client.h"
#include "tab.h"
class ServerInfo_User;
class Response;
class AbstractClient;
class QTreeView;
@ -29,9 +31,14 @@ private:
QAction *aOpenReplaysFolder;
QAction *aOpenRemoteReplay, *aDownload, *aKeep, *aDeleteRemoteReplay;
void setRemoteEnabled(bool enabled);
void downloadNodeAtIndex(const QModelIndex &curLeft, const QModelIndex &curRight);
private slots:
void handleConnected(const ServerInfo_User &userInfo);
void handleConnectionChanged(ClientStatus status);
void actLocalDoubleClick(const QModelIndex &curLeft);
void actRenameLocal();
void actOpenLocalReplay();
@ -58,7 +65,7 @@ signals:
void openReplay(GameReplay *replay);
public:
TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client);
TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User *currentUserInfo);
void retranslateUi() override;
QString getTabText() const override
{