7 changed files with 2 additions and 268 deletions
@ -1,162 +0,0 @@
|
||||
[ |
||||
{ |
||||
"Id": 1, |
||||
"WebSectionModelId": 2, |
||||
"Name": "Database", |
||||
"Description": "Database of game information", |
||||
"Href": "database", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 2, |
||||
"WebSectionModelId": 1, |
||||
"Name": "Build Calculator", |
||||
"Description": "Build order calculator for determining army timings", |
||||
"Href": "build-calculator", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 3, |
||||
"WebSectionModelId": 1, |
||||
"Name": "Harass Calculator", |
||||
"Description": "Alloy harassment calculator", |
||||
"Href": "harass-calculator", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 4, |
||||
"WebSectionModelId": 1, |
||||
"Name": "Memory Tester", |
||||
"Description": "Testing memory", |
||||
"Href": "memory-tester", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 5, |
||||
"WebSectionModelId": 1, |
||||
"Name": "Comparion Charts", |
||||
"Description": "Ecnomy charts to compare build orders", |
||||
"Href": "comparison-charts", |
||||
"IsPrivate": "True" |
||||
}, |
||||
{ |
||||
"Id": 6, |
||||
"WebSectionModelId": 2, |
||||
"Name": "Notes", |
||||
"Description": "General player notes", |
||||
"Href": "notes", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 7, |
||||
"WebSectionModelId": 2, |
||||
"Name": "Key Mapping", |
||||
"Description": "General key mapping info", |
||||
"Href": "keymapping", |
||||
"IsPrivate": "True" |
||||
}, |
||||
{ |
||||
"Id": 8, |
||||
"WebSectionModelId": 4, |
||||
"Name": "Milestones", |
||||
"Description": "Link to Milestones on GitHub", |
||||
"Href": "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/milestones", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 9, |
||||
"WebSectionModelId": 4, |
||||
"Name": "Commits", |
||||
"Description": "Link to Commits on GitHub", |
||||
"Href": "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/commits/main", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 10, |
||||
"WebSectionModelId": 4, |
||||
"Name": "Tasks", |
||||
"Description": "Link to Tasks on GitHub", |
||||
"Href": "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/projects/3", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 11, |
||||
"WebSectionModelId": 4, |
||||
"Name": "Code", |
||||
"Description": "Link to Code on GitHub", |
||||
"Href": "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 12, |
||||
"WebSectionModelId": 2, |
||||
"Name": "Documentation", |
||||
"Description": "Explaining how to use this website", |
||||
"Href": "documentation", |
||||
"IsPrivate": "True" |
||||
}, |
||||
{ |
||||
"Id": 13, |
||||
"WebSectionModelId": 3, |
||||
"Name": "About", |
||||
"Description": "Answering general questions on the website", |
||||
"Href": "about", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 14, |
||||
"WebSectionModelId": 3, |
||||
"Name": "Contact", |
||||
"Description": "My contact info", |
||||
"Href": "contact", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 15, |
||||
"WebSectionModelId": 3, |
||||
"Name": "Streams", |
||||
"Description": "Stream info", |
||||
"Href": "streams", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 16, |
||||
"WebSectionModelId": 4, |
||||
"Name": "Wiki", |
||||
"Description": "Link to Wiki on GitHub", |
||||
"Href": "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/wiki", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 17, |
||||
"WebSectionModelId": 5, |
||||
"Name": "Permissions", |
||||
"Description": "Permission Settings", |
||||
"Href": "permissions", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 18, |
||||
"WebSectionModelId": 5, |
||||
"Name": "Data Collection", |
||||
"Description": "Data Collection Settings", |
||||
"Href": "data-collection", |
||||
"IsPrivate": "True" |
||||
}, |
||||
{ |
||||
"Id": 19, |
||||
"WebSectionModelId": 5, |
||||
"Name": "Storage", |
||||
"Description": "Storage Settings", |
||||
"Href": "storage", |
||||
"IsPrivate": "False" |
||||
}, |
||||
{ |
||||
"Id": 20, |
||||
"WebSectionModelId": 1, |
||||
"Name": "Economy Comparison", |
||||
"Description": "Compare economies", |
||||
"Href": "economy-comparison", |
||||
"IsPrivate": "False" |
||||
} |
||||
] |
||||
@ -1,52 +0,0 @@
|
||||
[ |
||||
{ |
||||
"Id": 1, |
||||
"Name": "Tools", |
||||
"Description": "Tools Stuff", |
||||
"Order": 1, |
||||
"IsPrivate": "False", |
||||
"Icon": "fa-screwdriver-wrench", |
||||
"OnlyIcon": false, |
||||
"WebPageModels": [] |
||||
}, |
||||
{ |
||||
"Id": 2, |
||||
"Name": "Resources", |
||||
"Description": "Resources Stuff", |
||||
"Order": 2, |
||||
"IsPrivate": "False", |
||||
"Icon": "fa-toolbox", |
||||
"OnlyIcon": false, |
||||
"WebPageModels": [] |
||||
}, |
||||
{ |
||||
"Id": 3, |
||||
"Name": "General", |
||||
"Description": "About Stuff", |
||||
"Order": 3, |
||||
"IsPrivate": "False", |
||||
"Icon": "fa-circle-info", |
||||
"OnlyIcon": false, |
||||
"WebPageModels": [] |
||||
}, |
||||
{ |
||||
"Id": 4, |
||||
"Name": "Development", |
||||
"Description": "Development Stuff", |
||||
"Order": 4, |
||||
"IsPrivate": "False", |
||||
"Icon": "fa-code", |
||||
"OnlyIcon": false, |
||||
"WebPageModels": [] |
||||
}, |
||||
{ |
||||
"Id": 5, |
||||
"Name": "Settings", |
||||
"Description": "Settings Stuff", |
||||
"Order": 5, |
||||
"IsPrivate": "False", |
||||
"Icon": "fa-gear", |
||||
"OnlyIcon": false, |
||||
"WebPageModels": [] |
||||
} |
||||
] |
||||
@ -1,36 +0,0 @@
|
||||
using System.Net.Http.Json; |
||||
using Model; |
||||
|
||||
namespace Services.Website; |
||||
|
||||
public class VariableService : IVariableService |
||||
{ |
||||
private readonly HttpClient httpClient; |
||||
|
||||
private bool isLoaded; |
||||
|
||||
|
||||
public VariableService(HttpClient httpClient) |
||||
{ |
||||
this.httpClient = httpClient; |
||||
} |
||||
|
||||
public Dictionary<string, string> Variables { get; set; } = new(); |
||||
|
||||
public bool IsLoaded() |
||||
{ |
||||
return isLoaded; |
||||
} |
||||
|
||||
public async Task Load() |
||||
{ |
||||
if (isLoaded) return; |
||||
|
||||
var variables = (await httpClient.GetFromJsonAsync<Variable[]>("generated/Variables.json"))! |
||||
.ToList(); |
||||
|
||||
foreach (var variable in variables) Variables.Add(variable.Key, variable.Value); |
||||
|
||||
isLoaded = true; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue