mirror of https://github.com/abpframework/abp.git
38 changed files with 297 additions and 175 deletions
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,8 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.WebApp; |
|||
|
|||
/// <summary>
|
|||
/// This class is used to indicate that the AddBlazorWebAppTieredServices method has been called for compatibility with the old template code
|
|||
/// </summary>
|
|||
internal sealed class AddBlazorWebAppTieredServicesHasBeenCalled |
|||
{ |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using MongoDB.Bson; |
|||
|
|||
namespace Volo.Abp.MongoDB; |
|||
|
|||
public class AbpGuidCustomBsonTypeMapper : ICustomBsonTypeMapper |
|||
{ |
|||
public bool TryMapToBsonValue(object value, out BsonValue bsonValue) |
|||
{ |
|||
bsonValue = new BsonBinaryData((Guid)value, GuidRepresentation.Standard); |
|||
return true; |
|||
} |
|||
} |
|||
@ -1,27 +1,12 @@ |
|||
{ |
|||
"iisSettings": { |
|||
"windowsAuthentication": false, |
|||
"anonymousAuthentication": true, |
|||
"iisExpress": { |
|||
"applicationUrl": "http://localhost:51339", |
|||
"sslPort": 0 |
|||
} |
|||
}, |
|||
"profiles": { |
|||
"IIS Express": { |
|||
"commandName": "IISExpress", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
}, |
|||
"Volo.AbpIo.Commercial.Web": { |
|||
"Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"applicationUrl": "http://localhost:5000", |
|||
"applicationUrl": "https://localhost:5000", |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +0,0 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; |
|||
|
|||
public class Startup |
|||
{ |
|||
public void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoModule>(); |
|||
} |
|||
|
|||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo; |
|||
|
|||
public class Startup |
|||
{ |
|||
public void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<AbpAspNetCoreMvcUiThemeBasicDemoModule>(); |
|||
} |
|||
|
|||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
@ -0,0 +1 @@ |
|||
export * from './lazy-translate.pipe'; |
|||
@ -0,0 +1,20 @@ |
|||
import { LocalizationService, ConfigStateService } from '@abp/ng.core'; |
|||
import { inject, Pipe, PipeTransform } from '@angular/core'; |
|||
import { Observable, filter, take, switchMap, shareReplay } from 'rxjs'; |
|||
|
|||
@Pipe({ |
|||
name: 'abpLazyTranslate', |
|||
}) |
|||
export class LazyTranslatePipe implements PipeTransform { |
|||
private localizationService = inject(LocalizationService); |
|||
private configStateService = inject(ConfigStateService); |
|||
|
|||
transform(key: string): Observable<string> { |
|||
return this.configStateService.getAll$().pipe( |
|||
filter(config => !!config.localization), |
|||
take(1), |
|||
switchMap(() => this.localizationService.get(key)), |
|||
shareReplay({ bufferSize: 1, refCount: true }), |
|||
); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue