Browse Source

wip(Settings) Adding stub setting pages

main
Jonathan McCaffrey 4 years ago
parent
commit
2ea7d67706
  1. BIN
      IGP/Database.db
  2. 21
      IGP/Pages/AnaltyicsPage.razor
  3. 34
      IGP/Pages/BuildCalculator/BuildCalculatorPage.razor
  4. 25
      IGP/Pages/BuildCalculator/Parts/OptionsComponent.razor
  5. 12
      IGP/Pages/BuildCalculator/Parts/TimingComponent.razor
  6. 44
      IGP/Pages/PermissionsPage.razor
  7. 2
      IGP/Pages/RoadMap/Parts/RoadMapComponent.razor
  8. 20
      IGP/Pages/StoragePage.razor
  9. 2
      IGP/wwwroot/generated/WebPageModels.json
  10. 2
      IGP/wwwroot/generated/WebSectionModels.json

BIN
IGP/Database.db

Binary file not shown.

21
IGP/Pages/AnaltyicsPage.razor

@ -0,0 +1,21 @@
@page "/analytics"
@layout PageLayout
<LayoutMediumContentComponent>
<AlertComponent>
<Title>Not Implemented</Title>
<Message></Message>
</AlertComponent>
<PaperComponent>
TODO
</PaperComponent>
<ContentDividerComponent/>
<PaperComponent>
</PaperComponent>
</LayoutMediumContentComponent>

34
IGP/Pages/BuildCalculator/BuildCalculatorPage.razor

@ -33,17 +33,17 @@
<TimingComponent></TimingComponent> <TimingComponent></TimingComponent>
</InfoTooltipComponent> </InfoTooltipComponent>
</PanelComponent> </PanelComponent>
<PanelComponent> <PanelComponent>
<InfoTooltipComponent InfoText="@locale["Tooltip Filter Info"]"> <InfoTooltipComponent InfoText="@locale["Tooltip Filter Info"]">
<FilterComponent></FilterComponent> <FilterComponent></FilterComponent>
</InfoTooltipComponent> </InfoTooltipComponent>
</PanelComponent> </PanelComponent>
<PanelComponent> <PanelComponent>
<InfoTooltipComponent InfoText="@locale["Tooltip Options Info"]"> <InfoTooltipComponent InfoText="@locale["Tooltip Options Info"]">
<OptionsComponent></OptionsComponent> <OptionsComponent></OptionsComponent>
</InfoTooltipComponent> </InfoTooltipComponent>
</PanelComponent> </PanelComponent>
</div> </div>
@ -228,11 +228,13 @@
private void OnResetClicked() private void OnResetClicked()
{ {
toastService.AddToast(new ToastModel(){ toastService.AddToast(new ToastModel
SeverityType = SeverityType.Success, {
Message = "Build order has been cleared.", SeverityType = SeverityType.Success,
Title = "Reset"}); Message = "Build order has been cleared.",
Title = "Reset"
});
buildOrderService.Reset(); buildOrderService.Reset();
} }

25
IGP/Pages/BuildCalculator/Parts/OptionsComponent.razor

@ -13,16 +13,16 @@
<FormLabelComponent>Building Input Delay</FormLabelComponent> <FormLabelComponent>Building Input Delay</FormLabelComponent>
<FormInfoComponent>Add a input delay to constructing buildings for simulating worker movement and player micro.</FormInfoComponent> <FormInfoComponent>Add a input delay to constructing buildings for simulating worker movement and player micro.</FormInfoComponent>
</FormNumberComponent> </FormNumberComponent>
<FormNumberComponent Max="600" <FormNumberComponent Max="600"
Min="0" Min="0"
Value="30" Value="30"
OnChange="@OnWaitTimeChanged"> OnChange="@OnWaitTimeChanged">
<FormLabelComponent>Wait Time</FormLabelComponent> <FormLabelComponent>Wait Time</FormLabelComponent>
<FormInfoComponent>Not implemented</FormInfoComponent> <FormInfoComponent>Not implemented</FormInfoComponent>
</FormNumberComponent> </FormNumberComponent>
<ButtonComponent OnClick="OnWaitClicked">Add Wait</ButtonComponent> <ButtonComponent OnClick="OnWaitClicked">Add Wait</ButtonComponent>
</FormLayoutComponent> </FormLayoutComponent>
@ -33,15 +33,15 @@
{ {
buildOrderService.BuildingInputDelay = int.Parse(changeEventArgs.Value!.ToString()!); buildOrderService.BuildingInputDelay = int.Parse(changeEventArgs.Value!.ToString()!);
} }
void OnWaitTimeChanged(ChangeEventArgs changeEventArgs) void OnWaitTimeChanged(ChangeEventArgs changeEventArgs)
{ {
toastService.AddToast(new ToastModel(){Title = "Not Implemented", SeverityType = SeverityType.Warning, Message = "The ability to wait for X seconds in a build order hasn't been implemented yet."}); toastService.AddToast(new ToastModel { Title = "Not Implemented", SeverityType = SeverityType.Warning, Message = "The ability to wait for X seconds in a build order hasn't been implemented yet." });
} }
public void OnWaitClicked() public void OnWaitClicked()
{ {
toastService.AddToast(new ToastModel(){Title = "Not Implemented", SeverityType = SeverityType.Warning, Message = "The ability to wait for X seconds in a build order hasn't been implemented yet."}); toastService.AddToast(new ToastModel { Title = "Not Implemented", SeverityType = SeverityType.Warning, Message = "The ability to wait for X seconds in a build order hasn't been implemented yet." });
} }
protected override bool ShouldRender() protected override bool ShouldRender()
@ -59,4 +59,5 @@
jsRuntime.InvokeVoidAsync("console.timeEnd", "TimingComponent"); jsRuntime.InvokeVoidAsync("console.timeEnd", "TimingComponent");
#endif #endif
} }
} }

12
IGP/Pages/BuildCalculator/Parts/TimingComponent.razor

@ -11,7 +11,9 @@
Value="@timingService.GetAttackTime()" Value="@timingService.GetAttackTime()"
OnChange="@OnAttackTimeChanged"> OnChange="@OnAttackTimeChanged">
<FormLabelComponent>Attack Time</FormLabelComponent> <FormLabelComponent>Attack Time</FormLabelComponent>
<FormInfoComponent><i>&emsp; T @Interval.ToTime(timingService.GetAttackTime())</i></FormInfoComponent> <FormInfoComponent>
<i>&emsp; T @Interval.ToTime(timingService.GetAttackTime())</i>
</FormInfoComponent>
</FormNumberComponent> </FormNumberComponent>
<FormNumberComponent Max="2048" <FormNumberComponent Max="2048"
@ -19,7 +21,9 @@
Value="@timingService.GetTravelTime()" Value="@timingService.GetTravelTime()"
OnChange="@OnTravelTimeChanged"> OnChange="@OnTravelTimeChanged">
<FormLabelComponent>Travel Time</FormLabelComponent> <FormLabelComponent>Travel Time</FormLabelComponent>
<FormInfoComponent><i>&emsp; T @Interval.ToTime(timingService.GetTravelTime())</i></FormInfoComponent> <FormInfoComponent>
<i>&emsp; T @Interval.ToTime(timingService.GetTravelTime())</i>
</FormInfoComponent>
</FormNumberComponent> </FormNumberComponent>
</FormLayoutComponent> </FormLayoutComponent>
@ -36,7 +40,7 @@
Message = "Attack Time has changed.", Message = "Attack Time has changed.",
SeverityType = SeverityType.Success SeverityType = SeverityType.Success
}); });
StateHasChanged(); StateHasChanged();
} }
@ -50,7 +54,7 @@
Message = "Travel Time has changed.", Message = "Travel Time has changed.",
SeverityType = SeverityType.Success SeverityType = SeverityType.Success
}); });
StateHasChanged(); StateHasChanged();
} }

44
IGP/Pages/PermissionsPage.razor

@ -0,0 +1,44 @@
@page "/permissions"
@layout PageLayout
<LayoutMediumContentComponent>
<AlertComponent>
<Title>Not Implemented</Title>
<Message></Message>
</AlertComponent>
<PaperComponent>
TODO
</PaperComponent>
<ContentDividerComponent/>
<PaperComponent>
<InfoBodyComponent>
<InfoQuestionComponent>What's this page?</InfoQuestionComponent>
<InfoAnswerComponent>This page has options to enable and disable certain permissions settings. Such as Storage and Data Collection.</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>What does this website store?</InfoQuestionComponent>
<InfoAnswerComponent>This website usages storage to track user defined default on the Storage page.</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>Why would I enable storage?</InfoQuestionComponent>
<InfoAnswerComponent>Enable storage if you want to website to remeber past settings whenever you visit the website on the same web browser.</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>What data does this website collect?</InfoQuestionComponent>
<InfoAnswerComponent>This website usages Google Analytics to collect data enabled on the Analytics page.</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>Why would I enable data collection?</InfoQuestionComponent>
<InfoAnswerComponent>Enable data tracking if you want the website maintainer to know how your using the website.</InfoAnswerComponent>
</InfoBodyComponent>
</PaperComponent>
</LayoutMediumContentComponent>

