Browse Source
Merge pull request #11443 from abpframework/liangshiwei/blazor
Blazor-server: Support deploy sub application
pull/11444/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
11 additions and
11 deletions
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LanguageSwitch.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/Branding.razor
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/Pages/Index.razor
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/Pages/_Host.cshtml
|
|
|
@ -30,7 +30,7 @@ |
|
|
|
CultureInfo.CurrentCulture.Name, |
|
|
|
CultureInfo.CurrentUICulture.Name |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (currentLanguage == null) |
|
|
|
{ |
|
|
|
var localizationOptions = await RequestLocalizationOptionsProvider.GetLocalizationOptionsAsync(); |
|
|
|
@ -56,10 +56,10 @@ |
|
|
|
|
|
|
|
private void ChangeLanguage(LanguageInfo language) |
|
|
|
{ |
|
|
|
var relativeUrl = NavigationManager.Uri.RemovePreFix(NavigationManager.BaseUri).EnsureStartsWith('/'); |
|
|
|
|
|
|
|
var relativeUrl = NavigationManager.Uri.RemovePreFix(NavigationManager.BaseUri).EnsureStartsWith('/').EnsureStartsWith('~'); |
|
|
|
|
|
|
|
NavigationManager.NavigateTo( |
|
|
|
$"/Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={relativeUrl}", |
|
|
|
$"Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={relativeUrl}", |
|
|
|
forceLoad: true |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ -26,13 +26,13 @@ |
|
|
|
{ |
|
|
|
@foreach (var menuItem in Menu.Items) |
|
|
|
{ |
|
|
|
<a class="dropdown-item" href="@menuItem.Url?.TrimStart('~')" target="@menuItem.Target">@menuItem.DisplayName</a> |
|
|
|
<a class="dropdown-item" href="@menuItem.Url?.TrimStart('/', '~')" target="@menuItem.Target">@menuItem.DisplayName</a> |
|
|
|
} |
|
|
|
} |
|
|
|
</DropdownMenu> |
|
|
|
</Dropdown> |
|
|
|
</Authorized> |
|
|
|
<NotAuthorized> |
|
|
|
<a class="nav-link" href="/Account/Login">@L["Login"]</a> |
|
|
|
<a class="nav-link" href="Account/Login">@L["Login"]</a> |
|
|
|
</NotAuthorized> |
|
|
|
</AuthorizeView> |
|
|
|
</AuthorizeView> |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<a class="navbar-brand" href=""> |
|
|
|
@if (!BrandingProvider.LogoUrl.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
<img src="@BrandingProvider.LogoUrl" alt="@BrandingProvider.AppName" > |
|
|
|
<img src="@BrandingProvider.LogoUrl.TrimStart('/', '~')" alt="@BrandingProvider.AppName"> |
|
|
|
} |
|
|
|
@BrandingProvider.AppName |
|
|
|
</a> |
|
|
|
|
|
|
|
@ -12,10 +12,10 @@ |
|
|
|
<h1>Welcome to the Application</h1> |
|
|
|
|
|
|
|
<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p> |
|
|
|
|
|
|
|
|
|
|
|
@if (!CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
<a class="btn btn-primary" href="/Account/Login" ><i class="fa fa-sign-in"></i> @L["Login"]</a> |
|
|
|
<a class="btn btn-primary" href="Account/Login" ><i class="fa fa-sign-in"></i> @L["Login"]</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
|
|
<title>MyCompanyName.MyProjectName.Blazor.Server</title> |
|
|
|
<base href="~/" /> |
|
|
|
|
|
|
|
|
|
|
|
<abp-style-bundle name="@BlazorBasicThemeBundles.Styles.Global" /> |
|
|
|
</head> |
|
|
|
<body class="abp-application-layout bg-light @rtl"> |
|
|
|
|