diff --git a/Inc.TeamAssistant.sln b/Inc.TeamAssistant.sln index 9fa47f3b..cca0b165 100644 --- a/Inc.TeamAssistant.sln +++ b/Inc.TeamAssistant.sln @@ -100,6 +100,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inc.TeamAssistant.Reviewer. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inc.TeamAssistant.CheckIn.Geo", "src\Inc.TeamAssistant.CheckIn.Geo\Inc.TeamAssistant.CheckIn.Geo.csproj", "{41B5195D-3C81-4501-9278-57FA95F973FD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inc.TeamAssistant.Stories", "src\Inc.TeamAssistant.Stories\Inc.TeamAssistant.Stories.csproj", "{DA961B87-B9F3-4A4E-8C2B-F91101FB07CB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -256,6 +258,10 @@ Global {41B5195D-3C81-4501-9278-57FA95F973FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {41B5195D-3C81-4501-9278-57FA95F973FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {41B5195D-3C81-4501-9278-57FA95F973FD}.Release|Any CPU.Build.0 = Release|Any CPU + {DA961B87-B9F3-4A4E-8C2B-F91101FB07CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA961B87-B9F3-4A4E-8C2B-F91101FB07CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA961B87-B9F3-4A4E-8C2B-F91101FB07CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA961B87-B9F3-4A4E-8C2B-F91101FB07CB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {B9C88CA2-123E-4D55-A931-91B0CFA08447} = {BF819FCA-A383-4283-B680-4B80B7B5CA32} @@ -304,5 +310,6 @@ Global {E9547AEE-D2E2-4550-B95B-DFB1C0D7FFE8} = {406F731E-8D99-4D37-88F1-EE5D38C54662} {504EF63F-2C47-44FC-BB22-F199C7DF7251} = {1943C11E-7A4A-4300-BDC1-DA333BD3EBED} {41B5195D-3C81-4501-9278-57FA95F973FD} = {15DCF7E1-1D36-4C21-A623-35A1D037A4DA} + {DA961B87-B9F3-4A4E-8C2B-F91101FB07CB} = {8285EFA4-C244-455D-94D1-86994A904BFF} EndGlobalSection EndGlobal diff --git a/src/Inc.TeamAssistant.Gateway/Inc.TeamAssistant.Gateway.csproj b/src/Inc.TeamAssistant.Gateway/Inc.TeamAssistant.Gateway.csproj index 07bd0a4d..0a597c54 100644 --- a/src/Inc.TeamAssistant.Gateway/Inc.TeamAssistant.Gateway.csproj +++ b/src/Inc.TeamAssistant.Gateway/Inc.TeamAssistant.Gateway.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Inc.TeamAssistant.Gateway/Program.cs b/src/Inc.TeamAssistant.Gateway/Program.cs index 49d46a6b..3fb378ba 100644 --- a/src/Inc.TeamAssistant.Gateway/Program.cs +++ b/src/Inc.TeamAssistant.Gateway/Program.cs @@ -96,7 +96,7 @@ builder.Services .AddHolidays(CachePolicies.CacheAbsoluteExpiration) .AddServices(authOptions, openGraphOptions, builder.Environment.WebRootPath, CachePolicies.CacheAbsoluteExpiration) - .AddIsomorphic() + .AddIsomorphicServices() .AddAppraiserApplication(linksOptions.ConnectToDashboardLinkTemplate) .AddAppraiserDataAccess() .AddCheckInApplication(linksOptions.ConnectToMapLinkTemplate) diff --git a/src/Inc.TeamAssistant.Stories/App.razor b/src/Inc.TeamAssistant.Stories/App.razor new file mode 100644 index 00000000..45a092b7 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/App.razor @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/App.razor.css b/src/Inc.TeamAssistant.Stories/App.razor.css new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/App.razor.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Components/Button.stories.razor b/src/Inc.TeamAssistant.Stories/Components/Button.stories.razor new file mode 100644 index 00000000..b6500888 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Components/Button.stories.razor @@ -0,0 +1,45 @@ +@attribute [Stories("Components/Button")] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + private RenderFragment ToRenderFragment(string value) => b => b.AddContent(0, value); +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Inc.TeamAssistant.Stories.csproj b/src/Inc.TeamAssistant.Stories/Inc.TeamAssistant.Stories.csproj new file mode 100644 index 00000000..ac14426d --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Inc.TeamAssistant.Stories.csproj @@ -0,0 +1,13 @@ + + + True + + + + + + + + + + \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Program.cs b/src/Inc.TeamAssistant.Stories/Program.cs new file mode 100644 index 00000000..cab417cd --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Program.cs @@ -0,0 +1,12 @@ +using Inc.TeamAssistant.Stories; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); + +builder.Services + .AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + +await builder.Build().RunAsync(); diff --git a/src/Inc.TeamAssistant.Stories/Properties/launchSettings.json b/src/Inc.TeamAssistant.Stories/Properties/launchSettings.json new file mode 100644 index 00000000..c116668b --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "profiles": { + "Inc.TeamAssistant.Stories": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:5198", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Shared/DarkLayout.razor b/src/Inc.TeamAssistant.Stories/Shared/DarkLayout.razor new file mode 100644 index 00000000..9b6aac0c --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Shared/DarkLayout.razor @@ -0,0 +1,5 @@ +@inherits LayoutComponentBase + +
+ @Body +
\ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Shared/DefaultLayout.razor b/src/Inc.TeamAssistant.Stories/Shared/DefaultLayout.razor new file mode 100644 index 00000000..435621e8 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Shared/DefaultLayout.razor @@ -0,0 +1,3 @@ +@inherits LayoutComponentBase + +@Body \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/Shared/LightLayout.razor b/src/Inc.TeamAssistant.Stories/Shared/LightLayout.razor new file mode 100644 index 00000000..7e37370c --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Shared/LightLayout.razor @@ -0,0 +1,5 @@ +@inherits LayoutComponentBase + +
+ @Body +
\ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/_Imports.razor b/src/Inc.TeamAssistant.Stories/_Imports.razor new file mode 100644 index 00000000..7cbbd19d --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/_Imports.razor @@ -0,0 +1,15 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using BlazingStory.Components +@using BlazingStory.Types +@using Inc.TeamAssistant.Stories +@using Inc.TeamAssistant.Stories.Shared +@using Inc.TeamAssistant.Stories.Components + +@using Inc.TeamAssistant.WebUI.Components \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/wwwroot/css/blazor-ui.css b/src/Inc.TeamAssistant.Stories/wwwroot/css/blazor-ui.css new file mode 100644 index 00000000..6843bf93 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/wwwroot/css/blazor-ui.css @@ -0,0 +1,89 @@ +#blazor-error-ui { + background: #ffffe0; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); + display: none; + left: 0; + padding: .6rem 1.25rem .7rem 1.25rem; + position: fixed; + right: 0; + z-index: 1000 +} + +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: .75rem; + top: .5rem +} + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + +.blazor-error-boundary::after { + content: "An error has occurred." +} + +.loading-progress { + position: fixed; + inset: 0; + background: #f6f9fc; +} + +.loading-progress svg { + position: relative; + display: block; + width: 8rem; + height: 8rem; + margin: 20vh auto 1rem auto; +} + +.loading-progress svg circle { + fill: none; + stroke: #e0e0e0; + stroke-width: 0.6rem; + transform-origin: 50% 50%; + transform: rotate(-90deg); +} + +.loading-progress svg circle:last-child { + stroke: #542fd4; + stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; + transition: stroke-dasharray 0.05s ease-in-out; +} + +.loading-progress img { + position: absolute; + width: 44px; + height: 44px; + margin: auto; + inset: calc(20vh + 3.2rem - 22px) 0 auto 0; +} + +.loading-progress .text { + position: absolute; + text-align: center; + font-weight: bold; + inset: calc(20vh + 4.8rem) 0 auto 0.2rem; +} + +.loading-progress .text:after { + content: var(--blazor-load-percentage-text, "Loading"); +} + +@media (prefers-color-scheme: dark) { + .loading-progress { + background-color: #222425; + } + + .loading-progress svg circle { + stroke: #393a3b; + } + + .loading-progress .text { + color: #c9cdcf; + } +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/wwwroot/css/team-assistant-theme.css b/src/Inc.TeamAssistant.Stories/wwwroot/css/team-assistant-theme.css new file mode 100644 index 00000000..b5033fdd --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/wwwroot/css/team-assistant-theme.css @@ -0,0 +1,10 @@ +.dark-layout { + background-color: #616161; + padding: 20px; + min-height: 400px; +} +.light-light { + background-color: #dfdfdf; + padding: 20px; + min-height: 400px; +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/wwwroot/favicon.ico b/src/Inc.TeamAssistant.Stories/wwwroot/favicon.ico new file mode 100644 index 00000000..b70e74ad Binary files /dev/null and b/src/Inc.TeamAssistant.Stories/wwwroot/favicon.ico differ diff --git a/src/Inc.TeamAssistant.Stories/wwwroot/iframe.html b/src/Inc.TeamAssistant.Stories/wwwroot/iframe.html new file mode 100644 index 00000000..9a274c74 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/wwwroot/iframe.html @@ -0,0 +1,37 @@ + + + + + + + TeamAssistUI docs + + + + + + + + +
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/wwwroot/index.html b/src/Inc.TeamAssistant.Stories/wwwroot/index.html new file mode 100644 index 00000000..c477d9f0 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/wwwroot/index.html @@ -0,0 +1,41 @@ + + + + + + + TeamAssistUI docs + + + + + + +
+
+ + + + +
+ +
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Components/Button.razor b/src/Inc.TeamAssistant.WebUI/Components/Button.razor index 3f71b645..c160e3f6 100644 --- a/src/Inc.TeamAssistant.WebUI/Components/Button.razor +++ b/src/Inc.TeamAssistant.WebUI/Components/Button.razor @@ -1,100 +1,87 @@ -@inject ResourcesManager Resources -@inject NavRouter NavRouter - @if (ButtonType == ButtonType.Tab) { - + @if (Content is not null) { @Content } - @if (Message is not null) - { - @Resources[Message] - } } else if (IsDisabled) { - } else { - } @code { - [Parameter] - public MessageId? Message { get; set; } - + /// + /// Html or text content of the button. + /// [Parameter] public RenderFragment? Content { get; set; } + /// + /// On click event. + /// [Parameter] public EventCallback OnClick { get; set; } + /// + /// Button mode: Default or Small. + /// [Parameter] - public ButtonMode ButtonMode { get; set; } + public ButtonMode ButtonMode { get; set; } = ButtonMode.Default; + /// + /// Flag for set dark or light theme. + /// [Parameter] public bool IsDark { get; set; } - [Parameter] - public bool IsSelected { get; set; } - + /// + /// Flag for set disabled state. + /// [Parameter] public bool IsDisabled { get; set; } + /// + /// Button type: Submit or Button. + /// [Parameter] public ButtonType ButtonType { get; set; } + /// + /// Link for button (supported for ButtonType=Tab). + /// [Parameter] public string? Link { get; set; } private string ModeCssClass => ButtonMode switch { ButtonMode.Small => "button_small", - ButtonMode.Telegram => "button_telegram", _ => string.Empty }; - private string CssClass() - { - if (ButtonMode == ButtonMode.Telegram) - return string.Empty; - - return IsDark ? "button_dark" : "button_light"; - } + private string CssClass => IsDark ? "button_dark" : "button_light"; - private string ButtonType2 => ButtonType == ButtonType.Submit ? "submit" : "button"; + private string ButtonTypeAsString => ButtonType == ButtonType.Submit ? "submit" : "button"; private async Task EmitOnClick() { if (!OnClick.Equals(default(EventCallback))) - { await OnClick.InvokeAsync(); - return; - } - - if (!string.IsNullOrWhiteSpace(Link)) - await NavRouter.MoveToRoute(Link); } } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Components/Button.razor.css b/src/Inc.TeamAssistant.WebUI/Components/Button.razor.css index 5bffcdd8..15b4a1a6 100644 --- a/src/Inc.TeamAssistant.WebUI/Components/Button.razor.css +++ b/src/Inc.TeamAssistant.WebUI/Components/Button.razor.css @@ -37,14 +37,4 @@ padding: 5px; border-radius: 10px; height: 38px; -} -.button_telegram { - padding: 9px 21px 11px; - border-radius: 20px; - background-color: #54a9eb; - color: #fff; - text-transform: none; - cursor: pointer; - font-size: 1rem; - font-weight: 500; } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Components/ButtonMode.cs b/src/Inc.TeamAssistant.WebUI/Components/ButtonMode.cs index 2e0ba00e..a5da1b63 100644 --- a/src/Inc.TeamAssistant.WebUI/Components/ButtonMode.cs +++ b/src/Inc.TeamAssistant.WebUI/Components/ButtonMode.cs @@ -3,6 +3,5 @@ namespace Inc.TeamAssistant.WebUI.Components; public enum ButtonMode { Default = 1, - Small = 2, - Telegram = 3 + Small = 2 } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Components/Loading.razor b/src/Inc.TeamAssistant.WebUI/Components/Loading.razor index 6ff35f1e..5c8d00a2 100644 --- a/src/Inc.TeamAssistant.WebUI/Components/Loading.razor +++ b/src/Inc.TeamAssistant.WebUI/Components/Loading.razor @@ -9,7 +9,11 @@ } else { - + } } diff --git a/src/Inc.TeamAssistant.WebUI/Components/Panel.razor b/src/Inc.TeamAssistant.WebUI/Components/Panel.razor index 9c20b1e6..e1a1d558 100644 --- a/src/Inc.TeamAssistant.WebUI/Components/Panel.razor +++ b/src/Inc.TeamAssistant.WebUI/Components/Panel.razor @@ -10,7 +10,11 @@ } else { - + } diff --git a/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor b/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor index 9484cfb1..7c565ae8 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor @@ -21,12 +21,9 @@ @if (RenderContext.IsDevelopment()) { - + } else if (!string.IsNullOrWhiteSpace(_botUserName)) { diff --git a/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor.css b/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor.css index 6148939a..13abb001 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor.css +++ b/src/Inc.TeamAssistant.WebUI/Features/Auth/LoginPage.razor.css @@ -41,6 +41,16 @@ .telegram-login__actions { margin-top: 20px; } +.button_telegram { + padding: 9px 21px 11px; + border-radius: 20px; + background-color: #54a9eb; + color: #fff; + text-transform: none; + cursor: pointer; + font-size: 1rem; + font-weight: 500; +} @media (max-width: 991.98px) { .login-motivation { display: none; diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/BotSelector.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/BotSelector.razor index 4487b52b..08447be0 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/BotSelector.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/BotSelector.razor @@ -11,7 +11,11 @@
- + @@ -25,8 +29,16 @@ - - + + } diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage1/CheckBot.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage1/CheckBot.razor index 58a053b1..455dfbed 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage1/CheckBot.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage1/CheckBot.razor @@ -6,7 +6,11 @@ - + diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/InputFeatures.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/InputFeatures.razor index a93c6359..ed2975a4 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/InputFeatures.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/InputFeatures.razor @@ -21,7 +21,10 @@ Title="@FeaturesFactory.CreateName(feature.Name)" Description="@FeaturesFactory.CreateDescription(feature.Name)"> - @@ -48,7 +51,10 @@ Title="@FeaturesFactory.CreateName(feature.Name)" Description="@FeaturesFactory.CreateDescription(feature.Name)"> - diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/SelectFeatures.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/SelectFeatures.razor index bc6b3334..542e38ab 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/SelectFeatures.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/SelectFeatures.razor @@ -5,7 +5,11 @@ - + - + diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor index ebb694d1..06b35254 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor @@ -8,7 +8,11 @@ - + @@ -122,11 +126,10 @@
}
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor index 22c74005..31df68f4 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor @@ -5,7 +5,11 @@ - + @foreach (var feature in StagesState.SelectedFeatures) diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor index 8c59d371..92f51ed8 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor @@ -8,7 +8,11 @@ - + @@ -157,9 +161,9 @@ [Parameter, EditorRequired] public string BotStorageKey { get; set; } = default!; - private MessageId ButtonText => StagesState.Id.HasValue - ? Messages.Constructor_ButtonUpdateText - : Messages.Constructor_ButtonCreateText; + private string ButtonText => StagesState.Id.HasValue + ? Resources[Messages.Constructor_ButtonUpdateText] + : Resources[Messages.Constructor_ButtonCreateText]; private string FormId => StagesState.Id.HasValue ? AnalyticEvents.BotUpdated @@ -167,7 +171,7 @@ private string PanelHeader => string.Format( Resources[Messages.Constructor_CheckConfigurationTemplate], - Resources[ButtonText].ToLowerInvariant()); + ButtonText.ToLowerInvariant()); private readonly CompleteFormModel _formModel = new(); private FluentValidationValidator? _fluentValidationValidator; diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserHistoryWidget.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserHistoryWidget.razor index 78939f68..4f18ed83 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserHistoryWidget.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserHistoryWidget.razor @@ -40,10 +40,10 @@ }
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserIntegrationWidget.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserIntegrationWidget.razor index 288ffd69..79cebbf1 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserIntegrationWidget.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Appraiser/AppraiserIntegrationWidget.razor @@ -72,15 +72,15 @@ @if (_formModel.HasManagerAccess) {
- -
} @@ -89,10 +89,10 @@
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/CheckIn/MapWidget.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/CheckIn/MapWidget.razor index 6f432f7d..e3db81c5 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/CheckIn/MapWidget.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/CheckIn/MapWidget.razor @@ -28,11 +28,10 @@
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/DashboardTeamConnector.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/DashboardTeamConnector.razor index 10848839..2f272223 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/DashboardTeamConnector.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/DashboardTeamConnector.razor @@ -13,11 +13,10 @@
@((MarkupString)_team.Code)
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Settings/DashboardSettings.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Settings/DashboardSettings.razor index 048808a2..14829cf4 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Settings/DashboardSettings.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Settings/DashboardSettings.razor @@ -95,7 +95,10 @@ }
-
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/AcceptCookieDialog.razor b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/AcceptCookieDialog.razor index 6a9f1ac9..dd15a02b 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/AcceptCookieDialog.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/AcceptCookieDialog.razor @@ -11,7 +11,11 @@

@Resources[Messages.GUI_AcceptCookieText]

- +
} diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ConfirmDialog.razor b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ConfirmDialog.razor index 42293f09..469621a9 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ConfirmDialog.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ConfirmDialog.razor @@ -9,8 +9,16 @@ @Content
- - + +
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ContentDialog.razor b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ContentDialog.razor index 9df46109..8dcf414f 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ContentDialog.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dialogs/ContentDialog.razor @@ -8,7 +8,11 @@

