mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:37:22 +01:00
Merge branch 'main' of https://github.com/Penumbra-Sync/client
This commit is contained in:
commit
02d98cb15c
34 changed files with 1496 additions and 739 deletions
|
|
@ -55,6 +55,12 @@ public sealed class CommandManagerService : IDisposable
|
|||
|
||||
if (string.Equals(splitArgs[0], "toggle", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (_apiController.ServerState == WebAPI.SignalR.Utils.ServerState.Disconnecting)
|
||||
{
|
||||
_mediator.Publish(new NotificationMessage("Mare disconnecting", "Cannot use /toggle while Mare Synchronos is still disconnecting",
|
||||
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
|
||||
}
|
||||
|
||||
if (_serverConfigurationManager.CurrentServer == null) return;
|
||||
var fullPause = splitArgs.Length > 1 ? splitArgs[1] switch
|
||||
{
|
||||
|
|
|
|||
80
MareSynchronos/Services/MareProfileManager.cs
Normal file
80
MareSynchronos/Services/MareProfileManager.cs
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,6 @@
|
|||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Interface.Internal.Notifications;
|
||||
using MareSynchronos.API.Data;
|
||||
using MareSynchronos.API.Dto;
|
||||
using MareSynchronos.PlayerData.Handlers;
|
||||
using MareSynchronos.WebAPI.Files.Models;
|
||||
|
|
@ -54,5 +55,6 @@ public record DownloadStartedMessage(GameObjectHandler DownloadId, Dictionary<st
|
|||
public record DownloadFinishedMessage(GameObjectHandler DownloadId) : IMessage;
|
||||
public record UiToggleMessage(Type UiType) : IMessage;
|
||||
public record PlayerUploadingMessage(GameObjectHandler Handler, bool IsUploading) : IMessage;
|
||||
public record ClearProfileDataMessage(UserData? UserData = null) : IMessage;
|
||||
|
||||
#pragma warning restore MA0048 // File name must match type name
|
||||
|
|
@ -23,17 +23,29 @@ public class ServerConfigurationManager
|
|||
_serverTagConfig = serverTagConfig;
|
||||
_notesConfig = notesConfig;
|
||||
_dalamudUtil = dalamudUtil;
|
||||
|
||||
if (_configService.Current.CurrentServer < 0)
|
||||
{
|
||||
_configService.Current.CurrentServer = 0;
|
||||
_configService.Save();
|
||||
}
|
||||
}
|
||||
|
||||
public string CurrentApiUrl => CurrentServer.ServerUri;
|
||||
public ServerStorage CurrentServer => _configService.Current.ServerStorage[CurrentServerIndex];
|
||||
public int CurrentServerIndex => _configService.Current.CurrentServer;
|
||||
|
||||
public int CurrentServerIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
_configService.Current.CurrentServer = value;
|
||||
_configService.Save();
|
||||
}
|
||||
get
|
||||
{
|
||||
if (_configService.Current.CurrentServer < 0)
|
||||
{
|
||||
_configService.Current.CurrentServer = 0;
|
||||
_configService.Save();
|
||||
}
|
||||
|
||||
return _configService.Current.CurrentServer;
|
||||
}
|
||||
}
|
||||
|
||||
public string? GetSecretKey(int serverIdx = -1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue