Skip to content

Commit

Permalink
remove profiles link from topline. add to each page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rrelyea committed Jun 23, 2023
1 parent 75d41de commit 9f8b375
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
10 changes: 8 additions & 2 deletions Pages/Portfolio-Review.razor
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Portfolio Review@(stepPath==null?"":": "+stepPath.Replace('-',' ')) - bogle.tool
familyData.UpdatePercentages();

<h4 style="max-width:450px">
Portfolio Review (@appData.CurrentProfileName)<br/>
Portfolio Review (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>)<br/>
<br/>
</h4>
<p> Bogleheads.org forum enables you to <a target=_blank href="https://www.bogleheads.org/forum/viewtopic.php?t=6212">Ask Portfolio Questions</a> ↗️. This tool makes it easy to collect your information and format it properly.</p>
Expand Down Expand Up @@ -338,7 +338,7 @@ Portfolio Review@(stepPath==null?"":": "+stepPath.Replace('-',' ')) - bogle.tool
string nextPage = folderName + nextStep?.step;

<h4 style="max-width:450px">
<NavLink href=/portfolio-review>Portfolio Review (@appData.CurrentProfileName)</NavLink> &gt; @step.title (@step.number)<br/>
<NavLink href=/portfolio-review>Portfolio Review</NavLink> (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>) &gt; @step.title (@step.number)<br/>
<a style='font-size:24pt' href="@nextPage"><span class="oi oi-arrow-right m-2 aria-hidden="true"></span></a>
<br/>
</h4>
Expand Down Expand Up @@ -1249,4 +1249,10 @@ Portfolio Review@(stepPath==null?"":": "+stepPath.Replace('-',' ')) - bogle.tool
text = text.Replace("Show Portfolio Analysis\n", "");
await JS.InvokeVoidAsync("navigator.clipboard.writeText", text);
}

private void navWithBackStack()
{
appData.LastPageUri = Navigation.Uri;
Navigation.NavigateTo("/profiles");
}
}
10 changes: 8 additions & 2 deletions Pages/Portfolio.razor
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too
familyData.UpdatePercentages();

<h4 style="max-width:450px">
Portfolio (@appData.CurrentProfileName)<br/>
Portfolio (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>)<br/>
</h4>

<p>Organizing information about your portfolio will help you optimize your finances.</p>
Expand Down Expand Up @@ -298,7 +298,7 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too
string nextPage = folderName + nextStep?.step;

<h4 style="max-width:450px">
<NavLink href=/portfolio>Portfolio (@appData.CurrentProfileName)</NavLink> &gt; @step.title (@step.number)<br/>
<NavLink href=/portfolio>Portfolio</NavLink> (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>) &gt; @step.title (@step.number)<br/>
<a style='font-size:24pt' href="@nextPage"><span class="oi oi-arrow-right m-2 aria-hidden="true"></span></a>
<br/>
</h4>
Expand Down Expand Up @@ -1281,4 +1281,10 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too

return change == 0.0 ? null : change;
}

private void navWithBackStack()
{
appData.LastPageUri = Navigation.Uri;
Navigation.NavigateTo("/profiles");
}
}
10 changes: 8 additions & 2 deletions Pages/Saving.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Saving@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.tools
int itemTotal = 0;

<h4 style="max-width:450px">
Saving Plan (@appData.CurrentProfileName)<br/>
Saving Plan (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>)<br/>
<br/>
</h4>

Expand Down Expand Up @@ -411,7 +411,7 @@ Saving@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.tools
string nextPage = folderName + nextStep?.step;

<h4 style="max-width:450px">
<NavLink href=/saving>Saving Plan (@appData.CurrentProfileName)</NavLink> &gt; @step.title (@step.number)<br/>
<NavLink href=/saving>Saving Plan</NavLink> (<a href=/profiles title="profile name" @onclick=navWithBackStack @onclick:preventDefault >@appData.CurrentProfileName</a>) &gt; @step.title (@step.number)<br/>
<a style='font-size:24pt' href="@nextPage"><span class="oi oi-arrow-right m-2 aria-hidden="true"></span></a>
<br/>
</h4>
Expand Down Expand Up @@ -1101,4 +1101,10 @@ Saving@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.tools
}
}
}

private void navWithBackStack()
{
appData.LastPageUri = Navigation.Uri;
Navigation.NavigateTo("/profiles");
}
}
16 changes: 3 additions & 13 deletions Shared/TopLine.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
@inject IRSData irsData
@inject IJSRuntime JS

<div style=width:100%;vertical-align:middle>
<div style=float:left;padding:3px>
<a href=/profiles @onclick:preventDefault @onclick=navWithBackStack>Switch Profile</a>
</div
<div style=float:right>
<a style=margin-left:0px href=/about>Private data</a>: <button @onclick=@Save>Save</button> or
<button @onclick=@Clear>Erase</button>
</div>
<div>
<a style=margin-left:0px href=/about>Private data</a>: <button @onclick=@Save>Save</button> or
<button @onclick=@Clear>Erase</button>
</div>
@code{

private void navWithBackStack()
{
appData.LastPageUri = Navigation.Uri;
Navigation.NavigateTo("/profiles");
}
private async Task Save() {
await ProfileUtilities.Save(appData.CurrentProfileKey, appData.FamilyData);
}
Expand Down

0 comments on commit 9f8b375

Please sign in to comment.