Browse Source

feat: Add Alterations Module

pull/1568/head
colin 2 weeks ago
parent
commit
d6b573f892
  1. 2
      Directory.Packages.props
  2. 2
      aspnet-core/LINGYUN.MicroService.Aspire.slnx
  3. 3
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj
  4. 15
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.Configure.cs
  5. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs
  6. 3
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/FodyWeavers.xml
  7. 30
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/FodyWeavers.xsd
  8. 24
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN.Abp.ElsaNext.Alterations.csproj
  9. 28
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN/Abp/ElsaNext/Alterations/AbpElsaNextAlterationsModule.cs
  10. 47
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/AbpElsaNextStudioAlterationsBlazorModule.cs
  11. 3
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/FodyWeavers.xml
  12. 30
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/FodyWeavers.xsd
  13. 29
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.csproj
  14. 7
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Localization/Resources/AlterationsBlazor/en.json
  15. 7
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Localization/Resources/AlterationsBlazor/zh-Hans.json
  16. 28
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Navigation/ElsaStudioAlterationsMenuContributor.cs
  17. 5
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/_Imports.razor

2
Directory.Packages.props

@ -246,6 +246,7 @@
<PackageVersion Include="Elsa.Agents.Persistence.EFCore.Sqlite" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.AI.Copilot" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.AI.Persistence.EFCore.Sqlite" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Alterations" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Api.Client" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Dashboard.Api" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Diagnostics.OpenTelemetry" Version="$(ElsaNextPackageVersion)" />
@ -270,6 +271,7 @@
<PackageVersion Include="Elsa.Studio" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.Agents" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.AI" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.Alterations" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.Authentication.Abstractions" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.Authentication.ElsaIdentity.BlazorServer" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Studio.Authentication.ElsaIdentity.BlazorWasm" Version="$(ElsaNextPackageVersion)" />

2
aspnet-core/LINGYUN.MicroService.Aspire.slnx

@ -556,6 +556,7 @@
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Agents.Blazor/LINGYUN.Abp.ElsaNext.Agents.Blazor.csproj" Id="fc82705b-186b-4d0d-80d2-473f08596b48" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Agents/LINGYUN.Abp.ElsaNext.Agents.csproj" Id="8699b2ee-5d73-4e7e-9f52-4ec02e5c8c52" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.AI/LINGYUN.Abp.ElsaNext.AI.csproj" Id="d90d0e07-be50-45d5-aa45-1a917203cc3b" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN.Abp.ElsaNext.Alterations.csproj" Id="1e5e1733-8c5c-4ede-9ee8-7f6ae1e85bb6" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.BlobStoring/LINGYUN.Abp.ElsaNext.BlobStoring.csproj" Id="ab3ed7c4-918e-40ae-84d6-f98d9ff9c6b1" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Email/LINGYUN.Abp.ElsaNext.Email.csproj" Id="c8cd2bd2-05f2-44b7-ab7b-7943f00f849e" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Labels/LINGYUN.Abp.ElsaNext.Labels.csproj" Id="b2b88f48-e8a2-4760-85f5-d5a3ffffa6f8" />
@ -564,6 +565,7 @@
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Secrets/LINGYUN.Abp.ElsaNext.Secrets.csproj" Id="f49baa76-12c5-4294-b942-fc6f5d49d3e6" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Server/LINGYUN.Abp.ElsaNext.Server.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.AI.Blazor/LINGYUN.Abp.ElsaNext.Studio.AI.Blazor.csproj" Id="3246ab91-4cdc-4349-9eb6-e65eef1da0bd" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.csproj" Id="eb1220d6-31cf-4f73-a9fc-494d30de61df" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Blazor/LINGYUN.Abp.ElsaNext.Studio.Blazor.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Diagnostics.OpenTelemetry.Blazor/LINGYUN.Abp.ElsaNext.Studio.Diagnostics.OpenTelemetry.Blazor.csproj" Id="86b1ee1c-6266-4003-8ab2-67aa497ea217" />

3
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj

@ -19,6 +19,7 @@
<PackageReference Include="DotNetCore.CAP.PostgreSql" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" />
<PackageReference Include="Elsa.Agents.Persistence.EFCore.Sqlite" />
<PackageReference Include="Elsa.AI.Persistence.EFCore.Sqlite" />
<PackageReference Include="Elsa.Persistence.EFCore.Sqlite" />
<PackageReference Include="Elsa.Scheduling.Quartz.EFCore.Sqlite" />
<PackageReference Include="Elsa.Secrets.Persistence.EFCore.Sqlite" />
@ -93,6 +94,8 @@
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Notifications\LINGYUN.Abp.ElsaNext.Notifications.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Secrets.Blazor\LINGYUN.Abp.ElsaNext.Secrets.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Server\LINGYUN.Abp.ElsaNext.Server.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Studio.AI.Blazor\LINGYUN.Abp.ElsaNext.Studio.AI.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor\LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Studio.Blazor\LINGYUN.Abp.ElsaNext.Studio.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor\LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Studio.Diagnostics.OpenTelemetry.Blazor\LINGYUN.Abp.ElsaNext.Studio.Diagnostics.OpenTelemetry.Blazor.csproj" />

15
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.Configure.cs

@ -1,10 +1,11 @@
using DotNetCore.CAP;
using Elsa.Agents;
using Elsa.AI.Persistence.EFCore.Features;
using Elsa.AI.Persistence.EFCore.Sqlite.Extensions;
using Elsa.Alterations.Extensions;
using Elsa.Extensions;
using Elsa.Features.Services;
using Elsa.Persistence.EFCore.Extensions;
using Elsa.Persistence.EFCore.Modules.Alterations;
using Elsa.Persistence.EFCore.Modules.Labels;
using Elsa.Persistence.EFCore.Modules.Management;
using Elsa.Persistence.EFCore.Modules.Runtime;
@ -12,7 +13,6 @@ using Elsa.Secrets.Persistence.EFCore.Extensions;
using Elsa.Secrets.Persistence.EFCore.Sqlite.Extensions;
using Elsa.Studio.Authentication.OpenIdConnect.HttpMessageHandlers;
using Elsa.Studio.Workflows.Designer.Extensions;
using LINGYUN.Abp.ElsaNext.Permissions;
using LINGYUN.Abp.ElsaNext.Studio.Blazor;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.LocalizationManagement;
@ -31,7 +31,6 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi;
@ -49,7 +48,6 @@ using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Routing;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.BlobStoring;
using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore;
@ -160,7 +158,9 @@ public partial class WorkflowServiceModule
{
options.IsBlazorWebApp = true;
});
services.AddAIPersistenceStores(options => options.UseSqlite());
PreConfigure<IModule>(elsa =>
{
elsa.UseWorkflowManagement(management =>
@ -173,6 +173,11 @@ public partial class WorkflowServiceModule
runtime.UseEntityFrameworkCore(ef => ef.UseSqlite());
});
elsa.UseAlterations(alteration =>
{
alteration.UseEntityFrameworkCore(ef => ef.UseSqlite());
});
elsa.UseAgentPersistence(agent =>
{
agent.UseEntityFrameworkCore(ef => ef.UseSqlite());
@ -226,6 +231,8 @@ public partial class WorkflowServiceModule
// options.WithFeature<SqliteWorkflowPersistenceShellFeature>();
//});
// EndpointSecurityOptions.DisableSecurity();
services.AddOpenIdConnectAuth(options =>
{
configuration.GetSection("Authentication:OpenIdConnect").Bind(options);

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs

@ -14,6 +14,7 @@ using LINGYUN.Abp.ElsaNext.Notifications;
using LINGYUN.Abp.ElsaNext.Secrets.Blazor;
using LINGYUN.Abp.ElsaNext.Server;
using LINGYUN.Abp.ElsaNext.Studio.AI.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Diagnostics.OpenTelemetry.Blazor;
@ -76,6 +77,7 @@ namespace LINGYUN.Abp.MicroService.WorkflowService;
typeof(AbpElsaNextAgentsBlazorModule),
typeof(AbpElsaNextSecretsBlazorModule),
typeof(AbpElsaNextStudioAIBlazorModule),
typeof(AbpElsaNextStudioAlterationsBlazorModule),
typeof(AbpElsaNextStudioDashboardBlazorModule),
typeof(AbpElsaNextStudioDiagnosticsOpenTelemetryBlazorModule),
typeof(AbpElsaNextStudioDiagnosticsStructuredLogsBlazorModule),

3
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

24
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN.Abp.ElsaNext.Alterations.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>LINGYUN.Abp.ElsaNext.Alterations</AssemblyName>
<PackageId>LINGYUN.Abp.ElsaNext.Alterations</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Elsa.Alterations" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.ElsaNext\LINGYUN.Abp.ElsaNext.csproj" />
</ItemGroup>
</Project>

28
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN/Abp/ElsaNext/Alterations/AbpElsaNextAlterationsModule.cs

@ -0,0 +1,28 @@
using Elsa.Alterations.Extensions;
using Elsa.Features.Contracts;
using Elsa.Features.Services;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.ElsaNext.Alterations;
[DependsOn(
typeof(AbpElsaNextModule))]
public class AbpElsaNextAlterationsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IModule>(elsa =>
{
elsa.UseAlterations();
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
// TODO: 强制启用Studio中的Alterations?
var registry = context.ServiceProvider.GetRequiredService<IInstalledFeatureRegistry>();
registry.Add(new("Alterations.ShellFeatures.Alterations", "Elsa", "Alterations.ShellFeatures.Alterations"));
}
}

47
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/AbpElsaNextStudioAlterationsBlazorModule.cs

@ -0,0 +1,47 @@
using Elsa.Studio.Alterations.Extensions;
using LINGYUN.Abp.ElsaNext.Alterations;
using LINGYUN.Abp.ElsaNext.Localization;
using LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.Navigation;
using LINGYUN.Abp.ElsaNext.Studio.Blazor;
using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Routing;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor;
[DependsOn(
typeof(AbpElsaNextAlterationsModule),
typeof(AbpElsaNextStudioBlazorModule))]
public class AbpElsaNextStudioAlterationsBlazorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Configuration.GetSection("Elsa:Studio");
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(Elsa.Studio.Alterations.Feature).Assembly);
});
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new ElsaStudioAlterationsMenuContributor());
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpElsaNextStudioAlterationsBlazorModule>("LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<ElsaNextResource>()
.AddVirtualJson("/Localization/Resources/AlterationsBlazor");
});
context.Services.AddAlterationsModule();
}
}

