This commit is contained in:
Boki 2026-02-26 20:45:24 -05:00
parent 53641fc8e7
commit 657d307485
28 changed files with 2045 additions and 161 deletions

View file

@ -22,6 +22,24 @@ public class LinkManager
public LinkManager(ConfigStore store)
{
_store = store;
// Pre-populate from saved config so UI shows links before Start()
foreach (var saved in store.Links)
{
var url = StripLive(saved.Url);
var id = ExtractId(url);
_links[id] = new TradeLink
{
Id = id,
Url = url,
Name = saved.Name,
Label = ExtractLabel(url),
Active = saved.Active,
Mode = saved.Mode,
PostAction = saved.PostAction,
AddedAt = saved.AddedAt,
};
}
}
public TradeLink AddLink(string url, string name = "", LinkMode? mode = null, PostAction? postAction = null)