Add Nameplates + Clean up.

* Yeet Token!

* Cleaning up workflow

* Testing auto version bump

* ExistingNames

* Remove a key

* Github Token no work

* Changing Assembly Version

* Version Fix

* Fixing version v2

* Cleanup naming

* Update LightlessSync.csproj

* Add nameplate settings + run code clean up

* purple
This commit is contained in:
defnotken
2025-08-29 18:48:01 -05:00
committed by GitHub
parent 15bf87feb4
commit 23c57aedc4
61 changed files with 377 additions and 202 deletions

View File

@@ -0,0 +1,12 @@
namespace LightlessSync.LightlessConfiguration.Models;
[Serializable]
public record Authentication
{
public string CharacterName { get; set; } = string.Empty;
public uint WorldId { get; set; } = 0;
public int SecretKeyIdx { get; set; } = -1;
public string? UID { get; set; }
public bool AutoLogin { get; set; } = true;
public ulong? LastSeenCID { get; set; } = null;
}

View File

@@ -0,0 +1,8 @@
namespace LightlessSync.LightlessConfiguration.Models;
[Serializable]
public class CharaDataFavorite
{
public DateTime LastDownloaded { get; set; } = DateTime.MaxValue;
public string CustomDescription { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,8 @@
namespace LightlessSync.LightlessConfiguration.Models;
public enum DownloadSpeeds
{
Bps,
KBps,
MBps
}

View File

@@ -0,0 +1,16 @@
namespace LightlessSync.LightlessConfiguration.Models;
public enum NotificationLocation
{
Nowhere,
Chat,
Toast,
Both
}
public enum NotificationType
{
Info,
Warning,
Error
}

View File

@@ -0,0 +1,29 @@
namespace LightlessSync.LightlessConfiguration.Models.Obsolete;
[Serializable]
[Obsolete("Deprecated, use ServerStorage")]
public class ServerStorageV0
{
public List<Authentication> Authentications { get; set; } = [];
public bool FullPause { get; set; } = false;
public Dictionary<string, string> GidServerComments { get; set; } = new(StringComparer.Ordinal);
public HashSet<string> OpenPairTags { get; set; } = new(StringComparer.Ordinal);
public Dictionary<int, SecretKey> SecretKeys { get; set; } = [];
public HashSet<string> ServerAvailablePairTags { get; set; } = new(StringComparer.Ordinal);
public string ServerName { get; set; } = string.Empty;
public string ServerUri { get; set; } = string.Empty;
public Dictionary<string, string> UidServerComments { get; set; } = new(StringComparer.Ordinal);
public Dictionary<string, List<string>> UidServerPairedUserTags { get; set; } = new(StringComparer.Ordinal);
public ServerStorage ToV1()
{
return new ServerStorage()
{
ServerUri = ServerUri,
ServerName = ServerName,
Authentications = [.. Authentications],
FullPause = FullPause,
SecretKeys = SecretKeys.ToDictionary(p => p.Key, p => p.Value)
};
}
}

View File

@@ -0,0 +1,8 @@
namespace LightlessSync.LightlessConfiguration.Models;
[Serializable]
public class SecretKey
{
public string FriendlyName { get; set; } = string.Empty;
public string Key { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,7 @@
namespace LightlessSync.LightlessConfiguration.Models;
public class ServerNotesStorage
{
public Dictionary<string, string> GidServerComments { get; set; } = new(StringComparer.Ordinal);
public Dictionary<string, string> UidServerComments { get; set; } = new(StringComparer.Ordinal);
}

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Http.Connections;
namespace LightlessSync.LightlessConfiguration.Models;
[Serializable]
public class ServerStorage
{
public List<Authentication> Authentications { get; set; } = [];
public bool FullPause { get; set; } = false;
public Dictionary<int, SecretKey> SecretKeys { get; set; } = [];
public string ServerName { get; set; } = string.Empty;
public string ServerUri { get; set; } = string.Empty;
public bool UseOAuth2 { get; set; } = false;
public string? OAuthToken { get; set; } = null;
public HttpTransportType HttpTransportType { get; set; } = HttpTransportType.WebSockets;
public bool ForceWebSockets { get; set; } = false;
}

View File

@@ -0,0 +1,9 @@
namespace LightlessSync.LightlessConfiguration.Models;
[Serializable]
public class ServerTagStorage
{
public HashSet<string> OpenPairTags { get; set; } = new(StringComparer.Ordinal);
public HashSet<string> ServerAvailablePairTags { get; set; } = new(StringComparer.Ordinal);
public Dictionary<string, List<string>> UidServerPairedUserTags { get; set; } = new(StringComparer.Ordinal);
}