-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
79 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/Inc.TeamAssistant.Stories/Features/MainFooter.stories.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@attribute [Stories("Features/MainFooter")] | ||
|
||
<Stories TComponent="MainFooter" Layout="typeof(LightLayout)"> | ||
<Story Name="Default"> | ||
<Template> | ||
<MainFooter /> | ||
</Template> | ||
</Story> | ||
</Stories> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
@using Inc.TeamAssistant.WebUI.Features.Main | ||
@using Inc.TeamAssistant.WebUI.Features.Map | ||
@using Inc.TeamAssistant.WebUI.Features.Layouts | ||
@using Inc.TeamAssistant.CheckIn.Model.Queries.GetLocations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
src/Inc.TeamAssistant.WebUI/Features/Layouts/MainFooterLinksFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
using Inc.TeamAssistant.WebUI.Routing; | ||
using Microsoft.Extensions.Localization; | ||
|
||
namespace Inc.TeamAssistant.WebUI.Features.Layouts; | ||
|
||
internal sealed class MainFooterLinksFactory | ||
{ | ||
private readonly IStringLocalizer<LayoutResources> _localizer; | ||
private readonly NavRouter _navRouter; | ||
|
||
public MainFooterLinksFactory(IStringLocalizer<LayoutResources> localizer, NavRouter navRouter) | ||
{ | ||
_localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); | ||
_navRouter = navRouter ?? throw new ArgumentNullException(nameof(navRouter)); | ||
} | ||
|
||
public IReadOnlyDictionary<string, IReadOnlyCollection<FooterLink>> Create() | ||
{ | ||
return new Dictionary<string, IReadOnlyCollection<FooterLink>> | ||
{ | ||
["GroupNavigation"] = | ||
[ | ||
new FooterLink( | ||
_localizer["LinkMain"], | ||
_navRouter.CreateRoute(null), | ||
External: false), | ||
new FooterLink( | ||
_localizer["LinkConstructor"], | ||
_navRouter.CreateRoute("constructor"), | ||
External: false), | ||
new FooterLink( | ||
_localizer["LinkDashboard"], | ||
_navRouter.CreateRoute("dashboard"), | ||
External: false) | ||
], | ||
["GroupTech"] = | ||
[ | ||
new FooterLink( | ||
"DotNet", | ||
"https://dotnet.microsoft.com/", | ||
External: true), | ||
new FooterLink( | ||
"Blazor", | ||
"https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor", | ||
External: true), | ||
new FooterLink( | ||
"Nuke", | ||
"https://nuke.build/", | ||
External: true) | ||
], | ||
["GroupStorage"] = | ||
[ | ||
new FooterLink( | ||
"Postgres", | ||
"https://www.postgresql.org/", | ||
External: true), | ||
new FooterLink( | ||
"Npgsql", | ||
"https://www.npgsql.org/", | ||
External: true), | ||
new FooterLink( | ||
"FluentMigrator", | ||
"https://fluentmigrator.github.io/", | ||
External: true) | ||
], | ||
["GroupTools"] = | ||
[ | ||
new FooterLink( | ||
"Telegram.Bot", | ||
"https://github.com/TelegramBots/Telegram.Bot", | ||
External: true), | ||
new FooterLink( | ||
"FluentValidator", | ||
"https://docs.fluentvalidation.net/", | ||
External: true), | ||
new FooterLink( | ||
"GitHub", | ||
"https://github.com/dyatlov-a/Inc.TeamAssistant", | ||
External: true) | ||
] | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters