Skip to content

Commit

Permalink
move profile to left. call 'your' -> 'primary'
Browse files Browse the repository at this point in the history
  • Loading branch information
rrelyea committed Jun 22, 2023
1 parent 499e17d commit cc152c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if (irsData != null) {
builder.Services.AddSingleton<IRSData>(irsData);
var appData = new AppData(new FamilyData(irsData));
appData.CurrentProfileName = "your";
appData.CurrentProfileName = "primary";
builder.Services.AddSingleton<IAppData>(appData);
} else {
throw new Exception("irsData is null");
Expand Down
2 changes: 1 addition & 1 deletion Shared/Models/FamilyData/AppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public string CurrentProfileKey
{
get {
switch (CurrentProfileName) {
case "your":
case "primary":
return "localSave";
default:
return CurrentProfileName;
Expand Down
9 changes: 6 additions & 3 deletions Shared/TopLine.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
@inject IRSData irsData
@inject IJSRuntime JS

<div style=position:absolute;left:0px;padding:10px>
<a href=/profiles>Switch Profile</a>
</div
<div style=position:absolute;right:0px;padding:10px>
<a href=/profiles>Profile list.</a> Data is <a style=margin-left:0px href=/about>kept private</a>: <button @onclick=@Save>Save</button> or
Data is <a style=margin-left:0px href=/about>kept private</a>: <button @onclick=@Save>Save</button> or
<button @onclick=@Clear>Erase</button>
</div>

Expand All @@ -25,7 +28,7 @@
protected override async Task OnInitializedAsync()
{
ProfileUtilities.LocalStorageAccessor = LocalStorageAccessor;
appData.CurrentProfileName = "your";
appData.CurrentProfileName = "primary";
await ProfileUtilities.Load(appData);

var keys = new List<string>();
Expand All @@ -38,7 +41,7 @@
case "i18nextLng":
break;
case "localSave":
keys.Add("your");
keys.Add("primary");
break;
default:
keys.Add(value);
Expand Down

0 comments on commit cc152c3

Please sign in to comment.