diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/BasketService.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/BasketService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/BasketService.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/BasketService.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/AddressDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/AddressDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/AddressDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/AddressDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/AddressTypeDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/AddressTypeDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/AddressTypeDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/AddressTypeDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/BasketItemDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/BasketItemDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/BasketItemDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/BasketItemDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/GoodsDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/GoodsDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/GoodsDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/GoodsDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/MultiRangeDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/MultiRangeDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/MultiRangeDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/MultiRangeDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/Dto/RelatedGoodsDto.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/RelatedGoodsDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/Dto/RelatedGoodsDto.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/Dto/RelatedGoodsDto.cs diff --git a/Masa.Blazor.Pro/Data/App/ECommerce/ShopService.cs b/Masa.Blazor.Pro.Client/Data/App/ECommerce/ShopService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/ECommerce/ShopService.cs rename to Masa.Blazor.Pro.Client/Data/App/ECommerce/ShopService.cs diff --git a/Masa.Blazor.Pro/Data/App/Invoice/Dto/BillDto.cs b/Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/BillDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Invoice/Dto/BillDto.cs rename to Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/BillDto.cs diff --git a/Masa.Blazor.Pro/Data/App/Invoice/Dto/InvoiceRecordDto.cs b/Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/InvoiceRecordDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Invoice/Dto/InvoiceRecordDto.cs rename to Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/InvoiceRecordDto.cs diff --git a/Masa.Blazor.Pro/Data/App/Invoice/Dto/InvoiceStateDto.cs b/Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/InvoiceStateDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Invoice/Dto/InvoiceStateDto.cs rename to Masa.Blazor.Pro.Client/Data/App/Invoice/Dto/InvoiceStateDto.cs diff --git a/Masa.Blazor.Pro/Data/App/Invoice/InvoiceService.cs b/Masa.Blazor.Pro.Client/Data/App/Invoice/InvoiceService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Invoice/InvoiceService.cs rename to Masa.Blazor.Pro.Client/Data/App/Invoice/InvoiceService.cs diff --git a/Masa.Blazor.Pro/Data/App/Todo/Dto/SelectData.cs b/Masa.Blazor.Pro.Client/Data/App/Todo/Dto/SelectData.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Todo/Dto/SelectData.cs rename to Masa.Blazor.Pro.Client/Data/App/Todo/Dto/SelectData.cs diff --git a/Masa.Blazor.Pro/Data/App/Todo/Dto/TodoDto.cs b/Masa.Blazor.Pro.Client/Data/App/Todo/Dto/TodoDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Todo/Dto/TodoDto.cs rename to Masa.Blazor.Pro.Client/Data/App/Todo/Dto/TodoDto.cs diff --git a/Masa.Blazor.Pro/Data/App/Todo/TodoService.cs b/Masa.Blazor.Pro.Client/Data/App/Todo/TodoService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/Todo/TodoService.cs rename to Masa.Blazor.Pro.Client/Data/App/Todo/TodoService.cs diff --git a/Masa.Blazor.Pro/Data/App/User/Dto/PermissionDto.cs b/Masa.Blazor.Pro.Client/Data/App/User/Dto/PermissionDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/User/Dto/PermissionDto.cs rename to Masa.Blazor.Pro.Client/Data/App/User/Dto/PermissionDto.cs diff --git a/Masa.Blazor.Pro/Data/App/User/Dto/UserDto.cs b/Masa.Blazor.Pro.Client/Data/App/User/Dto/UserDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/User/Dto/UserDto.cs rename to Masa.Blazor.Pro.Client/Data/App/User/Dto/UserDto.cs diff --git a/Masa.Blazor.Pro/Data/App/User/UserService.cs b/Masa.Blazor.Pro.Client/Data/App/User/UserService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/App/User/UserService.cs rename to Masa.Blazor.Pro.Client/Data/App/User/UserService.cs diff --git a/Masa.Blazor.Pro/Data/Base/GlobalVariables.cs b/Masa.Blazor.Pro.Client/Data/Base/GlobalVariables.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Base/GlobalVariables.cs rename to Masa.Blazor.Pro.Client/Data/Base/GlobalVariables.cs diff --git a/Masa.Blazor.Pro/Data/Base/PagingData.cs b/Masa.Blazor.Pro.Client/Data/Base/PagingData.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Base/PagingData.cs rename to Masa.Blazor.Pro.Client/Data/Base/PagingData.cs diff --git a/Masa.Blazor.Pro/Data/Dashboard/Analytics/AnalyticsService.cs b/Masa.Blazor.Pro.Client/Data/Dashboard/Analytics/AnalyticsService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Dashboard/Analytics/AnalyticsService.cs rename to Masa.Blazor.Pro.Client/Data/Dashboard/Analytics/AnalyticsService.cs diff --git a/Masa.Blazor.Pro/Data/Dashboard/ECommerce/Dto/CompanyDto.cs b/Masa.Blazor.Pro.Client/Data/Dashboard/ECommerce/Dto/CompanyDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Dashboard/ECommerce/Dto/CompanyDto.cs rename to Masa.Blazor.Pro.Client/Data/Dashboard/ECommerce/Dto/CompanyDto.cs diff --git a/Masa.Blazor.Pro/Data/Dashboard/ECommerce/ECommerceService.cs b/Masa.Blazor.Pro.Client/Data/Dashboard/ECommerce/ECommerceService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Dashboard/ECommerce/ECommerceService.cs rename to Masa.Blazor.Pro.Client/Data/Dashboard/ECommerce/ECommerceService.cs diff --git a/Masa.Blazor.Pro/Data/Others/AccountSettings/AccountSettingService.cs b/Masa.Blazor.Pro.Client/Data/Others/AccountSettings/AccountSettingService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Others/AccountSettings/AccountSettingService.cs rename to Masa.Blazor.Pro.Client/Data/Others/AccountSettings/AccountSettingService.cs diff --git a/Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/AccountDto.cs b/Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/AccountDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/AccountDto.cs rename to Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/AccountDto.cs diff --git a/Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/CountryDto.cs b/Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/CountryDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/CountryDto.cs rename to Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/CountryDto.cs diff --git a/Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/InformationDto.cs b/Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/InformationDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/InformationDto.cs rename to Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/InformationDto.cs diff --git a/Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/SocialDto.cs b/Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/SocialDto.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Others/AccountSettings/Dto/SocialDto.cs rename to Masa.Blazor.Pro.Client/Data/Others/AccountSettings/Dto/SocialDto.cs diff --git a/Masa.Blazor.Pro/Data/Shared/Favorite/FavoriteService.cs b/Masa.Blazor.Pro.Client/Data/Shared/Favorite/FavoriteService.cs similarity index 100% rename from Masa.Blazor.Pro/Data/Shared/Favorite/FavoriteService.cs rename to Masa.Blazor.Pro.Client/Data/Shared/Favorite/FavoriteService.cs diff --git a/Masa.Blazor.Pro/Global/Config/GlobalConfig.cs b/Masa.Blazor.Pro.Client/Global/Config/GlobalConfig.cs similarity index 80% rename from Masa.Blazor.Pro/Global/Config/GlobalConfig.cs rename to Masa.Blazor.Pro.Client/Global/Config/GlobalConfig.cs index 45cb967..dce66bd 100644 --- a/Masa.Blazor.Pro/Global/Config/GlobalConfig.cs +++ b/Masa.Blazor.Pro.Client/Global/Config/GlobalConfig.cs @@ -30,12 +30,17 @@ public GlobalConfig(CookieStorage cookieStorage, I18n i18n) public EventHandler? NavigationStyleChanged { get; set; } + public EventHandler? PageModeChanged { get; set; } + + public EventHandler? ExpandOnHoverChanged { get; set; } + public string PageMode { get => _pageMode ?? PageModes.PageTab; set { _pageMode = value; + PageModeChanged?.Invoke(this, EventArgs.Empty); _cookieStorage.SetAsync(PageModeKey, value); } } @@ -57,6 +62,7 @@ public bool ExpandOnHover set { _expandOnHover = value; + ExpandOnHoverChanged?.Invoke(this, EventArgs.Empty); _cookieStorage.SetAsync(ExpandOnHoverCookieKey, value); } } @@ -83,10 +89,10 @@ public CultureInfo Culture public async Task InitFromStorage() { - _pageMode = await _cookieStorage.GetAsync(PageModeKey); - _navigationStyle = await _cookieStorage.GetAsync(NavigationStyleKey); - _expandOnHover = Convert.ToBoolean(await _cookieStorage.GetAsync(ExpandOnHoverCookieKey)); - _favorite = await _cookieStorage.GetAsync(FavoriteCookieKey); + PageMode = await _cookieStorage.GetAsync(PageModeKey); + NavigationStyle = await _cookieStorage.GetAsync(NavigationStyleKey); + ExpandOnHover = Convert.ToBoolean(await _cookieStorage.GetAsync(ExpandOnHoverCookieKey)); + Favorite = await _cookieStorage.GetAsync(FavoriteCookieKey); var lang = await _cookieStorage.GetAsync(LangCookieKey); if (!string.IsNullOrWhiteSpace(lang)) diff --git a/Masa.Blazor.Pro/Global/Config/NavigationStyles.cs b/Masa.Blazor.Pro.Client/Global/Config/NavigationStyles.cs similarity index 100% rename from Masa.Blazor.Pro/Global/Config/NavigationStyles.cs rename to Masa.Blazor.Pro.Client/Global/Config/NavigationStyles.cs diff --git a/Masa.Blazor.Pro/Global/Config/PageModes.cs b/Masa.Blazor.Pro.Client/Global/Config/PageModes.cs similarity index 100% rename from Masa.Blazor.Pro/Global/Config/PageModes.cs rename to Masa.Blazor.Pro.Client/Global/Config/PageModes.cs diff --git a/Masa.Blazor.Pro/Global/CookieStorage.cs b/Masa.Blazor.Pro.Client/Global/CookieStorage.cs similarity index 62% rename from Masa.Blazor.Pro/Global/CookieStorage.cs rename to Masa.Blazor.Pro.Client/Global/CookieStorage.cs index 1c47cf6..ac5bd76 100644 --- a/Masa.Blazor.Pro/Global/CookieStorage.cs +++ b/Masa.Blazor.Pro.Client/Global/CookieStorage.cs @@ -13,7 +13,15 @@ public CookieStorage(IJSRuntime jsRuntime) public async Task GetAsync(string key) { - return await _jsRuntime.InvokeAsync(JsInteropConstants.GetCookie, key); + try + { + return await _jsRuntime.InvokeAsync(JsInteropConstants.GetCookie, key); + } + catch (JSDisconnectedException) + { + // ignore + return string.Empty; + } } public async void SetAsync(string key, T? value) @@ -22,9 +30,9 @@ public async void SetAsync(string key, T? value) { await _jsRuntime.InvokeVoidAsync(JsInteropConstants.SetCookie, key, value?.ToString()); } - catch + catch (JSDisconnectedException) { - // ignored + // ignore } } } diff --git a/Masa.Blazor.Pro/Global/Nav/Model/NavModel.cs b/Masa.Blazor.Pro.Client/Global/Nav/Model/NavModel.cs similarity index 100% rename from Masa.Blazor.Pro/Global/Nav/Model/NavModel.cs rename to Masa.Blazor.Pro.Client/Global/Nav/Model/NavModel.cs diff --git a/Masa.Blazor.Pro/Global/Nav/NavHelper.cs b/Masa.Blazor.Pro.Client/Global/Nav/NavHelper.cs similarity index 100% rename from Masa.Blazor.Pro/Global/Nav/NavHelper.cs rename to Masa.Blazor.Pro.Client/Global/Nav/NavHelper.cs diff --git a/Masa.Blazor.Pro/Global/Nav/NavServiceCollectionExtensions.cs b/Masa.Blazor.Pro.Client/Global/Nav/NavServiceCollectionExtensions.cs similarity index 100% rename from Masa.Blazor.Pro/Global/Nav/NavServiceCollectionExtensions.cs rename to Masa.Blazor.Pro.Client/Global/Nav/NavServiceCollectionExtensions.cs diff --git a/Masa.Blazor.Pro/Global/ServiceCollectionExtensions.cs b/Masa.Blazor.Pro.Client/Global/ServiceCollectionExtensions.cs similarity index 92% rename from Masa.Blazor.Pro/Global/ServiceCollectionExtensions.cs rename to Masa.Blazor.Pro.Client/Global/ServiceCollectionExtensions.cs index 8b9e9d8..905cd07 100644 --- a/Masa.Blazor.Pro/Global/ServiceCollectionExtensions.cs +++ b/Masa.Blazor.Pro.Client/Global/ServiceCollectionExtensions.cs @@ -1,4 +1,6 @@ -namespace Microsoft.Extensions.DependencyInjection +using System.Net.Http.Json; + +namespace Microsoft.Extensions.DependencyInjection { public static class ServiceCollectionExtensions { diff --git a/Masa.Blazor.Pro/Shared/Breadcrumb.razor b/Masa.Blazor.Pro.Client/Layout/Breadcrumb.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/Breadcrumb.razor rename to Masa.Blazor.Pro.Client/Layout/Breadcrumb.razor diff --git a/Masa.Blazor.Pro/Shared/EmptyLayout.razor b/Masa.Blazor.Pro.Client/Layout/EmptyLayout.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/EmptyLayout.razor rename to Masa.Blazor.Pro.Client/Layout/EmptyLayout.razor diff --git a/Masa.Blazor.Pro/Shared/Favorite.razor b/Masa.Blazor.Pro.Client/Layout/Favorite.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/Favorite.razor rename to Masa.Blazor.Pro.Client/Layout/Favorite.razor diff --git a/Masa.Blazor.Pro/Shared/Favorite.razor.cs b/Masa.Blazor.Pro.Client/Layout/Favorite.razor.cs similarity index 97% rename from Masa.Blazor.Pro/Shared/Favorite.razor.cs rename to Masa.Blazor.Pro.Client/Layout/Favorite.razor.cs index 74cd907..d91b966 100644 --- a/Masa.Blazor.Pro/Shared/Favorite.razor.cs +++ b/Masa.Blazor.Pro.Client/Layout/Favorite.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Shared +namespace Masa.Blazor.Pro.Client.Layout { public partial class Favorite { diff --git a/Masa.Blazor.Pro/Shared/Language.razor b/Masa.Blazor.Pro.Client/Layout/Language.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/Language.razor rename to Masa.Blazor.Pro.Client/Layout/Language.razor diff --git a/Masa.Blazor.Pro/Shared/Login.razor b/Masa.Blazor.Pro.Client/Layout/Login.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/Login.razor rename to Masa.Blazor.Pro.Client/Layout/Login.razor diff --git a/Masa.Blazor.Pro/Shared/MainLayout.razor b/Masa.Blazor.Pro.Client/Layout/MainLayout.razor similarity index 73% rename from Masa.Blazor.Pro/Shared/MainLayout.razor rename to Masa.Blazor.Pro.Client/Layout/MainLayout.razor index 7f3c0c0..79cb39a 100644 --- a/Masa.Blazor.Pro/Shared/MainLayout.razor +++ b/Masa.Blazor.Pro.Client/Layout/MainLayout.razor @@ -15,7 +15,7 @@
- @if (_pageTab == PageModes.PageTab) + @if (GlobalConfig.PageMode == PageModes.PageTab) { } @@ -30,7 +30,7 @@
- @if (_pageTab == PageModes.PageTab) + @if (GlobalConfig.PageMode == PageModes.PageTab) { @Body @@ -42,25 +42,41 @@ }
- + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ @code { private static readonly string[] s_selfPatterns = - { + [ "/app/todo" - }; + ]; private bool? _showSetting; - private string? _pageTab; - private PageTabs? _pageTabs; - private string PageModeClass => _pageTab == PageModes.PageTab ? "page-mode--tab" : "page-mode--breadcrumb"; + private string PageModeClass => GlobalConfig.PageMode == PageModes.PageTab ? "page-mode--tab" : "page-mode--breadcrumb"; + + protected override void OnInitialized() + { + base.OnInitialized(); + + GlobalConfig.PageModeChanged += PageModeChanged; + } + + private void PageModeChanged(object? sender, EventArgs e) + { + InvokeAsync(StateHasChanged); + } protected override async Task OnAfterRenderAsync(bool firstRender) { @@ -69,6 +85,7 @@ if (firstRender) { await GlobalConfig.InitFromStorage(); + StateHasChanged(); } } diff --git a/Masa.Blazor.Pro.Client/Layout/MainLayout.razor.css b/Masa.Blazor.Pro.Client/Layout/MainLayout.razor.css new file mode 100644 index 0000000..8c3ed5b --- /dev/null +++ b/Masa.Blazor.Pro.Client/Layout/MainLayout.razor.css @@ -0,0 +1,19 @@ +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/Masa.Blazor.Pro/Shared/Navigation.razor b/Masa.Blazor.Pro.Client/Layout/Navigation.razor similarity index 81% rename from Masa.Blazor.Pro/Shared/Navigation.razor rename to Masa.Blazor.Pro.Client/Layout/Navigation.razor index c966acb..1fbb780 100644 --- a/Masa.Blazor.Pro/Shared/Navigation.razor +++ b/Masa.Blazor.Pro.Client/Layout/Navigation.razor @@ -3,15 +3,14 @@ @inject GlobalConfig GlobalConfig @implements IDisposable - - @@ -77,6 +76,8 @@ [Inject] public MasaBlazor Masa { get; set; } = default!; + private CancellationTokenSource? _cancellationTokenSource; + public bool? Visible { get; set; } = true; public string ComputedNavigationClass => (GlobalConfig.NavigationStyle == NavigationStyles.Rounded ? "rounded-r-xl" : string.Empty); @@ -85,12 +86,24 @@ { base.OnInitialized(); - GlobalConfig.NavigationStyleChanged += NavigationStyleChanged; + GlobalConfig.NavigationStyleChanged += GlobalConfigChanged; + GlobalConfig.ExpandOnHoverChanged += GlobalConfigChanged; } - private void NavigationStyleChanged(object? sender, EventArgs e) + private async void GlobalConfigChanged(object? sender, EventArgs e) { - InvokeAsync(StateHasChanged); + _cancellationTokenSource?.Cancel(); + _cancellationTokenSource = new CancellationTokenSource(); + + try + { + await Task.Delay(100, _cancellationTokenSource.Token); + await InvokeAsync(StateHasChanged); + } + catch (TaskCanceledException) + { + // ignore + } } public void Switch() @@ -108,7 +121,8 @@ void IDisposable.Dispose() { - GlobalConfig.NavigationStyleChanged -= NavigationStyleChanged; + GlobalConfig.NavigationStyleChanged -= GlobalConfigChanged; + GlobalConfig.ExpandOnHoverChanged -= GlobalConfigChanged; } } diff --git a/Masa.Blazor.Pro/Shared/PageTabs.razor b/Masa.Blazor.Pro.Client/Layout/PageTabs.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/PageTabs.razor rename to Masa.Blazor.Pro.Client/Layout/PageTabs.razor diff --git a/Masa.Blazor.Pro/Shared/ProComponentBase.cs b/Masa.Blazor.Pro.Client/Layout/ProComponentBase.cs similarity index 100% rename from Masa.Blazor.Pro/Shared/ProComponentBase.cs rename to Masa.Blazor.Pro.Client/Layout/ProComponentBase.cs diff --git a/Masa.Blazor.Pro/Shared/Search.razor b/Masa.Blazor.Pro.Client/Layout/Search.razor similarity index 100% rename from Masa.Blazor.Pro/Shared/Search.razor rename to Masa.Blazor.Pro.Client/Layout/Search.razor diff --git a/Masa.Blazor.Pro/Shared/Settings.razor b/Masa.Blazor.Pro.Client/Layout/Settings.razor similarity index 83% rename from Masa.Blazor.Pro/Shared/Settings.razor rename to Masa.Blazor.Pro.Client/Layout/Settings.razor index 362120b..d0e6ae6 100644 --- a/Masa.Blazor.Pro/Shared/Settings.razor +++ b/Masa.Blazor.Pro.Client/Layout/Settings.razor @@ -38,32 +38,21 @@ [Parameter] public EventCallback ShowChanged { get; set; } - [Parameter] - public string PageModel { get; set; } = PageModes.PageTab; - [Parameter] public string NavigationStyle { get; set; } = NavigationStyles.Flat; - [Parameter] - public EventCallback PageModelChanged { get; set; } - [Parameter] public EventCallback NavigationBarStyleChanged { get; set; } protected override async Task OnInitializedAsync() { - if (PageModelChanged.HasDelegate) - await PageModelChanged.InvokeAsync(GlobalConfig.PageMode); if (NavigationBarStyleChanged.HasDelegate) await NavigationBarStyleChanged.InvokeAsync(GlobalConfig.NavigationStyle); } - async Task PageModeChanged(string value) + void PageModeChanged(string value) { GlobalConfig.PageMode = value; - if (PageModelChanged.HasDelegate) - await PageModelChanged.InvokeAsync(value); - else PageModel = value; } async Task NavigationStyleChanged(string value) diff --git a/Masa.Blazor.Pro.Client/Masa.Blazor.Pro.Client.csproj b/Masa.Blazor.Pro.Client/Masa.Blazor.Pro.Client.csproj new file mode 100644 index 0000000..297406c --- /dev/null +++ b/Masa.Blazor.Pro.Client/Masa.Blazor.Pro.Client.csproj @@ -0,0 +1,16 @@ + + + + net8.0 + enable + enable + true + Default + + + + + + + + diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Order/Address.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Address.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Order/Address.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Address.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Order/Cart.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Cart.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Order/Cart.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Cart.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Order/Order.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Order.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Order/Order.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Order.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Order/Payment.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Payment.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Order/Payment.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Order/Payment.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Details.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Details.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Details.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Details.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Shop.razor b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Shop.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Shop.razor rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Shop.razor diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Shop.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Shop.razor.cs similarity index 94% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Shop.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Shop.razor.cs index fd7df2e..88d336a 100644 --- a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/Shop.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/Shop.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.ECommerce.Shop +namespace Masa.Blazor.Pro.Client.Pages.App.ECommerce.Shop { public partial class Shop : ProComponentBase { diff --git a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs similarity index 97% rename from Masa.Blazor.Pro/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs rename to Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs index 11b4be6..7427be4 100644 --- a/Masa.Blazor.Pro/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/ECommerce/Shop/ViewModel/ShopPage.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.ECommerce.Shop; +namespace Masa.Blazor.Pro.Client.Pages.App.ECommerce.Shop; public class ShopPage { diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Add.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor similarity index 99% rename from Masa.Blazor.Pro/Pages/App/Invoice/Add.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor index 0f7dc90..866cbe2 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/Add.razor +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor @@ -223,4 +223,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Add.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor.cs similarity index 96% rename from Masa.Blazor.Pro/Pages/App/Invoice/Add.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor.cs index faea4e4..514ed17 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/Add.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Add.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.Invoice +namespace Masa.Blazor.Pro.Client.Pages.App.Invoice { public partial class Add : ProComponentBase { diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Components/AddPayment.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/AddPayment.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Invoice/Components/AddPayment.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/AddPayment.razor diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/InvoiceList.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/InvoiceList.razor diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/InvoiceList.razor.cs similarity index 94% rename from Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/InvoiceList.razor.cs index 48ea16c..ce9bd2c 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/InvoiceList.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.Invoice.Components; +namespace Masa.Blazor.Pro.Client.Pages.App.Invoice.Components; public partial class InvoiceList { diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Components/SendInvoice.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/SendInvoice.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Invoice/Components/SendInvoice.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Components/SendInvoice.razor diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Edit.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Edit.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Invoice/Edit.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Edit.razor diff --git a/Masa.Blazor.Pro.Client/Pages/App/Invoice/List.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/List.razor new file mode 100644 index 0000000..9b5d663 --- /dev/null +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/List.razor @@ -0,0 +1,3 @@ +@page "/app/invoice/list" + + diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor similarity index 97% rename from Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor index a36755c..9b8dd9c 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor @@ -163,5 +163,5 @@ - - + + diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor.cs similarity index 91% rename from Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor.cs index af42d46..56c328e 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/Preview.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.Invoice +namespace Masa.Blazor.Pro.Client.Pages.App.Invoice { public partial class Preview { diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/ViewModel/InvoicePage.cs b/Masa.Blazor.Pro.Client/Pages/App/Invoice/ViewModel/InvoicePage.cs similarity index 95% rename from Masa.Blazor.Pro/Pages/App/Invoice/ViewModel/InvoicePage.cs rename to Masa.Blazor.Pro.Client/Pages/App/Invoice/ViewModel/InvoicePage.cs index 6137499..74464a8 100644 --- a/Masa.Blazor.Pro/Pages/App/Invoice/ViewModel/InvoicePage.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Invoice/ViewModel/InvoicePage.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.Invoice; +namespace Masa.Blazor.Pro.Client.Pages.App.Invoice; public class InvoicePage { diff --git a/Masa.Blazor.Pro/Pages/App/Todo/Todo.razor b/Masa.Blazor.Pro.Client/Pages/App/Todo/Todo.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Todo/Todo.razor rename to Masa.Blazor.Pro.Client/Pages/App/Todo/Todo.razor diff --git a/Masa.Blazor.Pro/Pages/App/Todo/Todo.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/Todo/Todo.razor.cs similarity index 98% rename from Masa.Blazor.Pro/Pages/App/Todo/Todo.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/Todo/Todo.razor.cs index 46ee8a3..03f90a1 100644 --- a/Masa.Blazor.Pro/Pages/App/Todo/Todo.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Todo/Todo.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.Todo +namespace Masa.Blazor.Pro.Client.Pages.App.Todo { public partial class Todo { diff --git a/Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor b/Masa.Blazor.Pro.Client/Pages/App/Todo/TodoDetail.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor rename to Masa.Blazor.Pro.Client/Pages/App/Todo/TodoDetail.razor diff --git a/Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/Todo/TodoDetail.razor.cs similarity index 98% rename from Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/Todo/TodoDetail.razor.cs index bcf8eab..c0fe49e 100644 --- a/Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/Todo/TodoDetail.razor.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components.Forms; -namespace Masa.Blazor.Pro.Pages.App.Todo; +namespace Masa.Blazor.Pro.Client.Pages.App.Todo; public partial class TodoDetail { diff --git a/Masa.Blazor.Pro/Pages/App/Todo/TodoNav.razor b/Masa.Blazor.Pro.Client/Pages/App/Todo/TodoNav.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Todo/TodoNav.razor rename to Masa.Blazor.Pro.Client/Pages/App/Todo/TodoNav.razor diff --git a/Masa.Blazor.Pro/Pages/App/Todo/TodoNavItem.razor b/Masa.Blazor.Pro.Client/Pages/App/Todo/TodoNavItem.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/Todo/TodoNavItem.razor rename to Masa.Blazor.Pro.Client/Pages/App/Todo/TodoNavItem.razor diff --git a/Masa.Blazor.Pro/Pages/App/User/Add.razor b/Masa.Blazor.Pro.Client/Pages/App/User/Add.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/User/Add.razor rename to Masa.Blazor.Pro.Client/Pages/App/User/Add.razor diff --git a/Masa.Blazor.Pro/Pages/App/User/Edit.razor b/Masa.Blazor.Pro.Client/Pages/App/User/Edit.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/User/Edit.razor rename to Masa.Blazor.Pro.Client/Pages/App/User/Edit.razor diff --git a/Masa.Blazor.Pro/Pages/App/User/List.razor b/Masa.Blazor.Pro.Client/Pages/App/User/List.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/App/User/List.razor rename to Masa.Blazor.Pro.Client/Pages/App/User/List.razor diff --git a/Masa.Blazor.Pro/Pages/App/User/List.razor.cs b/Masa.Blazor.Pro.Client/Pages/App/User/List.razor.cs similarity index 95% rename from Masa.Blazor.Pro/Pages/App/User/List.razor.cs rename to Masa.Blazor.Pro.Client/Pages/App/User/List.razor.cs index 31b4e07..3e372aa 100644 --- a/Masa.Blazor.Pro/Pages/App/User/List.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/User/List.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.User +namespace Masa.Blazor.Pro.Client.Pages.App.User { public partial class List { diff --git a/Masa.Blazor.Pro/Pages/App/User/View.razor b/Masa.Blazor.Pro.Client/Pages/App/User/View.razor similarity index 99% rename from Masa.Blazor.Pro/Pages/App/User/View.razor rename to Masa.Blazor.Pro.Client/Pages/App/User/View.razor index 1a4745a..5213533 100644 --- a/Masa.Blazor.Pro/Pages/App/User/View.razor +++ b/Masa.Blazor.Pro.Client/Pages/App/User/View.razor @@ -212,7 +212,7 @@ - + @code { diff --git a/Masa.Blazor.Pro/Pages/App/User/ViewModel/UserPage.cs b/Masa.Blazor.Pro.Client/Pages/App/User/ViewModel/UserPage.cs similarity index 96% rename from Masa.Blazor.Pro/Pages/App/User/ViewModel/UserPage.cs rename to Masa.Blazor.Pro.Client/Pages/App/User/ViewModel/UserPage.cs index d7e531d..c2e03e0 100644 --- a/Masa.Blazor.Pro/Pages/App/User/ViewModel/UserPage.cs +++ b/Masa.Blazor.Pro.Client/Pages/App/User/ViewModel/UserPage.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.App.User; +namespace Masa.Blazor.Pro.Client.Pages.App.User; public class UserPage { diff --git a/Masa.Blazor.Pro/Pages/Authentication/Components/Login.razor b/Masa.Blazor.Pro.Client/Pages/Authentication/Components/Login.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Authentication/Components/Login.razor rename to Masa.Blazor.Pro.Client/Pages/Authentication/Components/Login.razor diff --git a/Masa.Blazor.Pro/Pages/Authentication/Components/Login.razor.cs b/Masa.Blazor.Pro.Client/Pages/Authentication/Components/Login.razor.cs similarity index 91% rename from Masa.Blazor.Pro/Pages/Authentication/Components/Login.razor.cs rename to Masa.Blazor.Pro.Client/Pages/Authentication/Components/Login.razor.cs index 68f10d3..4a07a18 100644 --- a/Masa.Blazor.Pro/Pages/Authentication/Components/Login.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/Authentication/Components/Login.razor.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components.Web; -namespace Masa.Blazor.Pro.Pages.Authentication.Components; +namespace Masa.Blazor.Pro.Client.Pages.Authentication.Components; public partial class Login { diff --git a/Masa.Blazor.Pro/Pages/Authentication/Login-v1.razor b/Masa.Blazor.Pro.Client/Pages/Authentication/Login-v1.razor similarity index 86% rename from Masa.Blazor.Pro/Pages/Authentication/Login-v1.razor rename to Masa.Blazor.Pro.Client/Pages/Authentication/Login-v1.razor index 7ca1bbf..3065b34 100644 --- a/Masa.Blazor.Pro/Pages/Authentication/Login-v1.razor +++ b/Masa.Blazor.Pro.Client/Pages/Authentication/Login-v1.razor @@ -2,7 +2,7 @@ @layout EmptyLayout
- +
diff --git a/Masa.Blazor.Pro/Pages/Authentication/Login-v2.razor b/Masa.Blazor.Pro.Client/Pages/Authentication/Login-v2.razor similarity index 94% rename from Masa.Blazor.Pro/Pages/Authentication/Login-v2.razor rename to Masa.Blazor.Pro.Client/Pages/Authentication/Login-v2.razor index c15760f..86abf08 100644 --- a/Masa.Blazor.Pro/Pages/Authentication/Login-v2.razor +++ b/Masa.Blazor.Pro.Client/Pages/Authentication/Login-v2.razor @@ -14,7 +14,7 @@
-
- +
\ No newline at end of file diff --git a/Masa.Blazor.Pro/Pages/Dashboard/Analytics.razor.cs b/Masa.Blazor.Pro.Client/Pages/Dashboard/Analytics.razor.cs similarity index 99% rename from Masa.Blazor.Pro/Pages/Dashboard/Analytics.razor.cs rename to Masa.Blazor.Pro.Client/Pages/Dashboard/Analytics.razor.cs index aa6830d..243c97d 100644 --- a/Masa.Blazor.Pro/Pages/Dashboard/Analytics.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/Dashboard/Analytics.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.Dashboard +namespace Masa.Blazor.Pro.Client.Pages.Dashboard { public partial class Analytics : ProComponentBase { diff --git a/Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor b/Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor similarity index 99% rename from Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor rename to Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor index e26023e..52de137 100644 --- a/Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor +++ b/Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor @@ -224,7 +224,7 @@ - +
fa:far fa-calendar-check diff --git a/Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor.cs b/Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor.cs similarity index 99% rename from Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor.cs rename to Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor.cs index 4b3c172..d37f2fb 100644 --- a/Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor.cs +++ b/Masa.Blazor.Pro.Client/Pages/Dashboard/ECommerce.razor.cs @@ -1,4 +1,4 @@ -namespace Masa.Blazor.Pro.Pages.Dashboard +namespace Masa.Blazor.Pro.Client.Pages.Dashboard { public partial class ECommerce : ProComponentBase { diff --git a/Masa.Blazor.Pro/Pages/Home/Index.razor b/Masa.Blazor.Pro.Client/Pages/Home/Index.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Home/Index.razor rename to Masa.Blazor.Pro.Client/Pages/Home/Index.razor diff --git a/Masa.Blazor.Pro/Pages/Others/AccountSettings/AccountSettings.razor b/Masa.Blazor.Pro.Client/Pages/Others/AccountSettings/AccountSettings.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Others/AccountSettings/AccountSettings.razor rename to Masa.Blazor.Pro.Client/Pages/Others/AccountSettings/AccountSettings.razor diff --git a/Masa.Blazor.Pro/Pages/Others/Error.razor b/Masa.Blazor.Pro.Client/Pages/Others/Error.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Others/Error.razor rename to Masa.Blazor.Pro.Client/Pages/Others/Error.razor diff --git a/Masa.Blazor.Pro/Pages/Others/NotAuthorized.razor b/Masa.Blazor.Pro.Client/Pages/Others/NotAuthorized.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Others/NotAuthorized.razor rename to Masa.Blazor.Pro.Client/Pages/Others/NotAuthorized.razor diff --git a/Masa.Blazor.Pro/Pages/Others/NotFound.razor b/Masa.Blazor.Pro.Client/Pages/Others/NotFound.razor similarity index 100% rename from Masa.Blazor.Pro/Pages/Others/NotFound.razor rename to Masa.Blazor.Pro.Client/Pages/Others/NotFound.razor diff --git a/Masa.Blazor.Pro.Client/Program.cs b/Masa.Blazor.Pro.Client/Program.cs new file mode 100644 index 0000000..ce2ffef --- /dev/null +++ b/Masa.Blazor.Pro.Client/Program.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); + +builder.Services.AddMasaBlazor(options => +{ + options.ConfigureTheme(theme => + { + theme.Themes.Light.Primary = "#4318FF"; + theme.Themes.Light.Accent = "#4318FF"; + }); +}); + // .AddI18nForWasmAsync($"{builder.HostEnvironment.BaseAddress}/i18n"); + +await builder.Services.AddGlobalForWasmAsync(builder.HostEnvironment.BaseAddress); + +await builder.Build().RunAsync(); diff --git a/Masa.Blazor.Pro.Client/Routes.razor b/Masa.Blazor.Pro.Client/Routes.razor new file mode 100644 index 0000000..d0df781 --- /dev/null +++ b/Masa.Blazor.Pro.Client/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/Masa.Blazor.Pro/_Imports.cs b/Masa.Blazor.Pro.Client/_Imports.cs similarity index 99% rename from Masa.Blazor.Pro/_Imports.cs rename to Masa.Blazor.Pro.Client/_Imports.cs index f4a8efc..20abfcb 100644 --- a/Masa.Blazor.Pro/_Imports.cs +++ b/Masa.Blazor.Pro.Client/_Imports.cs @@ -24,4 +24,3 @@ global using System.ComponentModel.DataAnnotations; global using System.Reflection; global using System.Text.Json; - diff --git a/Masa.Blazor.Pro/_Imports.razor b/Masa.Blazor.Pro.Client/_Imports.razor similarity index 89% rename from Masa.Blazor.Pro/_Imports.razor rename to Masa.Blazor.Pro.Client/_Imports.razor index 4af7ed7..a54c982 100644 --- a/Masa.Blazor.Pro/_Imports.razor +++ b/Masa.Blazor.Pro.Client/_Imports.razor @@ -7,15 +7,14 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop @using Masa.Blazor.Pro -@using Masa.Blazor.Pro.Shared +@using Masa.Blazor.Pro.Client.Layout @using BlazorComponent @using BlazorComponent.I18n @using Masa.Blazor.Presets -@using Masa.Blazor.Pro.Pages +@using Masa.Blazor.Pro.Client.Pages @using Masa.Blazor.Pro.Global @using Masa.Blazor.Pro.Data @using System.Diagnostics.CodeAnalysis @using System.Diagnostics @using Microsoft.AspNetCore.Components.Rendering @using System.Globalization - diff --git a/Masa.Blazor.Pro.Client/wwwroot/appsettings.Development.json b/Masa.Blazor.Pro.Client/wwwroot/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Masa.Blazor.Pro.Client/wwwroot/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Masa.Blazor.Pro.Client/wwwroot/appsettings.json b/Masa.Blazor.Pro.Client/wwwroot/appsettings.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Masa.Blazor.Pro.Client/wwwroot/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Masa.Blazor.Pro.sln b/Masa.Blazor.Pro.sln index 7141715..7a6410c 100644 --- a/Masa.Blazor.Pro.sln +++ b/Masa.Blazor.Pro.sln @@ -1,31 +1,50 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31710.8 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro", "Masa.Blazor.Pro\Masa.Blazor.Pro.csproj", "{55FC32F7-34BA-4244-8245-BD1880AC8E4E}" +# Visual Studio Version 16 +VisualStudioVersion = 16.0.0.0 +MinimumVisualStudioVersion = 16.0.0.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro", "Masa.Blazor.Pro\Masa.Blazor.Pro.csproj", "{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5E22849-20A1-4624-8169-9C7EF6EA1B74}" - ProjectSection(SolutionItems) = preProject - README.md = README.md - README.zh-CN.md = README.zh-CN.md - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro.Client", "Masa.Blazor.Pro.Client\Masa.Blazor.Pro.Client.csproj", "{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Release|Any CPU.Build.0 = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x64.ActiveCfg = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x64.Build.0 = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x86.ActiveCfg = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x86.Build.0 = Debug|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|Any CPU.Build.0 = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x64.ActiveCfg = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x64.Build.0 = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x86.ActiveCfg = Release|Any CPU + {944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x86.Build.0 = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x64.ActiveCfg = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x64.Build.0 = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x86.ActiveCfg = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x86.Build.0 = Debug|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|Any CPU.Build.0 = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x64.ActiveCfg = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x64.Build.0 = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x86.ActiveCfg = Release|Any CPU + {E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {104790D8-C1BA-4407-8024-8C6D1862A560} + SolutionGuid = {41A0DEFD-768D-440B-B382-E4BA2E314018} EndGlobalSection EndGlobal diff --git a/Masa.Blazor.Pro/App.razor b/Masa.Blazor.Pro/App.razor deleted file mode 100644 index 6fd3ed1..0000000 --- a/Masa.Blazor.Pro/App.razor +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - Not found - -

Sorry, there's nothing at this address.

-
-
-
diff --git a/Masa.Blazor.Pro/Pages/_Layout.cshtml b/Masa.Blazor.Pro/Components/App.razor similarity index 74% rename from Masa.Blazor.Pro/Pages/_Layout.cshtml rename to Masa.Blazor.Pro/Components/App.razor index e13b6ff..ccda03a 100644 --- a/Masa.Blazor.Pro/Pages/_Layout.cshtml +++ b/Masa.Blazor.Pro/Components/App.razor @@ -1,27 +1,27 @@ -@using Microsoft.AspNetCore.Components.Web -@namespace Masa.Blazor.Pro.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - + + Masa.Blazor.Pro - + + - + + - @RenderBody() - + + - + + \ No newline at end of file diff --git a/Masa.Blazor.Pro/Components/Pages/Error.razor b/Masa.Blazor.Pro/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/Masa.Blazor.Pro/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/Masa.Blazor.Pro/Components/_Imports.razor b/Masa.Blazor.Pro/Components/_Imports.razor new file mode 100644 index 0000000..1f36153 --- /dev/null +++ b/Masa.Blazor.Pro/Components/_Imports.razor @@ -0,0 +1,14 @@ +@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 static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using Masa.Blazor.Pro +@using Masa.Blazor.Pro.Client +@using Masa.Blazor.Pro.Components +@using BlazorComponent +@using Masa.Blazor +@using Masa.Blazor.Presets diff --git a/Masa.Blazor.Pro/Dockerfile b/Masa.Blazor.Pro/Dockerfile index 85bd764..0142fda 100644 --- a/Masa.Blazor.Pro/Dockerfile +++ b/Masa.Blazor.Pro/Dockerfile @@ -1,11 +1,11 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_aspnet:8.0-1 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_sdk:8.0.100-1 AS build WORKDIR /src COPY ["Masa.Blazor.Pro/Masa.Blazor.Pro.csproj", "Masa.Blazor.Pro/"] RUN dotnet restore "Masa.Blazor.Pro/Masa.Blazor.Pro.csproj" diff --git a/Masa.Blazor.Pro/Masa.Blazor.Pro.csproj b/Masa.Blazor.Pro/Masa.Blazor.Pro.csproj index 9f6ce5c..659fb86 100644 --- a/Masa.Blazor.Pro/Masa.Blazor.Pro.csproj +++ b/Masa.Blazor.Pro/Masa.Blazor.Pro.csproj @@ -1,21 +1,20 @@ - + - net6.0 + net8.0 enable - - $(WarningsAsErrors);CS8605 - enable - aspnet-Masa.Blazor.Pro-1C269218-357E-4813-926B-0CA83F60438B - Linux - + + + + PreserveNewest + PreserveNewest @@ -25,11 +24,6 @@ PreserveNewest - - PreserveNewest - - - - + \ No newline at end of file diff --git a/Masa.Blazor.Pro/Pages/App/Invoice/List.razor b/Masa.Blazor.Pro/Pages/App/Invoice/List.razor deleted file mode 100644 index 06109ff..0000000 --- a/Masa.Blazor.Pro/Pages/App/Invoice/List.razor +++ /dev/null @@ -1,3 +0,0 @@ -@page "/app/invoice/list" - - diff --git a/Masa.Blazor.Pro/Pages/Error.cshtml b/Masa.Blazor.Pro/Pages/Error.cshtml deleted file mode 100644 index 0834abc..0000000 --- a/Masa.Blazor.Pro/Pages/Error.cshtml +++ /dev/null @@ -1,42 +0,0 @@ -@page -@model Masa.Blazor.Pro.Pages.ErrorModel - - - - - - - - Error - - - - - -
-
-

Error.

-

An error occurred while processing your request.

- - @if (Model.ShowRequestId) - { -

- Request ID: @Model.RequestId -

- } - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

-
-
- - - diff --git a/Masa.Blazor.Pro/Pages/Error.cshtml.cs b/Masa.Blazor.Pro/Pages/Error.cshtml.cs deleted file mode 100644 index 20f0078..0000000 --- a/Masa.Blazor.Pro/Pages/Error.cshtml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using System.Diagnostics; - -namespace Masa.Blazor.Pro.Pages -{ - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - [IgnoreAntiforgeryToken] - public class ErrorModel : PageModel - { - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } - } -} \ No newline at end of file diff --git a/Masa.Blazor.Pro/Pages/_Host.cshtml b/Masa.Blazor.Pro/Pages/_Host.cshtml deleted file mode 100644 index 0688960..0000000 --- a/Masa.Blazor.Pro/Pages/_Host.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@page "/" -@namespace Masa.Blazor.Pro.Pages -@using Masa.Blazor.Pro.Global -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = "_Layout"; -} - - - diff --git a/Masa.Blazor.Pro/Program.cs b/Masa.Blazor.Pro/Program.cs index b598a9c..21b0ed2 100644 --- a/Masa.Blazor.Pro/Program.cs +++ b/Masa.Blazor.Pro/Program.cs @@ -1,17 +1,22 @@ +using Masa.Blazor.Pro.Client; +using Masa.Blazor.Pro.Components; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. -builder.Services.AddRazorPages(); -builder.Services.AddServerSideBlazor(); -builder.Services.AddMasaBlazor(builder => +builder.Services.AddRazorComponents() + // .AddInteractiveWebAssemblyComponents() + .AddInteractiveServerComponents(); + +builder.Services.AddMasaBlazor(options => { - builder.ConfigureTheme(theme => + options.ConfigureTheme(theme => { theme.Themes.Light.Primary = "#4318FF"; theme.Themes.Light.Accent = "#4318FF"; }); }).AddI18nForServer("wwwroot/i18n"); -builder.Services.AddHttpContextAccessor(); + builder.Services.AddGlobalForServer(); var app = builder.Build(); @@ -19,21 +24,19 @@ // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { + app.UseWebAssemblyDebugging(); } else { - app.UseExceptionHandler("/Error"); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); + app.UseExceptionHandler("/Error", createScopeForErrors: true); } -app.UseHttpsRedirection(); - app.UseStaticFiles(); +app.UseAntiforgery(); -app.UseRouting(); +app.MapRazorComponents() + .AddInteractiveServerRenderMode() + // .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(Routes).Assembly); -app.MapControllers(); -app.MapBlazorHub(); -app.MapFallbackToPage("/_Host"); app.Run(); diff --git a/Masa.Blazor.Pro/Properties/PublishProfiles/FolderProfile.pubxml b/Masa.Blazor.Pro/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index 48cbc51..0000000 --- a/Masa.Blazor.Pro/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - False - False - True - Release - Any CPU - FileSystem - bin\Release\net6.0\publish\ - FileSystem - - \ No newline at end of file diff --git a/Masa.Blazor.Pro/Properties/launchSettings.json b/Masa.Blazor.Pro/Properties/launchSettings.json index 4b2a13c..abb61f7 100644 --- a/Masa.Blazor.Pro/Properties/launchSettings.json +++ b/Masa.Blazor.Pro/Properties/launchSettings.json @@ -1,20 +1,31 @@ { - "profiles": { - "Masa.Blazor.Pro": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:5000", - "dotnetRunMessages": true + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:42073", + "sslPort": 0 + } }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", - "publishAllPorts": true, - "useSSL": true + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:5011", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } } } -} diff --git a/Masa.Blazor.Pro/Properties/serviceDependencies.json b/Masa.Blazor.Pro/Properties/serviceDependencies.json deleted file mode 100644 index d8177e0..0000000 --- a/Masa.Blazor.Pro/Properties/serviceDependencies.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dependencies": { - "mssql1": { - "type": "mssql", - "connectionId": "ConnectionStrings:DefaultConnection" - } - } -} \ No newline at end of file diff --git a/Masa.Blazor.Pro/Properties/serviceDependencies.local.json b/Masa.Blazor.Pro/Properties/serviceDependencies.local.json deleted file mode 100644 index 299aa9a..0000000 --- a/Masa.Blazor.Pro/Properties/serviceDependencies.local.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dependencies": { - "mssql1": { - "type": "mssql.local", - "connectionId": "ConnectionStrings:DefaultConnection" - } - } -} \ No newline at end of file diff --git a/Masa.Blazor.Pro/appsettings.Development.json b/Masa.Blazor.Pro/appsettings.Development.json index 770d3e9..0c208ae 100644 --- a/Masa.Blazor.Pro/appsettings.Development.json +++ b/Masa.Blazor.Pro/appsettings.Development.json @@ -1,5 +1,4 @@ { - "DetailedErrors": true, "Logging": { "LogLevel": { "Default": "Information", diff --git a/Masa.Blazor.Pro/wwwroot/css/app.css b/Masa.Blazor.Pro/wwwroot/css/app.css new file mode 100644 index 0000000..aa34d51 --- /dev/null +++ b/Masa.Blazor.Pro/wwwroot/css/app.css @@ -0,0 +1,21 @@ +html, body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +h1:focus { + outline: none; +} + +.validation-message { + color: #e50000; +} + +.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." + } diff --git a/Masa.Blazor.Pro/wwwroot/css/masa-blazor-pro.css b/Masa.Blazor.Pro/wwwroot/css/masa-blazor-pro.css index aec849f..d42c1c4 100644 --- a/Masa.Blazor.Pro/wwwroot/css/masa-blazor-pro.css +++ b/Masa.Blazor.Pro/wwwroot/css/masa-blazor-pro.css @@ -1156,4 +1156,14 @@ tr:hover { .m-dialog { border-radius: 20px; -} \ No newline at end of file +} + +/* avoid the entry animation at the first render */ +@media (min-width: 1264px) { + .m-app-bar.m-app-bar--app:not(.app--sized) { + left: 300px !important; + } + .m-main:not(.app--sized){ + padding-left: 300px !important; + } +} diff --git a/Masa.Blazor.Pro/wwwroot/favicon.png b/Masa.Blazor.Pro/wwwroot/favicon.png new file mode 100644 index 0000000..8422b59 Binary files /dev/null and b/Masa.Blazor.Pro/wwwroot/favicon.png differ