3
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

29
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.csproj

@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor</AssemblyName>
<PackageId>LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<ItemGroup>
<Content Remove="Localization\Resources\AlterationsBlazor\*.json" />
<EmbeddedResource Include="Localization\Resources\AlterationsBlazor\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Elsa.Studio.Alterations" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.ElsaNext.Alterations\LINGYUN.Abp.ElsaNext.Alterations.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.ElsaNext.Studio.Blazor\LINGYUN.Abp.ElsaNext.Studio.Blazor.csproj" />
</ItemGroup>
</Project>

7
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Localization/Resources/AlterationsBlazor/en.json

@ -0,0 +1,7 @@
{
"culture": "en",
"texts": {
"Menu:Alterations": "Alterations",
"Alterations": "Alterations"
}
}

7
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Localization/Resources/AlterationsBlazor/zh-Hans.json

@ -0,0 +1,7 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Alterations": "变更",
"Alterations": "变更"
}
}

28
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/Navigation/ElsaStudioAlterationsMenuContributor.cs

@ -0,0 +1,28 @@
using LINGYUN.Abp.ElsaNext.Localization;
using LINGYUN.Abp.ElsaNext.Studio.Blazor.Navigation;
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
namespace LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.Navigation;
public class ElsaStudioAlterationsMenuContributor : IMenuContributor
{
public Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
var menu = context.Menu;
var l = context.GetLocalizer<ElsaNextResource>();
var group = menu.GetMenuItemOrNull(ElsaStudioMenus.GroupName);
group?.AddItem(new ApplicationMenuItem(
ElsaStudioMenus.GroupName + ".Alterations",
l["Menu:Alterations"],
url: "/alterations",
icon: "fa fa-clock-rotate-left",
order: 5));
}
return Task.CompletedTask;
}
}

5
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/_Imports.razor

@ -0,0 +1,5 @@
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Web
@using Elsa.Studio.Components
@using Elsa.Studio.Localization
@using MudBlazor
Loading…
Cancel
Save