Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Boilerplate for latest BlazorUI changes (#9318) #9320

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,16 @@
@inherits AppComponentBase;

<section>
<a href="@Urls.HomePage">
<BitIcon IconName="@BitIconName.Home" Color="@(IsActive(Urls.HomePage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.HomePage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Home)]
</BitText>
</a>

@*#if (sample == "Todo")*@
<a href="@Urls.TodoPage">
<BitIcon IconName="@BitIconName.ToDoLogoOutline" Color="@(IsActive(Urls.TodoPage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.TodoPage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Todo)]
</BitText>
</a>
@*#endif*@

@*#if (sample == "Admin")*@
<a href="@Urls.DashboardPage">
<BitIcon IconName="@BitIconName.BarChartVerticalFill" Color="@(IsActive(Urls.DashboardPage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.DashboardPage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Dashboard)]
</BitText>
</a>

<a href="@Urls.ProductsPage">
<BitIcon IconName="@BitIconName.Product" Color="@(IsActive(Urls.ProductsPage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.ProductsPage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Products)]
</BitText>
</a>

<a href="@Urls.CategoriesPage">
<BitIcon IconName="@BitIconName.BuildQueue" Color="@(IsActive(Urls.CategoriesPage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.CategoriesPage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Categories)]
</BitText>
</a>
@*#endif*@

<a href="@Urls.TermsPage">
<BitIcon IconName="@BitIconName.EntityExtraction" Color="@(IsActive(Urls.TermsPage) ? BitColor.Primary : BitColor.SecondaryForeground)" />
<BitText Typography="BitTypography.Caption2" Color="@(IsActive(Urls.TermsPage) ? BitColor.Primary : BitColor.SecondaryForeground)">
@Localizer[nameof(AppStrings.Terms)]
</BitText>
</a>
<BitNavBar TItem="BitNavBarOption" Style="width:100%">
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Home)]" IconName="@BitIconName.Home" Url="@Urls.HomePage" />
@*#if (sample == "Todo")*@
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Todo)]" IconName="@BitIconName.ToDoLogoOutline" Url="@Urls.TodoPage" />
@*#endif*@
@*#if (sample == "Admin")*@
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Dashboard)]" IconName="@BitIconName.BarChartVerticalFill" Url="@Urls.DashboardPage" />
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Products)]" IconName="@BitIconName.Product" Url="@Urls.ProductsPage" />
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Categories)]" IconName="@BitIconName.BuildQueue" Url="@Urls.CategoriesPage" />
@*#endif*@
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Terms)]" IconName="@BitIconName.EntityExtraction" Url="@Urls.TermsPage" />
</BitNavBar>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<BitSpacer />

<BitActionButton IconOnly="isToggled"
Color="BitColor.Error"
FullWidth="!isToggled"
OnClick="ShowSignOutConfirm"
IconName="@BitIconName.SignOut"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@

<BitSeparator />

<BitActionButton IconName="@BitIconName.Contact" Href="@($"{Urls.SettingsPage}/{Urls.SettingsSections.Profile}")" FullWidth OnClick="() => isOpen=false">
@Localizer[nameof(AppStrings.ProfileTitle)]
</BitActionButton>

<BitActionButton IconName="@BitIconName.Globe" FullWidth OnClick="() => showCultures=true">
<BitStack Horizontal Gap="0" Grows VerticalAlign="BitAlignment.Center">
@Localizer[nameof(AppStrings.Language)]
Expand All @@ -55,11 +59,10 @@
<BitToggle OnChange="ToggleTheme" Value="currentTheme == AppThemeType.Light" ValueChanged="v => {}" />
</BitStack>

<BitActionButton IconName="@BitIconName.Contact" Href="@($"{Urls.SettingsPage}/{Urls.SettingsSections.Profile}")" FullWidth OnClick="() => isOpen=false">
@Localizer[nameof(AppStrings.ProfileTitle)]
</BitActionButton>

