Browse Source

Merge branch 'dev' into Implementing-IHasEntityVersion-15135

pull/15169/head
malik masis 4 years ago
parent
commit
7aa5c11502
  1. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs
  2. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  3. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/ConnectionStringProvider.cs
  4. 36
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.cshtml
  5. 29
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js
  6. 2
      npm/ng-packs/package.json
  7. 2
      npm/ng-packs/packages/theme-shared/package.json

10
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs

@ -50,14 +50,15 @@ public class CliService : ITransientDependency
public async Task RunAsync(string[] args)
{
Logger.LogInformation("ABP CLI (https://abp.io)");
var currentCliVersion = await GetCurrentCliVersionInternalAsync(typeof(CliService).Assembly);
Logger.LogInformation($"ABP CLI {currentCliVersion}");
var commandLineArgs = CommandLineArgumentParser.Parse(args);
#if !DEBUG
if (!commandLineArgs.Options.ContainsKey("skip-cli-version-check"))
{
await CheckCliVersionAsync();
await CheckCliVersionAsync(currentCliVersion);
}
#endif
try
@ -168,7 +169,7 @@ public class CliService : ITransientDependency
}
}
private async Task CheckCliVersionAsync()
private async Task CheckCliVersionAsync(SemanticVersion currentCliVersion)
{
if (!await IsLatestVersionCheckExpiredAsync())
{
@ -177,11 +178,8 @@ public class CliService : ITransientDependency
var assembly = typeof(CliService).Assembly;
var toolPath = GetToolPath(assembly);
var currentCliVersion = await GetCurrentCliVersionInternalAsync(assembly);
var updateChannel = GetUpdateChannel(currentCliVersion);
Logger.LogInformation($"Version {currentCliVersion} ({updateChannel})");
try
{
var latestVersion = await GetLatestVersion(updateChannel);

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -84,6 +84,7 @@ public abstract class ProjectCreationCommandBase
{
Logger.LogInformation("Preview: yes");
#if !DEBUG
var cliVersion = await CliService.GetCurrentCliVersionAsync(typeof(CliService).Assembly);
if (!cliVersion.IsPrerelease)
@ -92,6 +93,7 @@ public abstract class ProjectCreationCommandBase
"You can only create a new preview solution with preview CLI version." +
" Update your ABP CLI to the preview version.");
}
#endif
}
var pwa = commandLineArgs.Options.ContainsKey(Options.ProgressiveWebApp.Short);

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/ConnectionStringProvider.cs

@ -13,7 +13,7 @@ public class ConnectionStringProvider : ITransientDependency
{
case DatabaseManagementSystem.NotSpecified:
case DatabaseManagementSystem.SQLServer:
return "Server=localhost;Database=MyProjectName;Trusted_Connection=True";
return "Server=localhost;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True";
case DatabaseManagementSystem.MySQL:
return "Server=localhost;Port=3306;Database=MyProjectName;Uid=root;Pwd=myPassword;";
case DatabaseManagementSystem.PostgreSQL:

36
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.cshtml

@ -5,13 +5,31 @@
@inject ICurrentUser CurrentUser
@model Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup.Password.AccountProfilePasswordManagementGroupViewComponent.ChangePasswordInfoModel
<h4>@L["ChangePassword"]</h4><hr/>
<h4>@L["ChangePassword"]</h4><hr />
<form id="ChangePasswordForm">
@if (!Model.HideOldPasswordInput)
{
<abp-input asp-for="CurrentPassword"/>
}
<abp-input asp-for="NewPassword"/>
<abp-input asp-for="NewPasswordConfirm"/>
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value"/>
</form>
<div class="mb-3">
@if (!Model.HideOldPasswordInput)
{
<label asp-for="CurrentPassword" class="form-label"></label>
<div class="input-group">
<input type="password" class="form-control" autocomplete="new-password" asp-for="CurrentPassword"/>
<button class="btn btn-secondary password-visibility-button" type="button"><i class="fa fa-eye-slash" aria-hidden="true"></i></button>
</div>
<span asp-validation-for="CurrentPassword"></span><br/>
}
<label asp-for="NewPassword" class="form-label"></label>
<div class="input-group">
<input type="password" class="form-control" autocomplete="new-password" asp-for="NewPassword"/>
<button class="btn btn-secondary password-visibility-button" type="button" ><i class="fa fa-eye-slash" aria-hidden="true"></i></button>
</div>
<span asp-validation-for="NewPassword"></span><br/>
<label asp-for="NewPasswordConfirm" class="form-label"></label>
<div class="input-group">
<input type="password" class="form-control" autocomplete="new-password" asp-for="NewPasswordConfirm"/>
<button class="btn btn-secondary password-visibility-button" type="button"><i class="fa fa-eye-slash" aria-hidden="true"></i></button>
</div>
<span asp-validation-for="NewPasswordConfirm"></span>
</div>
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value" />
</form>

29
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js

@ -1,7 +1,26 @@
(function ($) {
$(".password-visibility-button").click(function (e) {
let button = $(this);
let passwordInput = button.parent().find("input");
if (!passwordInput) {
return;
}
if (passwordInput.attr("type") === "password") {
passwordInput.attr("type", "text");
}
else {
passwordInput.attr("type", "password");
}
let icon = button.find("i");
if (icon) {
icon.toggleClass("fa-eye-slash").toggleClass("fa-eye");
}
});
$(function () {
var l = abp.localization.getResource("AbpAccount");
$('#ChangePasswordForm').submit(function (e) {
e.preventDefault();
@ -19,15 +38,15 @@
return;
}
if (input.currentPassword && input.currentPassword == ''){
if (input.currentPassword && input.currentPassword == '') {
return;
}
if(input.currentPassword == input.newPassword) {
if (input.currentPassword == input.newPassword) {
abp.message.error(l('NewPasswordSameAsOld'));
return;
}
volo.abp.account.profile.changePassword(input).then(function (result) {
abp.message.success(l('PasswordChanged'));
abp.event.trigger('passwordChanged');

2
npm/ng-packs/package.json

@ -73,7 +73,7 @@
"@abp/ng.theme.basic": "~7.0.0-rc.4",
"@abp/ng.theme.shared": "~7.0.0-rc.4",
"@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "^14.0.0-rc.1",
"@ng-bootstrap/ng-bootstrap": "^14.0.0",
"@ngneat/spectator": "^10.0.0",
"@ngx-validate/core": "^0.2.0",
"@nrwl/angular": "15.2.1",

2
npm/ng-packs/packages/theme-shared/package.json

@ -9,7 +9,7 @@
"dependencies": {
"@abp/ng.core": "~7.0.0-rc.4",
"@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "^14.0.0-rc.1",
"@ng-bootstrap/ng-bootstrap": "^14.0.0",
"@ngx-validate/core": "^0.2.0",
"@popperjs/core": "~2.11.2",
"@swimlane/ngx-datatable": "^20.0.0",

Loading…
Cancel
Save