From 674f1282b60905c3d5033bb2748a9019af900190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 13 Oct 2020 17:09:17 +0300 Subject: [PATCH] Remove test code from the startup template. --- .../Pages/Index.razor | 23 -------- .../Pages/Index.razor.cs | 57 +------------------ 2 files changed, 1 insertion(+), 79 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor index 0f0d1935df..8ae9643f63 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor @@ -13,29 +13,6 @@
Congratulations, MyProjectName is successfully running!
- - - UI Message Tests - - - - - - - - - -

Welcome to the Application

@L["LongWelcomeMessage"]

diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor.cs index c39cb6f880..3e1570ecc8 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Index.razor.cs @@ -1,62 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Security.Claims; -using System.Threading.Tasks; -using Blazorise; -using Microsoft.AspNetCore.Components; -using Volo.Abp.AspNetCore.Components.WebAssembly; - -namespace MyCompanyName.MyProjectName.Blazor.Pages +namespace MyCompanyName.MyProjectName.Blazor.Pages { public partial class Index { - private IEnumerable _claims; - - protected override async Task OnInitializedAsync() - { - var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); - if ( authState.User.Identity.IsAuthenticated ) - { - _claims = authState.User.Claims; - } - } - - Task OnInfoTestClicked() - { - return UiMessageService.InfoAsync( "This is the Info message", "Info", options => - { - options.OkButtonIcon = IconName.InfoCircle; - options.OkButtonText = "Hello info"; - } ); - } - - Task OnSuccessTestClicked() - { - return UiMessageService.SuccessAsync( "This is the Success message", "Success" ); - } - - Task OnWarningTestClicked() - { - return UiMessageService.WarnAsync( "This is the Warning message", "Warning" ); - } - - Task OnErrorTestClicked() - { - return UiMessageService.ErrorAsync( "This is the Error message", "Error" ); - } - - async Task OnConfirmTestClicked() - { - if ( await UiMessageService.ConfirmAsync( "Are you sure you want to delete the item?", "Confirm", options => - { - options.CancelButtonText = "Do not delete it"; - options.ConfirmButtonText = "Yes I'm sure"; - } ) ) - { - Console.WriteLine( "Confirmed" ); - } - } - [Inject] IUiMessageService UiMessageService { get; set; } } }