<BitActionButton IconName="@BitIconName.SignOut" FullWidth OnClick="() => { isSignOutConfirmOpen=true; isOpen=false; }">
<BitActionButton FullWidth
Color="BitColor.Error"
IconName="@BitIconName.SignOut"
OnClick="() => { isSignOutConfirmOpen=true; isOpen=false; }">
@Localizer[nameof(AppStrings.SignOut)]
</BitActionButton>
</BitStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@
</BitDataGridTemplateColumn>
</BitDataGrid>
</div>
<BitDataGridPaginator Value="pagination" />
<BitDataGridPaginator Value="pagination"
SummaryFormat="v => string.Format(Localizer[nameof(AppStrings.PaginatorSummary)], v.TotalItemCount)"
GoToFirstButtonTitle="Go to first page"
GoToPrevButtonTitle="Go to previous page"
GoToNextButtonTitle="Go to next page"
GoToLastButtonTitle="Go to last page">
<TextTemplate Context="value">
<span>@Localizer[nameof(AppStrings.Page)] <b>@(value.CurrentPageIndex + 1)</b> @Localizer[nameof(AppStrings.Of)] <b>@(value.LastPageIndex + 1)</b></span>
</TextTemplate>
</BitDataGridPaginator>
</BitStack>
</BitStack>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@
</BitDataGridTemplateColumn>
</BitDataGrid>
</div>
<BitDataGridPaginator Value="pagination" />
<BitDataGridPaginator Value="pagination"
SummaryFormat="v => string.Format(Localizer[nameof(AppStrings.PaginatorSummary)], v.TotalItemCount)"
GoToFirstButtonTitle="Go to first page"
GoToPrevButtonTitle="Go to previous page"
GoToNextButtonTitle="Go to next page"
GoToLastButtonTitle="Go to last page">
<TextTemplate Context="value">
<span>@Localizer[nameof(AppStrings.Page)] <b>@(value.CurrentPageIndex + 1)</b> @Localizer[nameof(AppStrings.Of)] <b>@(value.LastPageIndex + 1)</b></span>
</TextTemplate>
</BitDataGridPaginator>
</BitStack>
</BitStack>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static IServiceCollection AddClientCoreProjectServices(this IServiceColle
services.AddSessioned<MessageBoxService>();
services.AddSessioned<ILocalHttpServer, NoopLocalHttpServer>();
services.AddSessioned<ITelemetryContext, AppTelemetryContext>();
services.AddSessioned(sp =>
services.AddSessioned<AuthenticationStateProvider>(sp =>
{
var authenticationStateProvider = ActivatorUtilities.CreateInstance<AuthenticationManager>(sp);
authenticationStateProvider.OnInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,27 @@
<!--#elif (sample == "Admin") -->
<data name="AdminPanel" xml:space="preserve">
<value>پنل ادمین</value>
</data>
<data name="PaginatorSummary" xml:space="preserve">
<value>{0} آیتم</value>
</data>
<data name="PaginatorFirstButtonTitle" xml:space="preserve">
<value>برو به اولین برگه</value>
</data>
<data name="PaginatorPrevButtonTitle" xml:space="preserve">
<value>برو به برگه قبل</value>
</data>
<data name="PaginatorNextButtonTitle" xml:space="preserve">
<value>برو به برگه بعد</value>
</data>
<data name="PaginatorLastButtonTitle" xml:space="preserve">
<value>برو به آخرین برگه</value>
</data>
<data name="Page" xml:space="preserve">
<value>برگه</value>
</data>
<data name="Of" xml:space="preserve">
<value>از</value>
</data>
<data name="ProductsCount" xml:space="preserve">
<value>تعداد محصولات</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,27 @@
<!--#elif (sample == "Admin") -->
<data name="AdminPanel" xml:space="preserve">
<value>Beheerderspaneel</value>
</data>
<data name="PaginatorSummary" xml:space="preserve">
<value>{0} items</value>
</data>
<data name="PaginatorFirstButtonTitle" xml:space="preserve">
<value>Ga naar de eerste pagina</value>
</data>
<data name="PaginatorPrevButtonTitle" xml:space="preserve">
<value>Ga naar de vorige pagina</value>
</data>
<data name="PaginatorNextButtonTitle" xml:space="preserve">
<value>Ga naar de volgende pagina</value>
</data>
<data name="PaginatorLastButtonTitle" xml:space="preserve">
<value>Ga naar de laatste pagina</value>
</data>
<data name="Page" xml:space="preserve">
<value>Pagina</value>
</data>
<data name="Of" xml:space="preserve">
<value>tot</value>
</data>
<data name="ProductsCount" xml:space="preserve">
<value>Aantal producten</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,27 @@
<!--#elif (sample == "Admin") -->
<data name="AdminPanel" xml:space="preserve">
<value>Admin panel</value>
</data>
<data name="PaginatorSummary" xml:space="preserve">
<value>{0} items</value>
</data>
<data name="PaginatorFirstButtonTitle" xml:space="preserve">
<value>Go to the first page</value>
</data>
<data name="PaginatorPrevButtonTitle" xml:space="preserve">
<value>Go to the previous page</value>
</data>
<data name="PaginatorNextButtonTitle" xml:space="preserve">
<value>Go to the next page</value>
</data>
<data name="PaginatorLastButtonTitle" xml:space="preserve">
<value>Go to the last page</value>
</data>
<data name="Page" xml:space="preserve">
<value>Page</value>
</data>
<data name="Of" xml:space="preserve">
<value>of</value>
</data>
<data name="ProductsCount" xml:space="preserve">
<value>Products count</value>
Expand Down
Loading