@Title

- +
diff --git a/src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor b/src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor index 95d775e6..96bad5ce 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor @@ -4,6 +4,7 @@ @inject IRenderContext RenderContext @inject ResourcesManager Resources +@inject NavRouter NavRouter @@ -27,7 +28,15 @@ @Icons.Start @Resources[Messages.GUI_ToolCheckIn]

- +
- \ No newline at end of file + + +@code { + private Task MoveToConstructor() => NavRouter.MoveToRoute("constructor"); +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Inc.TeamAssistant.WebUI.csproj b/src/Inc.TeamAssistant.WebUI/Inc.TeamAssistant.WebUI.csproj index c55f9c68..3bb5b7f4 100644 --- a/src/Inc.TeamAssistant.WebUI/Inc.TeamAssistant.WebUI.csproj +++ b/src/Inc.TeamAssistant.WebUI/Inc.TeamAssistant.WebUI.csproj @@ -1,15 +1,17 @@ true + True + $(NoWarn);1591 - + - - - - + + + + @@ -19,29 +21,4 @@ - - <_ContentIncludedByDefault Remove="Features\Constructor\Stages\Stage4\Calendar.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\DateSelector.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\FormFieldSet.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\FormSection.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\InputDateOnly.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\InputMultiSelectList.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\InputSelectList.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\InputTimeOnly.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\Loading.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\NoData.razor" /> - <_ContentIncludedByDefault Remove="Features\Components\Panel.razor" /> - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Program.cs b/src/Inc.TeamAssistant.WebUI/Program.cs index 8b388972..c414ea61 100644 --- a/src/Inc.TeamAssistant.WebUI/Program.cs +++ b/src/Inc.TeamAssistant.WebUI/Program.cs @@ -4,8 +4,8 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Services - .AddScoped(_ => new HttpClient {BaseAddress = new(builder.HostEnvironment.BaseAddress)}) - .AddServices() - .AddIsomorphic(); + .AddScoped(_ => new HttpClient { BaseAddress = new(builder.HostEnvironment.BaseAddress) }) + .AddClientServices() + .AddIsomorphicServices(); await builder.Build().RunAsync(); \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Services/ServiceCollectionExtensions.cs b/src/Inc.TeamAssistant.WebUI/Services/ServiceCollectionExtensions.cs index bfd1b6b8..3f13da85 100644 --- a/src/Inc.TeamAssistant.WebUI/Services/ServiceCollectionExtensions.cs +++ b/src/Inc.TeamAssistant.WebUI/Services/ServiceCollectionExtensions.cs @@ -13,7 +13,7 @@ namespace Inc.TeamAssistant.WebUI.Services; public static class ServiceCollectionExtensions { - internal static IServiceCollection AddServices(this IServiceCollection services) + internal static IServiceCollection AddClientServices(this IServiceCollection services) { ArgumentNullException.ThrowIfNull(services); @@ -40,7 +40,7 @@ internal static IServiceCollection AddServices(this IServiceCollection services) return services; } - public static IServiceCollection AddIsomorphic(this IServiceCollection services) + public static IServiceCollection AddIsomorphicServices(this IServiceCollection services) { ArgumentNullException.ThrowIfNull(services);