Skip to content

Commit

Permalink
Merge pull request #177 from EasyAbp/abp8.1
Browse files Browse the repository at this point in the history
Upgrade to ABP 8.1.3
  • Loading branch information
gdlcf88 authored May 19, 2024
2 parents 4e79be0 + 3755ef4 commit d8eb235
Show file tree
Hide file tree
Showing 40 changed files with 7,178 additions and 13,159 deletions.
2 changes: 1 addition & 1 deletion AbpHelper.CLI
6 changes: 3 additions & 3 deletions dotnet/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<PropertyGroup>

<AbpVersion>8.0.0</AbpVersion>
<AbpLeptonXThemeVersion>3.0.0</AbpLeptonXThemeVersion>
<BlazoriseVersion>1.3.2</BlazoriseVersion>
<AbpVersion>8.1.3</AbpVersion>
<AbpLeptonXThemeVersion>3.1.*-*</AbpLeptonXThemeVersion>
<BlazoriseVersion>1.5.0</BlazoriseVersion>

</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion dotnet/common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>2.11.0</Version>
<Version>2.12.0</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<AbpProjectType>app</AbpProjectType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using EasyAbp.AbpHelper.Gui.Shared.Dtos;
using JetBrains.Annotations;

namespace EasyAbp.AbpHelper.Gui.AbpCli.Switch.Dtos
{
[Serializable]
public class AbpSwitchToPreRcInput : InputDtoWithDirectory
{
public AbpSwitchToPreRcInput()
{
}

public AbpSwitchToPreRcInput([NotNull] string directory) : base(directory)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public interface IAbpCliSwitchAppService : IApplicationService

Task<ServiceExecutionResult> SwitchToStableAsync(AbpSwitchToStableInput input);

Task<ServiceExecutionResult> SwitchToPreRcAsync(AbpSwitchToPreRcInput input);

Task<ServiceExecutionResult> SwitchToLocalAsync(AbpSwitchToLocalInput input);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,33 @@ public class AbpCreateTranslationFileInput : InputDtoWithDirectory
[Required]
[NotNull]
public virtual string Culture { get; set; }

[CanBeNull]
public virtual string ReferenceCulture { get; set; }

[CanBeNull]
public virtual string Output { get; set; }

public virtual bool AllValues { get; set; }

public virtual bool Online { get; set; }

[CanBeNull]
public virtual string DeeplAuthKey { get; set; }

public AbpCreateTranslationFileInput()
{
}

public AbpCreateTranslationFileInput([NotNull] string directory, [NotNull] string culture,
[CanBeNull] string referenceCulture, [CanBeNull] string output, bool allValues) : base(directory)
public AbpCreateTranslationFileInput([NotNull] string culture, [CanBeNull] string referenceCulture,
[CanBeNull] string output, bool allValues, bool online, [CanBeNull] string deeplAuthKey)
{
Culture = culture;
ReferenceCulture = referenceCulture;
Output = output;
AllValues = allValues;
Online = online;
DeeplAuthKey = deeplAuthKey;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"AbpCli_Proxy:ServiceType:All": "All",
"AbpCli_Switch:SwitchToPreview": "To preview",
"AbpCli_Switch:SwitchToNightly": "To nightly",
"AbpCli_Switch:SwitchToPreRc": "To pre-RC",
"AbpCli_Switch:SwitchToStable": "To stable",
"AbpCli_Switch:SwitchToLocal": "To local",
"AbpCli_Switch:Paths": "Paths",
Expand All @@ -142,6 +143,8 @@
"AbpCli_Translate:ReferenceCulture": "Reference culture",
"AbpCli_Translate:Output": "Output",
"AbpCli_Translate:AllValues": "All values",
"AbpCli_Translate:Online": "Online translate - Online",
"AbpCli_Translate:DeeplAuthKey": "DeepL authentication key - DeeplAuthKey",
"AbpCli_Translate:File": "File",
"AbpCli_Login:Login": "Login",
"AbpCli_Login:Logout": "Logout",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"AbpCli_Proxy:ServiceType:All": "所有",
"AbpCli_Switch:SwitchToPreview": "切换为 Preview 版",
"AbpCli_Switch:SwitchToNightly": "切换为 Nightly 版",
"AbpCli_Switch:SwitchToPreRc": "切换为 Pre-RC 版",
"AbpCli_Switch:SwitchToStable": "切换为 Stable 版",
"AbpCli_Switch:SwitchToLocal": "切换为 Local 版",
"AbpCli_Switch:Paths": "路径 - Paths",
Expand All @@ -142,6 +143,8 @@
"AbpCli_Translate:ReferenceCulture": "参考区域代号 - ReferenceCulture",
"AbpCli_Translate:Output": "输出文件名 - Output",
"AbpCli_Translate:AllValues": "包括所有值 - AllValues",
"AbpCli_Translate:Online": "在线翻译 - Online",
"AbpCli_Translate:DeeplAuthKey": "DeepL 授权秘钥 - DeeplAuthKey",
"AbpCli_Translate:File": "指定文件 - File",
"AbpCli_Login:Login": "登录",
"AbpCli_Login:Logout": "登出",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"AbpCli_Proxy:ServiceType:All": "所有",
"AbpCli_Switch:SwitchToPreview": "切換為 Preview 版",
"AbpCli_Switch:SwitchToNightly": "切換為 Nightly 版",
"AbpCli_Switch:SwitchToPreRc": "切換為 Pre-RC 版",
"AbpCli_Switch:SwitchToStable": "切換為 Stable 版",
"AbpCli_Switch:SwitchToLocal": "切換為 Local 版",
"AbpCli_Switch:Paths": "路徑 - Paths",
Expand All @@ -142,6 +143,8 @@
"AbpCli_Translate:ReferenceCulture": "參考區域代號 - ReferenceCulture",
"AbpCli_Translate:Output": "輸出檔名 - Output",
"AbpCli_Translate:AllValues": "包含所有值 - AllValues",
"AbpCli_Translate:Online": "線上翻譯 - Online",
"AbpCli_Translate:DeeplAuthKey": "DeepL 授權秘鑰 - DeeplAuthKey",
"AbpCli_Translate:File": "指定檔案 - File",
"AbpCli_Login:Login": "登錄",
"AbpCli_Login:Logout": "登出",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ public virtual async Task<ServiceExecutionResult> SwitchToStableAsync(AbpSwitchT
return new ServiceExecutionResult(true);
}

public virtual async Task<ServiceExecutionResult> SwitchToPreRcAsync(AbpSwitchToPreRcInput input)
{
var args = CreateCommandLineArgs(input, "abp switch-to-prerc");

using (_currentDirectoryHelper.Change(input.Directory))
{
await _switchToStableCommand.ExecuteAsync(args);
}

return new ServiceExecutionResult(true);
}

public virtual async Task<ServiceExecutionResult> SwitchToLocalAsync(AbpSwitchToLocalInput input)
{
var args = CreateCommandLineArgs(input, "abp switch-to-local");
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/EasyAbp.AbpHelper.Gui.Blazor/GuiBlazorModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void ConfigureSwaggerServices(IServiceCollection services)

private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
PreConfigure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(GuiApplicationModule).Assembly);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@using Volo.Abp.AspNetCore.Components.Web
@using EasyAbp.AbpHelper.Gui.Localization
@using EasyAbp.AbpHelper.Gui.AbpCli.Switch.Dtos;
@using EasyAbp.AbpHelper.Gui.Blazor.Pages.Shared;
@inherits ExecutableComponentBaseWithDirectory<AbpSwitchToPreRcInput>
@inject AbpBlazorMessageLocalizerHelper<GuiResource> Lh

<Card Class="mb-4">
<CardBody>
<Alert Color="Color.Info" Visible>
<AlertDescription>
<Icon Name="IconName.QuestionCircle" /> @L["Info:FunctionIsBasedOnAbpCliPart1"]
</AlertDescription>
<AlertMessage>
<Icon Name="IconName.ExternalLinkSquareAlt"/>
<Link To="https://docs.abp.io/en/abp/latest/CLI#switch-to-prerc" Target="Target.Blank" Style="text-decoration: none">
@L["Info:FunctionIsBasedOnAbpCliPart2_Document"]
</Link>
</AlertMessage>
<AlertDescription>
@L["Info:FunctionIsBasedOnAbpCliPart3"]
</AlertDescription>
</Alert>
<Form>
<Validations @ref="ValidationsRef" Model="Input" ValidateOnLoad="false">
<Validation MessageLocalizer="@Lh.Localize">
<Field>
<FieldLabel>@L["Directory"]</FieldLabel>
<TextEdit @bind-Text="Input.Directory" Autofocus="true">
<Feedback>
<ValidationError/>
</Feedback>
</TextEdit>
</Field>
</Validation>

<SubmitButton Block="true" Clicked="@ExecuteAsync" SaveResourceKey="Button:Execute" />
</Validations>
</Form>
</CardBody>
</Card>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Threading.Tasks;
using EasyAbp.AbpHelper.Gui.AbpCli.Switch;
using Microsoft.AspNetCore.Components;

namespace EasyAbp.AbpHelper.Gui.Blazor.Pages.AbpCli.Components.Switch
{
public partial class SwitchToPreRc
{
[Inject]
private IAbpCliSwitchAppService Service { get; set; }

protected override async Task InternalExecuteAsync()
{
await Service.SwitchToPreRcAsync(Input);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@
<Field>
<Check TValue="bool" @bind-Checked="@Input.AllValues">@L["AbpCli_Translate:AllValues"]</Check>
</Field>
<Field>
<Check TValue="bool" @bind-Checked="@Input.Online">@L["AbpCli_Translate:Online"]</Check>
</Field>
<Validation MessageLocalizer="@Lh.Localize">
<Field>
<FieldLabel>@L["AbpCli_Translate:DeeplAuthKey"]</FieldLabel>
<TextEdit @bind-Text="Input.DeeplAuthKey" Disabled="@(!Input.Online)">
<Feedback>
<ValidationError/>
</Feedback>
</TextEdit>
</Field>
</Validation>

<SubmitButton Block="true" Clicked="@ExecuteAsync" SaveResourceKey="Button:Execute" />
</Validations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
<Items>
<Tab Name="SwitchToPreview">@L["AbpCli_Switch:SwitchToPreview"]</Tab>
<Tab Name="SwitchToNightly">@L["AbpCli_Switch:SwitchToNightly"]</Tab>
<Tab Name="SwitchToPreRc">@L["AbpCli_Switch:SwitchToPreRc"]</Tab>
<Tab Name="SwitchToStable">@L["AbpCli_Switch:SwitchToStable"]</Tab>
<Tab Name="SwitchToLocal">@L["AbpCli_Switch:SwitchToLocal"]</Tab>
</Items>
Expand All @@ -142,6 +143,9 @@
<TabPanel Name="SwitchToNightly">
<SwitchToNightly></SwitchToNightly>
</TabPanel>
<TabPanel Name="SwitchToPreRc">
<SwitchToPreRc></SwitchToPreRc>
</TabPanel>
<TabPanel Name="SwitchToStable">
<SwitchToStable></SwitchToStable>
</TabPanel>
Expand Down
6 changes: 3 additions & 3 deletions dotnet/src/EasyAbp.AbpHelper.Gui.Blazor/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version": "2.11.0",
"version": "2.12.0",
"name": "easyabp-abphelper-gui",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.0.0",
"@abp/aspnetcore.components.server.leptonxlitetheme": "~3.0.0"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.1.0",
"@abp/aspnetcore.components.server.leptonxlitetheme": "~3.1.0"
}
}
Loading

0 comments on commit d8eb235

Please sign in to comment.