Skip to content

Commit

Permalink
redirect unfinished fileshare page to docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHess committed Jan 10, 2024
1 parent 635bdf3 commit 5e26615
Showing 1 changed file with 20 additions and 35 deletions.
55 changes: 20 additions & 35 deletions src/Client/Components/Pages/NetworkFileSharing/Index.razor
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
@page "/network-file-sharing"
@page "/network-file-sharing"
@page "/steeltoe-smb"

<Template Name="Network File Sharing" Features="@features" GettingStartedURL="/network-file-sharing/get-started" DocsURL="/docs/fileshares">
<Description>XXXXXXX</Description>
<WhatIs>XXXXXXX</WhatIs>
<WhyUse>XXXXXXX</WhyUse>
<FeatureTemplate Context="Feature">
<div class="row component-feature no-gutters">
<div class="col-6 text-center"><div class="component-feature-img"><img class="img-fluid" src="@Feature.Img" /></div></div>
<div class="col">
<div class="component-feature-title">@Feature.Title</div>
<div class="component-feature-desc">@Feature.Description</div>
</div>
</div>
</FeatureTemplate>
<AltFeatureTemplate Context="Feature">
<div class="row component-feature no-gutters">
<div class="col-6">
<div class="component-feature-title">@Feature.Title</div>
<div class="component-feature-desc">@Feature.Description</div>
</div>
<div class="col-6 text-center"><div class="component-feature-img"><img class="img-fluid" src="@Feature.Img" /></div></div>
</div>
</AltFeatureTemplate>
</Template>
@inject IHttpContextAccessor HttpContextAccessor
@inject IOptionsSnapshot<DocsSiteOptions> DocsSiteOptions
<GetStarted>
<ComponentName>Network File Sharing</ComponentName>
<Tutorials>
<h1>This page has moved, find the new location <NavLink href="@(DocsSiteOptions.Value.BaseAddress + "/api/v3/fileshares")">here</NavLink></h1>
</Tutorials>
</GetStarted>

@code{
private Feature[] features = new[] {
new Feature() {
Title = (MarkupString)"",
Description = (b => {
b.AddMarkupContent(1,"");
}),
Img = ""
}
};
}
@code
{
protected override void OnInitialized()
{
if (HttpContextAccessor.HttpContext != null)
{
var uri = new Uri(DocsSiteOptions.Value.BaseAddress + "/api/v3/fileshares").ToString();
HttpContextAccessor.HttpContext.Response.Redirect(uri, true);
}
}
}

0 comments on commit 5e26615

Please sign in to comment.