2
IGP/Pages/RoadMap/Parts/RoadMapComponent.razor

@ -1,7 +1,7 @@
<PanelComponent> <PanelComponent>
<div class="roadMapTitle">@RoadMap.Name</div> <div class="roadMapTitle">@RoadMap.Name</div>
<div>@((MarkupString)RoadMap.Description)</div> <div>@((MarkupString)RoadMap.Description)</div>
</PanelComponent> </PanelComponent>
<style> <style>

20
IGP/Pages/StoragePage.razor

@ -0,0 +1,20 @@
@page "/storage"
@layout PageLayout
<LayoutMediumContentComponent>
<AlertComponent>
<Title>Not Implemented</Title>
<Message></Message>
</AlertComponent>
<PaperComponent>
TODO
</PaperComponent>
<ContentDividerComponent/>
<PaperComponent>
</PaperComponent>
</LayoutMediumContentComponent>

2
IGP/wwwroot/generated/WebPageModels.json

@ -1 +1 @@
[{"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":"Road Map","Description":"Plans for this website","Href":"roadmap","IsPrivate":"False"},{"Id":9,"WebSectionModelId":4,"Name":"Change Log","Description":"Past updates to the website","Href":"changelog","IsPrivate":"False"},{"Id":10,"WebSectionModelId":4,"Name":"Agile","Description":"Showing agile view of this website","Href":"agile","IsPrivate":"False"},{"Id":11,"WebSectionModelId":4,"Name":"Making Of","Description":"Explaining development details of this website","Href":"makingof","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":"Documentation","Description":"Development information","Href":"docs","IsPrivate":"False"}] [{"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":"Road Map","Description":"Plans for this website","Href":"roadmap","IsPrivate":"False"},{"Id":9,"WebSectionModelId":4,"Name":"Change Log","Description":"Past updates to the website","Href":"changelog","IsPrivate":"False"},{"Id":10,"WebSectionModelId":4,"Name":"Agile","Description":"Showing agile view of this website","Href":"agile","IsPrivate":"False"},{"Id":11,"WebSectionModelId":4,"Name":"Making Of","Description":"Explaining development details of this website","Href":"makingof","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":"Documentation","Description":"Development information","Href":"docs","IsPrivate":"False"},{"Id":17,"WebSectionModelId":5,"Name":"Permissions","Description":"Permission Settings","Href":"permissions","IsPrivate":"False"},{"Id":18,"WebSectionModelId":5,"Name":"Analytics","Description":"Analytics Settings","Href":"analytics","IsPrivate":"False"},{"Id":19,"WebSectionModelId":5,"Name":"Storage","Description":"Storage Settings","Href":"storage","IsPrivate":"False"}]

2
IGP/wwwroot/generated/WebSectionModels.json

@ -1 +1 @@
[{"Id":1,"Name":"Tools","Description":"Tools Stuff","Href":null,"Order":1,"IsPrivate":"False","WebPageModels":[]},{"Id":2,"Name":"Resources","Description":"Resources Stuff","Href":null,"Order":2,"IsPrivate":"False","WebPageModels":[]},{"Id":3,"Name":"General","Description":"About Stuff","Href":null,"Order":3,"IsPrivate":"False","WebPageModels":[]},{"Id":4,"Name":"Development","Description":"Development Stuff","Href":null,"Order":4,"IsPrivate":"False","WebPageModels":[]}] [{"Id":1,"Name":"Tools","Description":"Tools Stuff","Href":null,"Order":1,"IsPrivate":"False","WebPageModels":[]},{"Id":2,"Name":"Resources","Description":"Resources Stuff","Href":null,"Order":2,"IsPrivate":"False","WebPageModels":[]},{"Id":3,"Name":"General","Description":"About Stuff","Href":null,"Order":3,"IsPrivate":"False","WebPageModels":[]},{"Id":4,"Name":"Development","Description":"Development Stuff","Href":null,"Order":4,"IsPrivate":"False","WebPageModels":[]},{"Id":5,"Name":"Settings","Description":"Settings Stuff","Href":null,"Order":5,"IsPrivate":"False","WebPageModels":[]}]
Loading…
Cancel
Save