-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from EasyAbp/switch-to-local
Support the ABP CLI `switch-to-local` command
- Loading branch information
Showing
11 changed files
with
124 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...c/EasyAbp.AbpHelper.Gui.Application.Contracts/AbpCli/Switch/Dtos/AbpSwitchToLocalInput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using EasyAbp.AbpHelper.Gui.Shared.Dtos; | ||
using JetBrains.Annotations; | ||
|
||
namespace EasyAbp.AbpHelper.Gui.AbpCli.Switch.Dtos | ||
{ | ||
[Serializable] | ||
public class AbpSwitchToLocalInput : InputDtoWithDirectory | ||
{ | ||
public string Paths { get; set; } | ||
|
||
public AbpSwitchToLocalInput() | ||
{ | ||
} | ||
|
||
public AbpSwitchToLocalInput([NotNull] string directory) : base(directory) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
dotnet/src/EasyAbp.AbpHelper.Gui.Blazor/Pages/AbpCli/Components/Switch/SwitchToLocal.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@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<AbpSwitchToLocalInput> | ||
@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-local" 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> | ||
<Field> | ||
<FieldLabel>@L["AbpCli_Switch:Paths"]</FieldLabel> | ||
<TextEdit @bind-Text="Input.Paths" Autofocus="true"> | ||
<Feedback> | ||
<ValidationError/> | ||
</Feedback> | ||
</TextEdit> | ||
</Field> | ||
<FieldLabel>@L["Directory"]</FieldLabel> | ||
<TextEdit @bind-Text="Input.Directory"> | ||
<Feedback> | ||
<ValidationError/> | ||
</Feedback> | ||
</TextEdit> | ||
</Field> | ||
</Validation> | ||
|
||
<SubmitButton Block="true" Clicked="@ExecuteAsync" SaveResourceKey="Button:Execute" /> | ||
</Validations> | ||
</Form> | ||
</CardBody> | ||
</Card> |
17 changes: 17 additions & 0 deletions
17
...et/src/EasyAbp.AbpHelper.Gui.Blazor/Pages/AbpCli/Components/Switch/SwitchToLocal.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 SwitchToLocal | ||
{ | ||
[Inject] | ||
private IAbpCliSwitchAppService Service { get; set; } | ||
|
||
protected override async Task InternalExecuteAsync() | ||
{ | ||
await Service.SwitchToLocalAsync(Input); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters